MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
Mezzanine::AreaEffectManager Class Reference

A manager responsible for the storage and management of all areaeffects in use. More...

#include <areaeffectmanager.h>

+ Inheritance diagram for Mezzanine::AreaEffectManager:
+ Collaboration diagram for Mezzanine::AreaEffectManager:

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...
 
AreaEffectCreateAreaEffect (const String &TypeName, const String &InstanceName, const NameValuePairMap &Params)
 Creates a new AreaEffect. More...
 
AreaEffectCreateAreaEffect (const XML::Node &SelfRoot)
 Creates a new AreaEffect class from an XML node. More...
 
FieldOfForceCreateFieldOfForce (const String &Name)
 Creates a new FieldOfForce. More...
 
FieldOfForceCreateFieldOfForce (const XML::Node &SelfRoot)
 Creates a new FieldOfForce. More...
 
GravityFieldCreateGravityField (const String &Name)
 Creates a new GravityField. More...
 
GravityFieldCreateGravityField (const XML::Node &SelfRoot)
 Creates a new GravityField. More...
 
GravityWellCreateGravityWell (const String &Name)
 Creates a new GravityWell. More...
 
GravityWellCreateGravityWell (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 AreaEffectGetAreaEffect (const Whole Index) const
 Gets an AreaEffect by Index. More...
 
virtual AreaEffectGetAreaEffect (const String &Name) const
 Gets an AreaEffect by Name. More...
 
AreaEffectUpdateWorkUnitGetAreaEffectUpdateWork ()
 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.

Exceptions
Ifthis manager is already initialized, this method will throw an "INVALID_STATE_EXCEPTION".
More...
 
virtual WorldGetWorld () 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...
 
AreaEffectUpdateWorkUnitAreaEffectUpdateWork
 The work unit that updates all the actors stored by this manager. More...
 
Threading::DefaultThreadSpecificStorage::TypeThreadResources
 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...
 
WorldParentWorld
 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...
 
EntresolTheEntresol
 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

Mezzanine::AreaEffectManager::AreaEffectManager ( XML::Node XMLNode)

XML constructor.

Parameters
XMLNodeThe node of the xml document to construct from.
Todo:
This class currently doesn't initialize anything from XML, if that changes this constructor needs to be expanded.

Definition at line 100 of file areaeffectmanager.cpp.

Member Function Documentation

void Mezzanine::AreaEffectManager::AddAreaEffectFactory ( AreaEffectFactory ToBeAdded)
virtual

Adds/registers a AreaEffect factory with this manager, allowing it to be constructed through this API.

Parameters
ToBeAddedThe 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.

Parameters
TypeNameA string containing the name of the type of AreaEffect to be constructed.
InstanceNameA string containing the name to be given to the created AreaEffect.
ParamsA container of additional parameters to be used for the construction of the new AreaEffect.
Returns
Returns a pointer to the created 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.

Remarks
This is mostly useful for deserialization.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 212 of file areaeffectmanager.cpp.

FieldOfForce * Mezzanine::AreaEffectManager::CreateFieldOfForce ( const String Name)

Creates a new FieldOfForce.

Parameters
NameThe name to be given to the new FieldOfForce.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 125 of file areaeffectmanager.cpp.

FieldOfForce * Mezzanine::AreaEffectManager::CreateFieldOfForce ( const XML::Node SelfRoot)

Creates a new FieldOfForce.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 137 of file areaeffectmanager.cpp.

GravityField * Mezzanine::AreaEffectManager::CreateGravityField ( const String Name)

Creates a new GravityField.

Parameters
NameThe name to be given to the new GravityField.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 149 of file areaeffectmanager.cpp.

GravityField * Mezzanine::AreaEffectManager::CreateGravityField ( const XML::Node SelfRoot)

Creates a new GravityField.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 161 of file areaeffectmanager.cpp.

GravityWell * Mezzanine::AreaEffectManager::CreateGravityWell ( const String Name)

Creates a new GravityWell.

Parameters
NameThe name to be given to the new GravityWell.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 173 of file areaeffectmanager.cpp.

GravityWell * Mezzanine::AreaEffectManager::CreateGravityWell ( const XML::Node SelfRoot)

Creates a new GravityWell.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 185 of file areaeffectmanager.cpp.

void Mezzanine::AreaEffectManager::Deinitialize ( )
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.

void Mezzanine::AreaEffectManager::DestroyAllAreaEffectFactories ( )
virtual

Destroys all AreaEffect factories in this manager.

Warning
The destruction of AreaEffect factories should only be done after all the AreaEffects have been destroyed, otherwise this will cause an exception.

Definition at line 324 of file areaeffectmanager.cpp.

void Mezzanine::AreaEffectManager::DestroyAreaEffect ( const Whole  Index)
virtual

Destroys an areaeffect at the specified index.

Parameters
IndexThe index at which to destroy the areaeffect.

Definition at line 244 of file areaeffectmanager.cpp.

void Mezzanine::AreaEffectManager::DestroyAreaEffect ( AreaEffect ToBeDestroyed)
virtual

Destroys an areaeffect.

Parameters
ToBeDestroyedThe areaeffect to be destroyed.

Definition at line 260 of file areaeffectmanager.cpp.

void Mezzanine::AreaEffectManager::DestroyAreaEffectFactory ( AreaEffectFactory ToBeDestroyed)
virtual

Removes and destroys a AreaEffect factory in this manager.

Parameters
ToBeDestroyedA pointer to the AreaEffect factory that is to be removed and destroyed.

Definition at line 310 of file areaeffectmanager.cpp.

void Mezzanine::AreaEffectManager::DestroyAreaEffectFactory ( const String ImplName)
virtual

Removes and destroys a AreaEffect factory in this manager.

Parameters
ImplNameThe name of the AreaEffect implementation created by the factory to be removed and destroyed.

Definition at line 315 of file areaeffectmanager.cpp.

AreaEffect * Mezzanine::AreaEffectManager::GetAreaEffect ( const Whole  Index) const
virtual

Gets an AreaEffect by Index.

Parameters
IndexThe index of the areaeffect you wish to retrieve.
Returns
Returns a pointer to the areaeffect at the specified index.

Definition at line 224 of file areaeffectmanager.cpp.

AreaEffect * Mezzanine::AreaEffectManager::GetAreaEffect ( const String Name) const
virtual

Gets an AreaEffect by Name.

Parameters
NameThe name of the areaeffect you wish to retrieve.
Returns
Returns a pointer to the areaeffect of the specified name.

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.

Returns
Returns a pointer to the AreaEffectUpdateWorkUnit used by this manager.

Definition at line 382 of file areaeffectmanager.cpp.

String Mezzanine::AreaEffectManager::GetImplementationTypeName ( ) const
virtual

This Allows any manager name to be sent to a stream. Primarily used for logging.

Returns
This returns a String that contains the name.

Implements Mezzanine::ManagerBase.

Definition at line 391 of file areaeffectmanager.cpp.

ManagerBase::ManagerType Mezzanine::AreaEffectManager::GetInterfaceType ( ) const
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.

Returns
This returns a ManagerTypeName to identify what this can be safely cast to.

Implements Mezzanine::ManagerBase.

Definition at line 388 of file areaeffectmanager.cpp.

Whole Mezzanine::AreaEffectManager::GetNumAreaEffects ( ) const
virtual

Gets the number of actors stored in this manager.

Returns
Returns a whole representing the current areaeffect count.

Definition at line 239 of file areaeffectmanager.cpp.

void Mezzanine::AreaEffectManager::Initialize ( )
virtual

Configures this manager for use prior to entering the main loop.

Exceptions
Ifthis 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.

void Mezzanine::AreaEffectManager::Pause ( const UInt32  PL)
virtual

Sets the pause state of this manager, or has no effect depending on the value passed in.

Parameters
PLA 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.

void Mezzanine::AreaEffectManager::RemoveAreaEffectFactory ( AreaEffectFactory ToBeRemoved)
virtual

Removes a AreaEffect factory from this manager.

Parameters
ToBeRemovedA pointer to the AreaEffect factory that is to be removed.

Definition at line 298 of file areaeffectmanager.cpp.

void Mezzanine::AreaEffectManager::RemoveAreaEffectFactory ( const String ImplName)
virtual

Removes a AreaEffect factory from this manager.

Parameters
ImplNameThe name of the AreaEffect implementation created by the factory to be removed.

Definition at line 303 of file areaeffectmanager.cpp.

Member Data Documentation

FactoryMap Mezzanine::AreaEffectManager::AreaEffectFactories
protected

A map containing all registered AreaEffect type factories.

Definition at line 116 of file areaeffectmanager.h.

AreaEffectContainer Mezzanine::AreaEffectManager::AreaEffects
protected

Container storing all AreaEffects belonging to this manager.

Definition at line 119 of file areaeffectmanager.h.

AreaEffectUpdateWorkUnit* Mezzanine::AreaEffectManager::AreaEffectUpdateWork
protected

The work unit that updates all the actors stored by this manager.

Definition at line 123 of file areaeffectmanager.h.

Threading::DefaultThreadSpecificStorage::Type* Mezzanine::AreaEffectManager::ThreadResources
protected

Can be used for thread safe logging and other thread specific resources.

Definition at line 126 of file areaeffectmanager.h.


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