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 Member Functions | |||
DebrisManager () | |||
Class constructor. | |||
DebrisManager (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... | |||
Debris * | CreateDebris (const String &TypeName, const String &InstanceName, const NameValuePairMap &Params) | ||
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) | ||
Creates a new RigidDebris. More... | |||
RigidDebris * | CreateRigidDebris (const XML::Node &SelfRoot) | ||
Creates a new RigidDebris. More... | |||
SoftDebris * | CreateSoftDebris (const String &Name, const Real Mass) | ||
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... | |||
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 () | |||
Class constructor. | |||
virtual | ~WorldManager () | ||
Class destructor. | |||
virtual void | _SetWorld (World *Parent) | ||
Sets the world this manager belongs to.
| |||
virtual World * | GetWorld () const | ||
Gets the world this manager belongs to. More... | |||
virtual bool | 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... | |||
bool | IsInitialized () const | ||
Gets whether or not this manager has been initialized. More... | |||
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 | |
bool | 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 | |
bool | Initialized |
Simple bool 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 95 of file debrismanager.h.
Mezzanine::DebrisManager::DebrisManager | ( | XML::Node & | XMLNode) |
XML constructor.
XMLNode | The node of the xml document to construct from. |
Definition at line 92 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 258 of file debrismanager.cpp.
Debris * Mezzanine::DebrisManager::CreateDebris | ( | const String & | TypeName, |
const String & | InstanceName, | ||
const NameValuePairMap & | Params | ||
) |
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. |
Definition at line 165 of file debrismanager.cpp.
Creates a new Debris class from an XML node.
Definition at line 177 of file debrismanager.cpp.
RigidDebris * Mezzanine::DebrisManager::CreateRigidDebris | ( | const String & | Name, |
const Real | Mass | ||
) |
Creates a new RigidDebris.
Name | The name to be given to the new RigidDebris. |
Mass | The mass of the debris object. |
Definition at line 114 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 126 of file debrismanager.cpp.
SoftDebris * Mezzanine::DebrisManager::CreateSoftDebris | ( | const String & | Name, |
const Real | Mass | ||
) |
Creates a new SoftDebris.
Name | The name to be given to the new SoftDebris. |
Mass | The mass of the debris object. |
Definition at line 138 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 150 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 320 of file debrismanager.cpp.
|
virtual |
Destroys all Debris factories in this manager.
Definition at line 289 of file debrismanager.cpp.
|
virtual |
Destroys an Debris at the specified index.
Index | The index at which to destroy the Debris. |
Definition at line 209 of file debrismanager.cpp.
|
virtual |
Destroys an Debris.
ToBeDestroyed | The Debris to be destroyed. |
Definition at line 225 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 275 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 280 of file debrismanager.cpp.
Gets an Debris by Index.
Index | The index of the Debris you wish to retrieve. |
Definition at line 189 of file debrismanager.cpp.
Gets an Debris by Name.
Name | The name of the Debris you wish to retrieve. |
Definition at line 194 of file debrismanager.cpp.
DebrisUpdateWorkUnit * Mezzanine::DebrisManager::GetDebrisUpdateWork | ( | ) |
Gets the work unit responsible for updating Debriss stored by this manager.
Definition at line 331 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 340 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 337 of file debrismanager.cpp.
|
virtual |
Gets the number of Debriss stored in this manager.
Definition at line 204 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 304 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 299 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 263 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 268 of file debrismanager.cpp.
|
protected |
A map containing all registered Debris type factories.
Definition at line 115 of file debrismanager.h.
|
protected |
Container storing all Debris belonging to this manager.
Definition at line 118 of file debrismanager.h.
|
protected |
The work unit that updates all the Debris stored by this manager.
Definition at line 122 of file debrismanager.h.
|
protected |
Can be used for thread safe logging and other thread specific resources.
Definition at line 125 of file debrismanager.h.