# Ogre::PlatformManager Class Reference

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

`#include <OgrePlatformManager.h>`

Inheritance diagram for Ogre::PlatformManager:

List of all members.

## Public Member Functions

| PlatformManager ()
| Default constructor.
ConfigDialog * | createConfigDialog ()
| Gets a new instance of a platform-specific config dialog.
void | destroyConfigDialog (ConfigDialog *dlg)
| Destroys an instance of a platform-specific config dialog.
ErrorDialog * | createErrorDialog ()
| Gets a new instance of a platform-specific config dialog.
void | destroyErrorDialog (ErrorDialog *dlg)
| Destroys an instance of a platform-specific error dialog.
InputReader * | createInputReader ()
| Gets a new instance of a platform-specific input reader.
void | destroyInputReader (InputReader *reader)
| Destroys an instance of a platform-specific input reader.
Timer * | createTimer ()
| Creates a new Timer instance.
void | destroyTimer (Timer *timer)
| Destroys an instance of a timer.

## Static Public Member Functions

PlatformManager & | getSingleton (void)
| Override standard Singleton retrieval.
PlatformManager * | getSingletonPtr (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

## Static Protected Attributes

PlatformManager * | ms_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 52 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 >.

## Member Data Documentation

DLL_CREATECONFIGDIALOG Ogre::PlatformManager::mpfCreateConfigDialog `[protected]`

| Definition at line 55 of file OgrePlatformManager.h.

DLL_CREATEERRORDIALOG Ogre::PlatformManager::mpfCreateErrorDialog `[protected]`

| Definition at line 56 of file OgrePlatformManager.h.

DLL_CREATEINPUTREADER Ogre::PlatformManager::mpfCreateInputReader `[protected]`

| Definition at line 57 of file OgrePlatformManager.h.

DLL_CREATETIMER Ogre::PlatformManager::mpfCreateTimer `[protected]`

| Definition at line 58 of file OgrePlatformManager.h.

DLL_DESTROYCONFIGDIALOG Ogre::PlatformManager::mpfDestroyConfigDialog `[protected]`

| Definition at line 60 of file OgrePlatformManager.h.

DLL_DESTROYERRORDIALOG Ogre::PlatformManager::mpfDestroyErrorDialog `[protected]`

| Definition at line 61 of file OgrePlatformManager.h.

DLL_DESTROYINPUTREADER Ogre::PlatformManager::mpfDestroyInputReader `[protected]`

| Definition at line 62 of file OgrePlatformManager.h.

DLL_DESTROYTIMER Ogre::PlatformManager::mpfDestroyTimer `[protected]`

| Definition at line 63 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:

- OgrePlatformManager.h

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 13:02:09 2006