Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound 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:

[legend]
List of all members.

## Public Methods

| 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 Methods

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 = 0

## 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. Definition at line 44 of file OgrePlatformManager.cpp. References Ogre::DynLib::getSymbol(), mpfCreateConfigDialog, mpfCreateErrorDialog, mpfCreateInputReader, mpfCreateTimer, mpfDestroyConfigDialog, mpfDestroyErrorDialog, mpfDestroyInputReader, mpfDestroyTimer, and Ogre::String.

## 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.

Definition at line 71 of file OgrePlatformManager.cpp.

References mpfCreateConfigDialog.

Referenced by Ogre::Root::showConfigDialog().

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.

Definition at line 79 of file OgrePlatformManager.cpp.

References mpfCreateErrorDialog.

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.

Definition at line 87 of file OgrePlatformManager.cpp.

References mpfCreateInputReader.

Timer * Ogre::PlatformManager::createTimer | ( |  | ) |

| Creates a new Timer instance. Definition at line 113 of file OgrePlatformManager.cpp. References mpfCreateTimer. Referenced by Ogre::Root::Root().

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.

Definition at line 95 of file OgrePlatformManager.cpp.

References Ogre::dlg, and mpfDestroyConfigDialog.

Referenced by Ogre::Root::showConfigDialog().

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.

Definition at line 101 of file OgrePlatformManager.cpp.

References Ogre::dlg, and mpfDestroyErrorDialog.

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.

Definition at line 107 of file OgrePlatformManager.cpp.

References mpfDestroyInputReader.

void Ogre::PlatformManager::destroyTimer | ( | Timer * | timer | ) |

| Destroys an instance of a timer. Definition at line 121 of file OgrePlatformManager.cpp. References mpfDestroyTimer. Referenced by Ogre::Root::~Root().

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

Definition at line 39 of file OgrePlatformManager.cpp.

References Ogre::Singleton< PlatformManager >::ms_Singleton.

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

Definition at line 35 of file OgrePlatformManager.cpp.

References Ogre::Singleton< PlatformManager >::ms_Singleton.

## Member Data Documentation

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

| Definition at line 55 of file OgrePlatformManager.h. Referenced by createConfigDialog(), and PlatformManager().

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

| Definition at line 56 of file OgrePlatformManager.h. Referenced by createErrorDialog(), and PlatformManager().

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

| Definition at line 57 of file OgrePlatformManager.h. Referenced by createInputReader(), and PlatformManager().

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

| Definition at line 58 of file OgrePlatformManager.h. Referenced by createTimer(), and PlatformManager().

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

| Definition at line 60 of file OgrePlatformManager.h. Referenced by destroyConfigDialog(), and PlatformManager().

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

| Definition at line 61 of file OgrePlatformManager.h. Referenced by destroyErrorDialog(), and PlatformManager().

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

| Definition at line 62 of file OgrePlatformManager.h. Referenced by destroyInputReader(), and PlatformManager().

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

| Definition at line 63 of file OgrePlatformManager.h. Referenced by destroyTimer(), and PlatformManager().

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

| Definition at line 34 of file OgrePlatformManager.cpp. Referenced by getSingleton(), and getSingletonPtr().

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

- OgrePlatformManager.h
- OgrePlatformManager.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:25 2004