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

Ogre::PlatformManager Class Reference

Class which manages the platform settings Ogre runs on. More...

#include <OgrePlatformManager.h>

Inheritance diagram for Ogre::PlatformManager:

Ogre::Singleton< PlatformManager > List of all members.

Public Member Functions

 PlatformManager ()
 Default constructor.

ConfigDialogcreateConfigDialog ()
 Gets a new instance of a platform-specific config dialog.

void destroyConfigDialog (ConfigDialog *dlg)
 Destroys an instance of a platform-specific config dialog.

ErrorDialogcreateErrorDialog ()
 Gets a new instance of a platform-specific config dialog.

void destroyErrorDialog (ErrorDialog *dlg)
 Destroys an instance of a platform-specific error dialog.

InputReadercreateInputReader ()
 Gets a new instance of a platform-specific input reader.

void destroyInputReader (InputReader *reader)
 Destroys an instance of a platform-specific input reader.

TimercreateTimer ()
 Creates a new Timer instance.

void destroyTimer (Timer *timer)
 Destroys an instance of a timer.

void messagePump (RenderWindow *rw)

Static Public Member Functions

PlatformManagergetSingleton (void)
 Override standard Singleton retrieval.

PlatformManagergetSingletonPtr (void)
 Override standard Singleton retrieval.


Protected Attributes

DLL_CREATECONFIGDIALOG mpfCreateConfigDialog
DLL_CREATEERRORDIALOG mpfCreateErrorDialog
DLL_CREATEINPUTREADER mpfCreateInputReader
DLL_CREATETIMER mpfCreateTimer
DLL_DESTROYCONFIGDIALOG mpfDestroyConfigDialog
DLL_DESTROYERRORDIALOG mpfDestroyErrorDialog
DLL_DESTROYINPUTREADER mpfDestroyInputReader
DLL_DESTROYTIMER mpfDestroyTimer
DLL_MESSAGEPUMP mpfMessagePump

Static Protected Attributes

PlatformManagerms_Singleton

Detailed Description

Class which manages the platform settings Ogre runs on.

Remarks:
Because Ogre is designed to be platform-independent, it dynamically loads a library containing all the platform-specific elements like dialogs etc.
This class manages that load and provides a simple interface to the platform.

Definition at line 54 of file OgrePlatformManager.h.


Constructor & Destructor Documentation

Ogre::PlatformManager::PlatformManager  ) 
 

Default constructor.


Member Function Documentation

ConfigDialog* Ogre::PlatformManager::createConfigDialog  ) 
 

Gets a new instance of a platform-specific config dialog.

Remarks:
The instance returned from this method will be a platform-specific subclass of ConfigDialog, and must be destroyed by the caller when required.

ErrorDialog* Ogre::PlatformManager::createErrorDialog  ) 
 

Gets a new instance of a platform-specific config dialog.

Remarks:
The instance returned from this method will be a platform-specific subclass of ErrorDialog, and must be destroyed by the caller when required.

InputReader* Ogre::PlatformManager::createInputReader  ) 
 

Gets a new instance of a platform-specific input reader.

Remarks:
The instance returned from this method will be a platform-specific subclass of InputReader, and must be destroyed by the caller when required.

Timer* Ogre::PlatformManager::createTimer  ) 
 

Creates a new Timer instance.

void Ogre::PlatformManager::destroyConfigDialog ConfigDialog dlg  ) 
 

Destroys an instance of a platform-specific config dialog.

Remarks:
Required since deletion of objects must be performed on the correct heap.

void Ogre::PlatformManager::destroyErrorDialog ErrorDialog dlg  ) 
 

Destroys an instance of a platform-specific error dialog.

Remarks:
Required since deletion of objects must be performed on the correct heap.

void Ogre::PlatformManager::destroyInputReader InputReader reader  ) 
 

Destroys an instance of a platform-specific input reader.

Remarks:
Required since deletion of objects must be performed on the correct heap.

void Ogre::PlatformManager::destroyTimer Timer timer  ) 
 

Destroys an instance of a timer.

PlatformManager& Ogre::PlatformManager::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 Ogre::Singleton< PlatformManager >.

PlatformManager* Ogre::PlatformManager::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 Ogre::Singleton< PlatformManager >.

void Ogre::PlatformManager::messagePump RenderWindow rw  ) 
 

Remarks:
Allows platform to provide Platform specific Event updating/dispatching per frame (ie. Win32 Message Pump) as called from Root::startRendering . If you are not using Root::startRendering, you can call this function yourself, or run your own event pump


Member Data Documentation

DLL_CREATECONFIGDIALOG Ogre::PlatformManager::mpfCreateConfigDialog [protected]
 

Definition at line 57 of file OgrePlatformManager.h.

DLL_CREATEERRORDIALOG Ogre::PlatformManager::mpfCreateErrorDialog [protected]
 

Definition at line 58 of file OgrePlatformManager.h.

DLL_CREATEINPUTREADER Ogre::PlatformManager::mpfCreateInputReader [protected]
 

Definition at line 59 of file OgrePlatformManager.h.

DLL_CREATETIMER Ogre::PlatformManager::mpfCreateTimer [protected]
 

Definition at line 60 of file OgrePlatformManager.h.

DLL_DESTROYCONFIGDIALOG Ogre::PlatformManager::mpfDestroyConfigDialog [protected]
 

Definition at line 62 of file OgrePlatformManager.h.

DLL_DESTROYERRORDIALOG Ogre::PlatformManager::mpfDestroyErrorDialog [protected]
 

Definition at line 63 of file OgrePlatformManager.h.

DLL_DESTROYINPUTREADER Ogre::PlatformManager::mpfDestroyInputReader [protected]
 

Definition at line 64 of file OgrePlatformManager.h.

DLL_DESTROYTIMER Ogre::PlatformManager::mpfDestroyTimer [protected]
 

Definition at line 65 of file OgrePlatformManager.h.

DLL_MESSAGEPUMP Ogre::PlatformManager::mpfMessagePump [protected]
 

Definition at line 67 of file OgrePlatformManager.h.

PlatformManager * Ogre::Singleton< PlatformManager >::ms_Singleton [static, protected, inherited]
 

Definition at line 54 of file OgreSingleton.h.


The documentation for this class was generated from the following file:

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:41:42 2006