Polycode::CoreServices Class Reference

Global services singleton. More...

Inherits Polycode::EventDispatcher.

List of all members.

Public Member Functions

RenderergetRenderer ()
 Returns the main renderer.
CoregetCore ()
 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.
MaterialManagergetMaterialManager ()
 Returns the material manager.
ScreenManagergetScreenManager ()
 Returns the screen manager.
SceneManager * getSceneManager ()
 Returns the scene manager.
TimerManager * getTimerManager ()
 Returns the timer manager.
TweenManager * getTweenManager ()
 Returns the tween manager.
ResourceManagergetResourceManager ()
 Returns the resource manager.
SoundManagergetSoundManager ()
 Returns the sound manager.
FontManagergetFontManager ()
 Returns the font manager.
ConfiggetConfig ()
 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 CoreServicesgetInstance ()
 Returns the singleton instance.

Detailed Description

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.


Member Function Documentation

Config * CoreServices::getConfig (  ) 

Returns the config.

The config loads and saves data to disk.

Returns:
Config manager.
See also:
Config
Core * CoreServices::getCore (  ) 

Returns the core.

Returns:
The core.
See also:
Core
FontManager * CoreServices::getFontManager (  ) 

Returns the font manager.

The font manager is responsible for loading and managing fonts.

Returns:
Font Manager
See also:
FontManager
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.

Returns:
Material manager.
See also:
MaterialManager
Renderer * CoreServices::getRenderer (  ) 

Returns the main renderer.

Returns:
The main renderer.
See also:
Renderer
ResourceManager * CoreServices::getResourceManager (  ) 

Returns the resource manager.

The resource manager is responsible for loading and unloading resources.

Returns:
Resource Manager
See also:
ResourceManager
SceneManager * CoreServices::getSceneManager (  ) 

Returns the scene manager.

The screen manager is responsible for maintaining and rendering 3D scenes.

Returns:
Scene Manager
See also:
SceneManager
void CoreServices::getScreenInfo ( int *  width,
int *  height,
int *  hz 
)

Provides the current width, height, and refresh rate of the screen.

Parameters:
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.

Returns:
Screen Manager
See also:
ScreenManager
SoundManager * CoreServices::getSoundManager (  ) 

Returns the sound manager.

The sound manager is responsible for loading and playing sounds.

Returns:
Sound Manager
See also:
SoundManager
TimerManager * CoreServices::getTimerManager (  ) 

Returns the timer manager.

The timer manager is responsible for updating timers in the framework.

Returns:
Timer Manager
See also:
TimerManager
TweenManager * CoreServices::getTweenManager (  ) 

Returns the tween manager.

The tween manager is responsible for updating animated tweens in the framework.

Returns:
Tween Manager
See also:
TweenManager
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.

See also:
EventDispatcher

Reimplemented from Polycode::EventHandler.

void CoreServices::installModule ( PolycodeModule *  module  ) 

Installs a plugin module at runtime.

Parameters:
module Plugin module to install. See PolygonModule for more details on modules.
See also:
PolycodeModule
Generated on Sat Aug 11 18:04:11 2012 for Polycode by  doxygen 1.6.3