Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

peon::EngineCore Class Reference

This is our main entry object for the Peon library. More...

#include <EngineCore.h>

Inheritance diagram for peon::EngineCore:

peon::ISingleton< EngineCore > List of all members.

Public Member Functions

 EngineCore ()
 Constructor.
 ~EngineCore ()
 Destructor.
bool loadEngine (const String &strWindowTitle, const String &strIniConfig)
 This method loads and initializes the subsystems of the Peon library...audio, video, input and network.
void unloadEngine ()
 This method unloads and frees up every allocated subsystem.
int runEngine ()
 This puts the Peon engine into an endless cycle.
bool setApplication (IApplication *pApplication)
 This.
SceneRenderergetRenderer ()
 This method is just an accessor for our SceneRenderer instance.
IApplicationgetApplication ()
 This method is an accessor to grab the IApplication instance IApplication* - our IApplication instance.

Static Public Member Functions

static EngineCoregetSingleton (void)
 Override standard Singleton retrieval.
static EngineCoregetSingletonPtr (void)
 Override standard Singleton retrieval.

Public Attributes

IniConfigReaderm_pConfig
 Handle to our IniConfigReader instance.
IApplicationm_pApplication
 Handle to our IApplication instance.
SceneRendererm_pVideoDevice
 Handle to our Renderer instance for rendering scene geometry.
Timer m_oTimer
 Our Timer object which encapsulates some system time calls.
float m_fps
 The frames per second of our rendering loop.

Protected Member Functions

void updateFPS ()
 This method is responsible for updating the frame rate counter.

Detailed Description

This is our main entry object for the Peon library.

This object is responsible for kicking off a main window that we can draw to, along with a lot of the core subsystems involved in the engine.


Member Function Documentation

SceneRenderer* peon::EngineCore::getRenderer  )  [inline]
 

This method is just an accessor for our SceneRenderer instance.

Returns:
SceneRenderer* - our renderer

static EngineCore& peon::EngineCore::getSingleton void   )  [static]
 

Override standard Singleton retrieval.

Remarks:
Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.
This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

Reimplemented from peon::ISingleton< EngineCore >.

static EngineCore* peon::EngineCore::getSingletonPtr void   )  [static]
 

Override standard Singleton retrieval.

Remarks:
Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll.
This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.

Reimplemented from peon::ISingleton< EngineCore >.

bool peon::EngineCore::loadEngine const String &  strWindowTitle,
const String &  strIniConfig
 

This method loads and initializes the subsystems of the Peon library...audio, video, input and network.

Parameters:
strWindowTitle - our window title
strIniConfig - path to the INI Configuration information
Returns:
bool - false if anything failed

int peon::EngineCore::runEngine  ) 
 

This puts the Peon engine into an endless cycle.

Our "main loop" for the game.

Returns:
int - negative value if anything went wrong

bool peon::EngineCore::setApplication IApplication pApplication  ) 
 

This.

Returns:
bool -


The documentation for this class was generated from the following file:
Generated on Thu Dec 1 01:55:41 2005 for Peon by  doxygen 1.4.1