A manager responsible for the storage and management of all Debris that exist in a world. More...
#include <debrismanager.h>
Public Types | |
typedef DebrisContainer::const_iterator | ConstDebrisIterator |
Const Iterator type for Debris instances stored by this class. | |
typedef FactoryMap::const_iterator | ConstFactoryIterator |
Const Iterator type for DebrisFactory instances stored by this class. | |
typedef std::vector< Debris * > | DebrisContainer |
Basic container type for Debris storage by this class. | |
typedef DebrisContainer::iterator | DebrisIterator |
Iterator type for Debris instances stored by this class. | |
typedef FactoryMap::iterator | FactoryIterator |
Iterator type for DebrisFactory instances stored by this class. | |
typedef std::map< String, DebrisFactory * > | FactoryMap |
Basic container type for DebrisFactory storage by this class. | |
Public Types inherited from Mezzanine::ManagerBase | |
enum | ManagerType { MT_Undefined = 0, MT_AudioManager = 1, MT_AnimationManager = 2, MT_CollisionShapeManager = 3, MT_CompositorManager = 4, MT_GraphicsManager = 5, MT_EventManager = 6, MT_InputManager = 7, MT_LogManager = 8, MT_MaterialManager = 9, MT_MeshManager = 10, MT_NetworkManager = 11, MT_ResourceManager = 12, MT_ScriptingManager = 13, MT_TextureManager = 14, MT_UIManager = 15, MT_ActorManager = 101, MT_AreaEffectManager = 102, MT_DebrisManager = 103, MT_PagingManager = 104, MT_PhysicsManager = 105, MT_SceneManager = 106, MT_SoundScapeManager = 107, MT_TerrainManager = 108, MT_VehicleManager = 109, MT_UserCreated = 512 } |
A listing of Manager Types. More... | |
Public Member Functions | |
DebrisManager (World *Creator) | |
Class constructor. More... | |
DebrisManager (World *Creator, const XML::Node &XMLNode) | |
XML constructor. More... | |
virtual | ~DebrisManager () |
Class destructor. | |
virtual void | AddDebrisFactory (DebrisFactory *ToBeAdded) |
Adds/registers a Debris factory with this manager, allowing it to be constructed through this API. More... | |
DebrisIterator | BeginDebris () |
Gets an iterator to the first Debris in this manager. More... | |
ConstDebrisIterator | BeginDebris () const |
Gets a const iterator to the first Debris in this manager. More... | |
Debris * | CreateDebris (const String &TypeName, const String &InstanceName, const NameValuePairMap &Params, const Boole AddToWorld=true) |
Creates a new Debris. More... | |
Debris * | CreateDebris (const XML::Node &SelfRoot) |
Creates a new Debris class from an XML node. More... | |
RigidDebris * | CreateRigidDebris (const String &Name, const Real Mass, const Boole AddToWorld=true) |
Creates a new RigidDebris. More... | |
RigidDebris * | CreateRigidDebris (const String &Name, const Real Mass, Graphics::Mesh *DebMesh, Physics::CollisionShape *DebShape, const Boole AddToWorld=true) |
Creates a new RigidDebris. More... | |
RigidDebris * | CreateRigidDebris (const XML::Node &SelfRoot) |
Creates a new RigidDebris. More... | |
SoftDebris * | CreateSoftDebris (const String &Name, const Real Mass, const Boole AddToWorld=true) |
Creates a new SoftDebris. More... | |
SoftDebris * | CreateSoftDebris (const XML::Node &SelfRoot) |
Creates a new SoftDebris. More... | |
virtual void | Deinitialize () |
Removes this manager from any necessary configuration so it can be safely disposed of. More... | |
virtual void | DestroyAllDebris () |
Destroys all Debriss currently within this manager. | |
virtual void | DestroyAllDebrisFactories () |
Destroys all Debris factories in this manager. More... | |
virtual void | DestroyDebris (const Whole Index) |
Destroys an Debris at the specified index. More... | |
virtual void | DestroyDebris (Debris *ToBeDestroyed) |
Destroys an Debris. More... | |
virtual void | DestroyDebrisFactory (DebrisFactory *ToBeDestroyed) |
Removes and destroys a Debris factory in this manager. More... | |
virtual void | DestroyDebrisFactory (const String &ImplName) |
Removes and destroys a Debris factory in this manager. More... | |
DebrisIterator | EndDebris () |
Gets an iterator to one passed the last Debris in this manager. More... | |
ConstDebrisIterator | EndDebris () const |
Gets a const iterator to one passed the last Debris in this manager. More... | |
virtual Debris * | GetDebris (const Whole Index) const |
Gets an Debris by Index. More... | |
virtual Debris * | GetDebris (const String &Name) const |
Gets an Debris by Name. More... | |
DebrisUpdateWorkUnit * | GetDebrisUpdateWork () |
Gets the work unit responsible for updating Debriss stored by this manager. More... | |
virtual String | GetImplementationTypeName () const |
This Allows any manager name to be sent to a stream. Primarily used for logging. More... | |
virtual ManagerType | GetInterfaceType () const |
This returns the type of this manager. More... | |
virtual Whole | GetNumDebris () const |
Gets the number of Debriss stored in this manager. More... | |
virtual void | Initialize () |
Configures this manager for use prior to entering the main loop. More... | |
virtual void | Pause (const UInt32 PL) |
Sets the pause state of this manager, or has no effect depending on the value passed in. More... | |
virtual void | RemoveDebrisFactory (DebrisFactory *ToBeRemoved) |
Removes a Debris factory from this manager. More... | |
virtual void | RemoveDebrisFactory (const String &ImplName) |
Removes a Debris factory from this manager. More... | |
Public Member Functions inherited from Mezzanine::WorldManager | |
WorldManager (World *Creator) | |
Class constructor. More... | |
virtual | ~WorldManager () |
Class destructor. | |
virtual World * | GetWorld () const |
Gets the world this manager belongs to. More... | |
virtual Boole | IsPaused () const |
Gets whether or not this manager is currently paused. More... | |
Public Member Functions inherited from Mezzanine::ManagerBase | |
ManagerBase () | |
Class constructor. | |
virtual | ~ManagerBase () |
Class destructor. | |
virtual String | GetInterfaceTypeAsString () const |
Gets a string of the interface type of this manager. More... | |
Boole | IsInitialized () const |
Gets whether or not this manager has been initialized. More... | |
Static Public Attributes | |
static const String | ImplementationName = "DefaultDebrisManager" |
A String containing the name of this manager implementation. | |
static const ManagerBase::ManagerType | InterfaceType = ManagerBase::MT_DebrisManager |
A ManagerType enum value used to describe the type of interface/functionality this manager provides. | |
Protected Attributes | |
FactoryMap | DebrisFactories |
A map containing all registered Debris type factories. More... | |
DebrisContainer | Debriss |
Container storing all Debris belonging to this manager. More... | |
DebrisUpdateWorkUnit * | DebrisUpdateWork |
The work unit that updates all the Debris stored by this manager. More... | |
Threading::DefaultThreadSpecificStorage::Type * | ThreadResources |
Can be used for thread safe logging and other thread specific resources. More... | |
Protected Attributes inherited from Mezzanine::WorldManager | |
Boole | OperationsPaused |
This stores whether or not processing for some or all objects in this manager has been paused. More... | |
World * | ParentWorld |
A pointer to the world that created this manager. More... | |
Protected Attributes inherited from Mezzanine::ManagerBase | |
Boole | Initialized |
Simple Boole indicating whether or not this manager has been initialized. More... | |
Entresol * | TheEntresol |
The actual pointer to the Entresol core class. More... | |
Friends | |
class | DebrisUpdateWorkUnit |
Additional Inherited Members | |
Static Public Member Functions inherited from Mezzanine::ManagerBase | |
static String | GetTypeAsString (const ManagerType &ManagerType) |
Gets the string form of the type of manager. More... | |
static ManagerType | GetTypeFromString (const String &ManagerName) |
Gets the type of manager requested from a string. More... | |
A manager responsible for the storage and management of all Debris that exist in a world.
More or less Management point for a container of Debris to help keep them sorted.
Definition at line 104 of file debrismanager.h.
Mezzanine::DebrisManager::DebrisManager | ( | World * | Creator | ) |
Class constructor.
Creator | The parent world that is creating the manager. |
Definition at line 88 of file debrismanager.cpp.
XML constructor.
Creator | The parent world that is creating the manager. |
XMLNode | The node of the xml document to construct from. |
Definition at line 97 of file debrismanager.cpp.
|
virtual |
Adds/registers a Debris factory with this manager, allowing it to be constructed through this API.
ToBeAdded | The Debris factory to be added. |
Definition at line 300 of file debrismanager.cpp.
DebrisManager::DebrisIterator Mezzanine::DebrisManager::BeginDebris | ( | ) |
Gets an iterator to the first Debris in this manager.
Definition at line 285 of file debrismanager.cpp.
DebrisManager::ConstDebrisIterator Mezzanine::DebrisManager::BeginDebris | ( | ) | const |
Gets a const iterator to the first Debris in this manager.
Definition at line 291 of file debrismanager.cpp.
Debris * Mezzanine::DebrisManager::CreateDebris | ( | const String & | TypeName, |
const String & | InstanceName, | ||
const NameValuePairMap & | Params, | ||
const Boole | AddToWorld = true |
||
) |
Creates a new Debris.
TypeName | A string containing the name of the type of Debris to be constructed. |
InstanceName | A string containing the name to be given to the created Debris. |
Params | A container of additional parameters to be used for the construction of the new Debris. |
AddToWorld | Wether or not the new Debris should be added to the world after it has been created. |
Definition at line 192 of file debrismanager.cpp.
Creates a new Debris class from an XML node.
Definition at line 207 of file debrismanager.cpp.
RigidDebris * Mezzanine::DebrisManager::CreateRigidDebris | ( | const String & | Name, |
const Real | Mass, | ||
const Boole | AddToWorld = true |
||
) |
Creates a new RigidDebris.
Name | The name to be given to the new RigidDebris. |
Mass | The mass of the debris object. |
AddToWorld | Wether or not the new Debris should be added to the world after it has been created. |
Definition at line 120 of file debrismanager.cpp.
RigidDebris * Mezzanine::DebrisManager::CreateRigidDebris | ( | const String & | Name, |
const Real | Mass, | ||
Graphics::Mesh * | DebMesh, | ||
Physics::CollisionShape * | DebShape, | ||
const Boole | AddToWorld = true |
||
) |
Creates a new RigidDebris.
Name | The name to be given to the new RigidDebris. |
Mass | The mass of the debris object. |
DebMesh | A pointer to the Graphics mesh that will be applied to the new RigidDebris. |
DebShape | A pointer to the Collision shape that will be applied to the new RigidDebris. |
AddToWorld | Wether or not the new Debris should be added to the world after it has been created. |
Definition at line 135 of file debrismanager.cpp.
RigidDebris * Mezzanine::DebrisManager::CreateRigidDebris | ( | const XML::Node & | SelfRoot | ) |
Creates a new RigidDebris.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 150 of file debrismanager.cpp.
SoftDebris * Mezzanine::DebrisManager::CreateSoftDebris | ( | const String & | Name, |
const Real | Mass, | ||
const Boole | AddToWorld = true |
||
) |
Creates a new SoftDebris.
Name | The name to be given to the new SoftDebris. |
Mass | The mass of the debris object. |
AddToWorld | Wether or not the new Debris should be added to the world after it has been created. |
Definition at line 162 of file debrismanager.cpp.
SoftDebris * Mezzanine::DebrisManager::CreateSoftDebris | ( | const XML::Node & | SelfRoot | ) |
Creates a new SoftDebris.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 177 of file debrismanager.cpp.
|
virtual |
Removes this manager from any necessary configuration so it can be safely disposed of.
Implements Mezzanine::ManagerBase.
Definition at line 361 of file debrismanager.cpp.
|
virtual |
Destroys all Debris factories in this manager.
Definition at line 331 of file debrismanager.cpp.
|
virtual |
Destroys an Debris at the specified index.
Index | The index at which to destroy the Debris. |
Definition at line 239 of file debrismanager.cpp.
|
virtual |
Destroys an Debris.
ToBeDestroyed | The Debris to be destroyed. |
Definition at line 255 of file debrismanager.cpp.
|
virtual |
Removes and destroys a Debris factory in this manager.
ToBeDestroyed | A pointer to the Debris factory that is to be removed and destroyed. |
Definition at line 317 of file debrismanager.cpp.
|
virtual |
Removes and destroys a Debris factory in this manager.
ImplName | The name of the Debris implementation created by the factory to be removed and destroyed. |
Definition at line 322 of file debrismanager.cpp.
DebrisManager::DebrisIterator Mezzanine::DebrisManager::EndDebris | ( | ) |
Gets an iterator to one passed the last Debris in this manager.
Definition at line 288 of file debrismanager.cpp.
DebrisManager::ConstDebrisIterator Mezzanine::DebrisManager::EndDebris | ( | ) | const |
Gets a const iterator to one passed the last Debris in this manager.
Definition at line 294 of file debrismanager.cpp.
Gets an Debris by Index.
Index | The index of the Debris you wish to retrieve. |
Definition at line 219 of file debrismanager.cpp.
Gets an Debris by Name.
Name | The name of the Debris you wish to retrieve. |
Definition at line 224 of file debrismanager.cpp.
DebrisUpdateWorkUnit * Mezzanine::DebrisManager::GetDebrisUpdateWork | ( | ) |
Gets the work unit responsible for updating Debriss stored by this manager.
Definition at line 371 of file debrismanager.cpp.
|
virtual |
This Allows any manager name to be sent to a stream. Primarily used for logging.
Implements Mezzanine::ManagerBase.
Definition at line 380 of file debrismanager.cpp.
|
virtual |
This returns the type of this manager.
This is intended to make using and casting from Manager base easier. With this is is possible to cast from ManagerBase to the correct Manager Type.
Implements Mezzanine::ManagerBase.
Definition at line 377 of file debrismanager.cpp.
|
virtual |
Gets the number of Debriss stored in this manager.
Definition at line 234 of file debrismanager.cpp.
|
virtual |
Configures this manager for use prior to entering the main loop.
If | this is called while no valid world is set, this will throw an "INVALID_STATE_EXCEPTION". |
Reimplemented from Mezzanine::WorldManager.
Definition at line 346 of file debrismanager.cpp.
|
virtual |
Sets the pause state of this manager, or has no effect depending on the value passed in.
PL | A bitfield describing the pause level being assigned to the parent world of this manager. |
Implements Mezzanine::WorldManager.
Definition at line 341 of file debrismanager.cpp.
|
virtual |
Removes a Debris factory from this manager.
ToBeRemoved | A pointer to the Debris factory that is to be removed. |
Definition at line 305 of file debrismanager.cpp.
|
virtual |
Removes a Debris factory from this manager.
ImplName | The name of the Debris implementation created by the factory to be removed. |
Definition at line 310 of file debrismanager.cpp.
|
protected |
A map containing all registered Debris type factories.
Definition at line 129 of file debrismanager.h.
|
protected |
Container storing all Debris belonging to this manager.
Definition at line 132 of file debrismanager.h.
|
protected |
The work unit that updates all the Debris stored by this manager.
Definition at line 136 of file debrismanager.h.
|
protected |
Can be used for thread safe logging and other thread specific resources.
Definition at line 139 of file debrismanager.h.