Polycode
|
Global services singleton. More...
Inherits Polycode::EventDispatcher.
Public Member Functions | |
Renderer * | getRenderer () |
Returns the main renderer. | |
Core * | getCore () |
Returns the core. | |
void | handleEvent (Event *event) |
This method gets called by an EventDispatcher that the handler is listening to if the dispatching event's code matches the code that handler is listening for. | |
void | installModule (PolycodeModule *module) |
Installs a plugin module at runtime. | |
MaterialManager * | getMaterialManager () |
Returns the material manager. | |
ScreenManager * | getScreenManager () |
Returns the screen manager. | |
SceneManager * | getSceneManager () |
Returns the scene manager. | |
TimerManager * | getTimerManager () |
Returns the timer manager. | |
TweenManager * | getTweenManager () |
Returns the tween manager. | |
ResourceManager * | getResourceManager () |
Returns the resource manager. | |
SoundManager * | getSoundManager () |
Returns the sound manager. | |
FontManager * | getFontManager () |
Returns the font manager. | |
Config * | getConfig () |
Returns the config. | |
void | getScreenInfo (int *width, int *height, int *hz) |
Provides the current width, height, and refresh rate of the screen. | |
Static Public Member Functions | |
static CoreServices * | getInstance () |
Returns the singleton instance. |
Global services singleton.
CoreServices instantiates and provides global Singleton access to all of the main manager classes in Polycode as well as the Renderer and Config classes.
Config * CoreServices::getConfig | ( | ) |
FontManager * CoreServices::getFontManager | ( | ) |
Returns the font manager.
The font manager is responsible for loading and managing fonts.
CoreServices * CoreServices::getInstance | ( | ) | [static] |
Returns the singleton instance.
NOTE: The singleton instance is unique to each thread and currently Polycode does not support multithreaded access to the core services. The reason for this is being able to run multiple cores in the same application and still have global singleton access to these services.
MaterialManager * CoreServices::getMaterialManager | ( | ) |
Returns the material manager.
The material manager is responsible for loading and managing textures, shaders and materials.
Renderer * CoreServices::getRenderer | ( | ) |
ResourceManager * CoreServices::getResourceManager | ( | ) |
Returns the resource manager.
The resource manager is responsible for loading and unloading resources.
SceneManager * CoreServices::getSceneManager | ( | ) |
Returns the scene manager.
The screen manager is responsible for maintaining and rendering 3D scenes.
void CoreServices::getScreenInfo | ( | int * | width, |
int * | height, | ||
int * | hz | ||
) |
Provides the current width, height, and refresh rate of the screen.
width | If non-NULL, current screen width will be written here (or 0 if unknown). |
hight | If non-NULL, current screen height will be written here (or 0 if unknown). |
hz | If non-NULL, current screen refresh rate will be written here (or 0 if unknown). |
ScreenManager * CoreServices::getScreenManager | ( | ) |
Returns the screen manager.
The screen manager is responsible for maintaining and rendering 2D screens.
SoundManager * CoreServices::getSoundManager | ( | ) |
Returns the sound manager.
The sound manager is responsible for loading and playing sounds.
TimerManager * CoreServices::getTimerManager | ( | ) |
Returns the timer manager.
The timer manager is responsible for updating timers in the framework.
TweenManager * CoreServices::getTweenManager | ( | ) |
Returns the tween manager.
The tween manager is responsible for updating animated tweens in the framework.
void CoreServices::handleEvent | ( | Event * | event | ) | [virtual] |
This method gets called by an EventDispatcher that the handler is listening to if the dispatching event's code matches the code that handler is listening for.
Typically, you subclass EventHandler and implement the handleEvent method to handle specific events.
Reimplemented from Polycode::EventHandler.
void CoreServices::installModule | ( | PolycodeModule * | module | ) |
Installs a plugin module at runtime.
module | Plugin module to install. See PolygonModule for more details on modules. |