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

# Ogre::ExternalTextureSourceManager Class Reference

Singleton Class which handles the registering and control of texture plugins. More...

`#include <OgreExternalTextureSourceManager.h>`

Inheritance diagram for Ogre::ExternalTextureSourceManager:

[legend]
List of all members.

## Public Methods

| ExternalTextureSourceManager ()
| Constructor.
| ~ExternalTextureSourceManager ()
| Destructor.
void | SetCurrentPlugIn (const String &sTexturePlugInType)
| ie.
ExternalTextureSource * | getCurrentPlugIn ()
| Returns currently selected plugin, may be null if none selected.
void | DestroyAdvancedTexture (const String &sTextureName)
| Destroys a texture created by one of the registered controllers.
ExternalTextureSource * | getExternalTextureSource (const String &sTexturePlugInType)
| Returns the VideoSystem which reistered itself with a specific name ("wideo"), or null if none.
void | setExternalTextureSource (const String &sTexturePlugInType, ExternalTextureSource *pTextureSystem)
| Called from VideoSystem plugin to register itself.

## Static Public Methods

ExternalTextureSourceManager & | getSingleton (void)
| Override standard Singleton retrieval.
ExternalTextureSourceManager * | getSingletonPtr (void)
| Override standard Singleton retrieval.

## Protected Types

typedef std::map< String, ExternalTextureSource * > | TextureSystemList

## Protected Attributes

ExternalTextureSource * | mpCurrExternalTextureSource
TextureSystemList | mTextureSystems

## Static Protected Attributes

ExternalTextureSourceManager * | ms_Singleton = 0

## Detailed Description

Singleton Class which handles the registering and control of texture plugins.

The plugins will be mostly controlled via a string interface.

Definition at line 45 of file OgreExternalTextureSourceManager.h.

## Member Typedef Documentation

typedef std::map< String, ExternalTextureSource*> Ogre::ExternalTextureSourceManager::TextureSystemList`[protected]`

| Definition at line 105 of file OgreExternalTextureSourceManager.h.

## Constructor & Destructor Documentation

Ogre::ExternalTextureSourceManager::ExternalTextureSourceManager | ( |  | ) |

| Constructor. Definition at line 55 of file OgreExternalTextureSourceManager.cpp. References mpCurrExternalTextureSource.

Ogre::ExternalTextureSourceManager::~ExternalTextureSourceManager | ( |  | ) |

| Destructor. Definition at line 61 of file OgreExternalTextureSourceManager.cpp. References mTextureSystems.

## Member Function Documentation

void Ogre::ExternalTextureSourceManager::DestroyAdvancedTexture | ( | const String & | sTextureName | ) |

| Destroys a texture created by one of the registered controllers. Definition at line 86 of file OgreExternalTextureSourceManager.cpp. References mTextureSystems, and Ogre::String.

ExternalTextureSource* Ogre::ExternalTextureSourceManager::getCurrentPlugIn | ( |  | ) |

| Returns currently selected plugin, may be null if none selected. Definition at line 57 of file OgreExternalTextureSourceManager.h.

ExternalTextureSource * Ogre::ExternalTextureSourceManager::getExternalTextureSource | ( | const String & | sTexturePlugInType | ) |

| Returns the VideoSystem which reistered itself with a specific name ("wideo"), or null if none. Definition at line 126 of file OgreExternalTextureSourceManager.cpp. References mTextureSystems, and Ogre::String.

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

Definition at line 48 of file OgreExternalTextureSourceManager.cpp.

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

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

Definition at line 44 of file OgreExternalTextureSourceManager.cpp.

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

void Ogre::ExternalTextureSourceManager::SetCurrentPlugIn | ( | const String & | sTexturePlugInType | ) |

| ie. "video", "effect", "generic", etc.. Definition at line 68 of file OgreExternalTextureSourceManager.cpp. References Ogre::ExternalTextureSource::Initialise(), mpCurrExternalTextureSource, mTextureSystems, and Ogre::String.

void Ogre::ExternalTextureSourceManager::setExternalTextureSource | ( | const String & | sTexturePlugInType,
|  | ExternalTextureSource * | pTextureSystem
| ) |

| Called from VideoSystem plugin to register itself. Definition at line 97 of file OgreExternalTextureSourceManager.cpp. References Ogre::ExternalTextureSource::getPlugInStringName(), mTextureSystems, and Ogre::String.

## Member Data Documentation

ExternalTextureSource* Ogre::ExternalTextureSourceManager::mpCurrExternalTextureSource`[protected]`

| Definition at line 102 of file OgreExternalTextureSourceManager.h. Referenced by ExternalTextureSourceManager(), and SetCurrentPlugIn().

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

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

TextureSystemList Ogre::ExternalTextureSourceManager::mTextureSystems`[protected]`

| Definition at line 106 of file OgreExternalTextureSourceManager.h. Referenced by DestroyAdvancedTexture(), getExternalTextureSource(), SetCurrentPlugIn(), setExternalTextureSource(), and ~ExternalTextureSourceManager().

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

- OgreExternalTextureSourceManager.h
- OgreExternalTextureSourceManager.cpp

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