OpenGUI::System Class Reference

#include <OpenGUI_System.h>

List of all members.


Detailed Description

The System object is the base of the OpenGUI project. It is responsible for initializing and destroying the various subsystems, and provides some functions to perform global activities, such as loading plugins and performing mass updates for all Screen objects.
[Singleton].

The construction and destruction of this class marks the initialization and shutdown of OpenGUI as a whole. You must have a valid System object before you can use most other subsystems of OpenGUI, and destruction of the System object will cause the destruction of all subsystems as well.

This class is implemented using the Singleton system. There can only be one System object instantiated at any point in time.


Public Member Functions

 System (Renderer *renderer, ResourceProvider *resourceProvider=NULL, const String &logFile="OpenGUI.log")
 The constructor for the System object.
 System (Renderer *renderer, ResourceProvider *resourceProvider, LogListener *logListener)
void loadPlugin (String filename)
 loads a plugin by filename
void unloadPlugin (String filename)
 unloads a plugin by filename
void update ()
 Updates all subsystems in the necessary order.
void updateScreens ()
 Updates all auto updating properties of all Screens.
void updateTime ()
 Updates the TimerManager using the built in time advancement code.
ResourceProvider_getResourceProvider ()
 Returns a pointer to the registered ResourceProvider. Apps really shouldn't need, or use, this.

Static Public Member Functions

static SystemgetSingleton (void)
 Retrieve the current singleton, if one exists. If none exists, this will cause an error.
static SystemgetSingletonPtr (void)
 Retrieve a pointer to the current singleton, if one exists. If none exists, this will return 0.


Constructor & Destructor Documentation

OpenGUI::System::System Renderer renderer,
ResourceProvider resourceProvider = NULL,
const String logFile = "OpenGUI.log"
 

The constructor for the System object.

Firstly, the System object is a singleton, so only one can exist in an application at any given point in time.

In order to create an instance of the System object, you must provide a pointer to a valid Renderer. The resourceProvider pointer is optional, as a generic implementation of that comes pre-built with the library.

Parameters:
renderer pointer to a valid Renderer object
resourceProvider pointer to a valid ResourceProvider object, or 0 to use the built in generic ResourceProvider
logFile name of the log file to write log message to. If "" is used, no log file will be created

OpenGUI::System::System Renderer renderer,
ResourceProvider resourceProvider,
LogListener logListener
 

As the other constructor except a log listener is passed in place of a log filename.

Parameters:
renderer pointer to a valid Renderer object
resourceProvider pointer to a valid ResourceProvider object, or 0 to use the built in generic ResourceProvider
logListener A valid pointer to a LogListener, or 0 for no logging.


Member Function Documentation

ResourceProvider* OpenGUI::System::_getResourceProvider  )  [inline]
 

Returns a pointer to the registered ResourceProvider. Apps really shouldn't need, or use, this.

Deprecated:
Ideally, no part of OpenGUI should need this.

System & OpenGUI::System::getSingleton void   )  [static]
 

Retrieve the current singleton, if one exists. If none exists, this will cause an error.

System * OpenGUI::System::getSingletonPtr void   )  [static]
 

Retrieve a pointer to the current singleton, if one exists. If none exists, this will return 0.

void OpenGUI::System::loadPlugin String  filename  ) 
 

loads a plugin by filename

void OpenGUI::System::unloadPlugin String  filename  ) 
 

unloads a plugin by filename

void OpenGUI::System::update  ) 
 

Updates all subsystems in the necessary order.

The following functions are called in the given order:

void OpenGUI::System::updateScreens  ) 
 

Updates all auto updating properties of all Screens.

The following functions are called in the given order:

void OpenGUI::System::updateTime  ) 
 

Updates the TimerManager using the built in time advancement code.


The documentation for this class was generated from the following files:
Copyright © 2006 OpenGUI | OpenGUI.SF.net
Generated: Sun Sep 9 02:00:22 2007