A manager responsible for the storage and management of all areaeffects in use. More...
#include <areaeffectmanager.h>
Public Types | |
typedef std::vector< AreaEffect * > | AreaEffectContainer |
Basic container type for AreaEffect storage by this class. | |
typedef AreaEffectContainer::iterator | AreaEffectIterator |
Iterator type for AreaEffect instances stored by this class. | |
typedef AreaEffectContainer::const_iterator | ConstAreaEffectIterator |
Const Iterator type for AreaEffect instances stored by this class. | |
typedef FactoryMap::const_iterator | ConstFactoryIterator |
Const Iterator type for AreaEffectFactory instances stored by this class. | |
typedef FactoryMap::iterator | FactoryIterator |
Iterator type for AreaEffectFactory instances stored by this class. | |
typedef std::map< String, AreaEffectFactory * > | FactoryMap |
Basic container type for AreaEffectFactory storage by this class. | |
Public Member Functions | |||
AreaEffectManager () | |||
Class constructor. | |||
AreaEffectManager (XML::Node &XMLNode) | |||
XML constructor. More... | |||
virtual | ~AreaEffectManager () | ||
Class destructor. | |||
virtual void | AddAreaEffectFactory (AreaEffectFactory *ToBeAdded) | ||
Adds/registers a AreaEffect factory with this manager, allowing it to be constructed through this API. More... | |||
AreaEffect * | CreateAreaEffect (const String &TypeName, const String &InstanceName, const NameValuePairMap &Params) | ||
Creates a new AreaEffect. More... | |||
AreaEffect * | CreateAreaEffect (const XML::Node &SelfRoot) | ||
Creates a new AreaEffect class from an XML node. More... | |||
FieldOfForce * | CreateFieldOfForce (const String &Name) | ||
Creates a new FieldOfForce. More... | |||
FieldOfForce * | CreateFieldOfForce (const XML::Node &SelfRoot) | ||
Creates a new FieldOfForce. More... | |||
GravityField * | CreateGravityField (const String &Name) | ||
Creates a new GravityField. More... | |||
GravityField * | CreateGravityField (const XML::Node &SelfRoot) | ||
Creates a new GravityField. More... | |||
GravityWell * | CreateGravityWell (const String &Name) | ||
Creates a new GravityWell. More... | |||
GravityWell * | CreateGravityWell (const XML::Node &SelfRoot) | ||
Creates a new GravityWell. More... | |||
virtual void | Deinitialize () | ||
Removes this manager from any necessary configuration so it can be safely disposed of. More... | |||
virtual void | DestroyAllAreaEffectFactories () | ||
Destroys all AreaEffect factories in this manager. More... | |||
virtual void | DestroyAllAreaEffects () | ||
Destroys all actors currently within this manager. | |||
virtual void | DestroyAreaEffect (const Whole Index) | ||
Destroys an areaeffect at the specified index. More... | |||
virtual void | DestroyAreaEffect (AreaEffect *ToBeDestroyed) | ||
Destroys an areaeffect. More... | |||
virtual void | DestroyAreaEffectFactory (AreaEffectFactory *ToBeDestroyed) | ||
Removes and destroys a AreaEffect factory in this manager. More... | |||
virtual void | DestroyAreaEffectFactory (const String &ImplName) | ||
Removes and destroys a AreaEffect factory in this manager. More... | |||
virtual AreaEffect * | GetAreaEffect (const Whole Index) const | ||
Gets an AreaEffect by Index. More... | |||
virtual AreaEffect * | GetAreaEffect (const String &Name) const | ||
Gets an AreaEffect by Name. More... | |||
AreaEffectUpdateWorkUnit * | GetAreaEffectUpdateWork () | ||
Gets the work unit responsible for updating area effects 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 | GetNumAreaEffects () const | ||
Gets the number of actors stored in this manager. More... | |||
virtual void | Initialize () | ||
Configures this manager for use prior to entering the main loop. More... | |||
virtual void | MainLoopInitialize () | ||
Does all of the necessary configuration to prepare for the start of the main loop. | |||
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 | RemoveAreaEffectFactory (AreaEffectFactory *ToBeRemoved) | ||
Removes a AreaEffect factory from this manager. More... | |||
virtual void | RemoveAreaEffectFactory (const String &ImplName) | ||
Removes a AreaEffect 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 | AreaEffectFactories |
A map containing all registered AreaEffect type factories. More... | |
AreaEffectContainer | AreaEffects |
Container storing all AreaEffects belonging to this manager. More... | |
AreaEffectUpdateWorkUnit * | AreaEffectUpdateWork |
The work unit that updates all the actors 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 | AreaEffectUpdateWorkUnit |
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 areaeffects in use.
More or less Management point for a container of areaeffects to help keep them sorted.
Definition at line 96 of file areaeffectmanager.h.
Mezzanine::AreaEffectManager::AreaEffectManager | ( | XML::Node & | XMLNode) |
XML constructor.
XMLNode | The node of the xml document to construct from. |
Definition at line 100 of file areaeffectmanager.cpp.
|
virtual |
Adds/registers a AreaEffect factory with this manager, allowing it to be constructed through this API.
ToBeAdded | The AreaEffect factory to be added. |
Definition at line 293 of file areaeffectmanager.cpp.
AreaEffect * Mezzanine::AreaEffectManager::CreateAreaEffect | ( | const String & | TypeName, |
const String & | InstanceName, | ||
const NameValuePairMap & | Params | ||
) |
Creates a new AreaEffect.
TypeName | A string containing the name of the type of AreaEffect to be constructed. |
InstanceName | A string containing the name to be given to the created AreaEffect. |
Params | A container of additional parameters to be used for the construction of the new AreaEffect. |
Definition at line 200 of file areaeffectmanager.cpp.
AreaEffect * Mezzanine::AreaEffectManager::CreateAreaEffect | ( | const XML::Node & | SelfRoot) |
Creates a new AreaEffect class from an XML node.
Definition at line 212 of file areaeffectmanager.cpp.
FieldOfForce * Mezzanine::AreaEffectManager::CreateFieldOfForce | ( | const String & | Name) |
Creates a new FieldOfForce.
Name | The name to be given to the new FieldOfForce. |
Definition at line 125 of file areaeffectmanager.cpp.
FieldOfForce * Mezzanine::AreaEffectManager::CreateFieldOfForce | ( | const XML::Node & | SelfRoot) |
Creates a new FieldOfForce.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 137 of file areaeffectmanager.cpp.
GravityField * Mezzanine::AreaEffectManager::CreateGravityField | ( | const String & | Name) |
Creates a new GravityField.
Name | The name to be given to the new GravityField. |
Definition at line 149 of file areaeffectmanager.cpp.
GravityField * Mezzanine::AreaEffectManager::CreateGravityField | ( | const XML::Node & | SelfRoot) |
Creates a new GravityField.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 161 of file areaeffectmanager.cpp.
GravityWell * Mezzanine::AreaEffectManager::CreateGravityWell | ( | const String & | Name) |
Creates a new GravityWell.
Name | The name to be given to the new GravityWell. |
Definition at line 173 of file areaeffectmanager.cpp.
GravityWell * Mezzanine::AreaEffectManager::CreateGravityWell | ( | const XML::Node & | SelfRoot) |
Creates a new GravityWell.
SelfRoot | An XML::Node containing the data to populate this class with. |
Definition at line 185 of file areaeffectmanager.cpp.
|
virtual |
Removes this manager from any necessary configuration so it can be safely disposed of.
Implements Mezzanine::ManagerBase.
Definition at line 371 of file areaeffectmanager.cpp.
|
virtual |
Destroys all AreaEffect factories in this manager.
Definition at line 324 of file areaeffectmanager.cpp.
|
virtual |
Destroys an areaeffect at the specified index.
Index | The index at which to destroy the areaeffect. |
Definition at line 244 of file areaeffectmanager.cpp.
|
virtual |
Destroys an areaeffect.
ToBeDestroyed | The areaeffect to be destroyed. |
Definition at line 260 of file areaeffectmanager.cpp.
|
virtual |
Removes and destroys a AreaEffect factory in this manager.
ToBeDestroyed | A pointer to the AreaEffect factory that is to be removed and destroyed. |
Definition at line 310 of file areaeffectmanager.cpp.
|
virtual |
Removes and destroys a AreaEffect factory in this manager.
ImplName | The name of the AreaEffect implementation created by the factory to be removed and destroyed. |
Definition at line 315 of file areaeffectmanager.cpp.
|
virtual |
Gets an AreaEffect by Index.
Index | The index of the areaeffect you wish to retrieve. |
Definition at line 224 of file areaeffectmanager.cpp.
|
virtual |
Gets an AreaEffect by Name.
Name | The name of the areaeffect you wish to retrieve. |
Definition at line 229 of file areaeffectmanager.cpp.
AreaEffectUpdateWorkUnit * Mezzanine::AreaEffectManager::GetAreaEffectUpdateWork | ( | ) |
Gets the work unit responsible for updating area effects stored by this manager.
Definition at line 382 of file areaeffectmanager.cpp.
|
virtual |
This Allows any manager name to be sent to a stream. Primarily used for logging.
Implements Mezzanine::ManagerBase.
Definition at line 391 of file areaeffectmanager.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 388 of file areaeffectmanager.cpp.
|
virtual |
Gets the number of actors stored in this manager.
Definition at line 239 of file areaeffectmanager.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 348 of file areaeffectmanager.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 334 of file areaeffectmanager.cpp.
|
virtual |
Removes a AreaEffect factory from this manager.
ToBeRemoved | A pointer to the AreaEffect factory that is to be removed. |
Definition at line 298 of file areaeffectmanager.cpp.
|
virtual |
Removes a AreaEffect factory from this manager.
ImplName | The name of the AreaEffect implementation created by the factory to be removed. |
Definition at line 303 of file areaeffectmanager.cpp.
|
protected |
A map containing all registered AreaEffect type factories.
Definition at line 116 of file areaeffectmanager.h.
|
protected |
Container storing all AreaEffects belonging to this manager.
Definition at line 119 of file areaeffectmanager.h.
|
protected |
The work unit that updates all the actors stored by this manager.
Definition at line 123 of file areaeffectmanager.h.
|
protected |
Can be used for thread safe logging and other thread specific resources.
Definition at line 126 of file areaeffectmanager.h.