OGRE  1.9.0
OgreSceneManagerEnumerator.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2014 Torus Knot Software Ltd
8
9Permission is hereby granted, free of charge, to any person obtaining a copy
10of this software and associated documentation files (the "Software"), to deal
11in the Software without restriction, including without limitation the rights
12to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13copies of the Software, and to permit persons to whom the Software is
14furnished to do so, subject to the following conditions:
15
16The above copyright notice and this permission notice shall be included in
17all copies or substantial portions of the Software.
18
19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25THE SOFTWARE.
26-----------------------------------------------------------------------------
27*/
28#ifndef __SceneManagerEnumerator_H__
29#define __SceneManagerEnumerator_H__
30
31#include "OgrePrerequisites.h"
32
33#include "OgreSceneManager.h"
34#include "OgreSingleton.h"
36#include "OgreHeaderPrefix.h"
37
38namespace Ogre {
39
48 {
49 protected:
50 void initMetaData(void) const;
51 public:
58 };
61 {
62 public:
65 const String& getTypeName(void) const;
66 };
67
88 class _OgreExport SceneManagerEnumerator : public Singleton<SceneManagerEnumerator>, public SceneMgtAlloc
89 {
90 public:
95 private:
105 unsigned long mInstanceCreateCount;
108
109
110 public:
113
119
123
133 const SceneManagerMetaData* getMetaData(const String& typeName) const;
134
140
153 const String& instanceName = StringUtil::BLANK);
154
168 const String& instanceName = StringUtil::BLANK);
169
172
178
183
187
191
193 void shutdownAll(void);
226
227 };
228
232}
233
234#include "OgreHeaderSuffix.h"
235
236#endif
#define _OgreExport
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Factory for default scene manager.
SceneManager * createInstance(const String &instanceName)
Create a new instance of a SceneManager.
void initMetaData(void) const
Internal method to initialise the metadata, must be implemented.
void destroyInstance(SceneManager *instance)
Destroy an instance of a SceneManager.
static const String FACTORY_TYPE_NAME
Factory type name.
const String & getTypeName(void) const
Retrieve the type name of this scene manager.
DefaultSceneManager(const String &name)
Defines the functionality of a 3D API.
Enumerates the SceneManager classes available to applications.
const SceneManagerMetaData * getMetaData(const String &typeName) const
Get more information about a given type of SceneManager.
RenderSystem * mCurrentRenderSystem
Currently assigned render system.
vector< constSceneManagerMetaData * >::type MetaDataList
List of available scene manager types as meta data.
MetaDataIterator getMetaDataIterator(void) const
Iterate over all types of SceneManager available for construction, providing some information about e...
list< SceneManagerFactory * >::type Factories
Scene manager factories.
SceneManagerIterator getSceneManagerIterator(void)
Get an iterator over all the existing SceneManager instances.
map< String, SceneManager * >::type Instances
Scene manager instances, indexed by instance name.
DefaultSceneManagerFactory mDefaultFactory
Factory for default scene manager.
SceneManager * getSceneManager(const String &instanceName) const
Get an existing SceneManager instance that has already been created, identified by the instance name.
unsigned long mInstanceCreateCount
Count of creations for auto-naming.
static SceneManagerEnumerator * getSingletonPtr(void)
Override standard Singleton retrieval.
void destroySceneManager(SceneManager *sm)
Destroy an instance of a SceneManager.
MetaDataList mMetaDataList
Stored separately to allow iteration.
bool hasSceneManager(const String &instanceName) const
Identify if a SceneManager instance already exists.
SceneManager * createSceneManager(SceneTypeMask typeMask, const String &instanceName=StringUtil::BLANK)
Create a SceneManager instance based on scene type support.
ConstVectorIterator< MetaDataList > MetaDataIterator
SceneManager * createSceneManager(const String &typeName, const String &instanceName=StringUtil::BLANK)
Create a SceneManager instance of a given type.
static SceneManagerEnumerator & getSingleton(void)
Override standard Singleton retrieval.
void addFactory(SceneManagerFactory *fact)
Register a new SceneManagerFactory.
void removeFactory(SceneManagerFactory *fact)
Remove a SceneManagerFactory.
MapIterator< Instances > SceneManagerIterator
void setRenderSystem(RenderSystem *rs)
Notifies all SceneManagers of the destination rendering system.
void shutdownAll(void)
Utility method to control shutdown of the managers.
Class which will create instances of a given SceneManager.
Manages the organisation and rendering of a 'scene' i.e.
Reference-counted shared pointer, used for objects where implicit destruction is required.
Template class for creating single-instance global classes.
_StringBase String
Structure containing information about a scene manager.
std::list< T, A > type
std::map< K, V, P, A > type
std::vector< T, A > type