Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Application Class Reference

Application class. More...

#include <Application.h>

Inherited by GLApplication.

Inheritance diagram for Application:

Inheritance graph
[legend]
Collaboration diagram for Application:

Collaboration graph
[legend]
List of all members.

Public Methods

 Application ()
 Default constructor. More...

virtual ~Application ()
 Destructor. More...

virtual bool init (int argc, char *argv[])
 Initialize method. More...

virtual int start ()=0
 Runs the application.


Static Public Methods

Application * getApplication ()
 Returns the singleton instance.


Detailed Description

Application class.

A singleton class representing an application. Inheriting classes must implement start().

Note:
Class MT-safe.


Constructor & Destructor Documentation

Application::Application  
 

Default constructor.

Creates an application instance and stores a reference to the single instance.

Precondition:
No application instance is created yet.
Postcondition:
This is now the singleton Application instance.
Exceptions:
runtime_error  an application is already defined

Application::~Application   [virtual]
 

Destructor.

Clears the reference to the single instance.

Postcondition:
The singleton instance is destoyed.


Member Function Documentation

bool Application::init int    argc,
char *    argv[]
[virtual]
 

Initialize method.

Initializes the Application. When init returns true the application will be started.

Parameters:
argc  the number of arguments in argv.
argv  array of string argument from the command line.
Returns:
always true.


The documentation for this class was generated from the following files:
This documentation was generated using doxygen. If you have any comments or additions please mail me.