Console Class Reference

Console for putting output on screen. More...

#include <Console.h>

Inheritance diagram for Console:

Object2d EventListener ViewObject Object Object

List of all members.

Public Member Functions

void printLine (const string &text)
 The output function.
void printLine (const Object &object)
 The output function.
void renderGl ()
 Renders the console.
void selectGl ()
 Renders the console using selection color.
void processEvent (SDL_Event &event)
 A method to deal with SDL_Event.
virtual string toString () const
 Returns a textual representation.
virtual string className () const
 Returns the class name of the object.
virtual enum classId classId () const
 Returns the class id of the object.

Static Public Member Functions

static ConsolegetInstance ()
 The singleton getter.

Private Member Functions

 Console ()
 The constructor.
 Console (const Console &source)
 The copy constructor.
 ~Console ()
 The destructor.

Private Attributes

bool visible
 Visibility toggle.
Font font
 The selected Font.
GLfloat size
 The size of the letters.
GLfloat width
 The width of the console.
GLfloat height
 The height of the console.
Color color
 The color of the font.
vector< Labellines
 The lines to be drawn.

Static Private Attributes

static Consoleinstance = 0
 The singleton instance.


Detailed Description

Console for putting output on screen.

This simple output can be used for debugging


Constructor & Destructor Documentation

Console::Console (  )  [private]

The constructor.

Initializes the console.

Console::Console ( const Console source  )  [private]

The copy constructor.

Should not be called.

Console::~Console (  )  [private]

The destructor.

Destroyes the console. Should only be called for program termination.


Member Function Documentation

Console * Console::getInstance (  )  [static]

The singleton getter.

The only way to access the console

void Console::printLine ( const string &  text  ) 

The output function.

Outputs something to the console

void Console::printLine ( const Object object  ) 

The output function.

Outputs something to the console

void Console::renderGl (  )  [virtual]

Renders the console.

This method renders the console

Implements Object2d.

void Console::selectGl (  )  [virtual]

Renders the console using selection color.

render method for object picking

Implements Object2d.

void Console::processEvent ( SDL_Event &  event  )  [virtual]

A method to deal with SDL_Event.

Implements EventListener.

string Console::toString (  )  const [virtual]

Returns a textual representation.

Returns:
a string descriping the run-time object

Implements EventListener.

string Console::className (  )  const [virtual]

Returns the class name of the object.

Returns:
a string with the name of the object's class

Implements EventListener.

enum classId Console::classId (  )  const [virtual]

Returns the class id of the object.

Returns:
an id of the object's class

Implements EventListener.


Member Data Documentation

Console * Console::instance = 0 [static, private]

The singleton instance.

bool Console::visible [private]

Visibility toggle.

Font Console::font [private]

The selected Font.

GLfloat Console::size [private]

The size of the letters.

GLfloat Console::width [private]

The width of the console.

GLfloat Console::height [private]

The height of the console.

Color Console::color [private]

The color of the font.

vector<Label> Console::lines [private]

The lines to be drawn.


The documentation for this class was generated from the following files:

Generated on Mon Jul 7 13:30:33 2008 for Firefly by  doxygen 1.5.6