Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Static Public Attributes | 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 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

 AreaEffectManager (World *Creator)
 Class constructor. More...
 
 AreaEffectManager (World *Creator, const 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...
 
AreaEffectIterator BeginAreaEffect ()
 Gets an iterator to the first AreaEffect in this manager. More...
 
ConstAreaEffectIterator BeginAreaEffect () const
 Gets a const iterator to the first AreaEffect in this manager. More...
 
AreaEffectCreateAreaEffect (const String &TypeName, const String &InstanceName, const NameValuePairMap &Params, const Boole AddToWorld=true)
 Creates a new AreaEffect. More...
 
AreaEffectCreateAreaEffect (const XML::Node &SelfRoot)
 Creates a new AreaEffect class from an XML node. More...
 
FieldOfForceCreateFieldOfForce (const String &Name, const Boole AddToWorld=true)
 Creates a new FieldOfForce. More...
 
FieldOfForceCreateFieldOfForce (const String &Name, Physics::CollisionShape *AEShape, const Boole AddToWorld=true)
 Creates a new FieldOfForce. More...
 
FieldOfForceCreateFieldOfForce (const XML::Node &SelfRoot)
 Creates a new FieldOfForce. More...
 
GravityFieldCreateGravityField (const String &Name, const Boole AddToWorld=true)
 Creates a new GravityField. More...
 
GravityFieldCreateGravityField (const String &Name, Physics::CollisionShape *AEShape, const Boole AddToWorld=true)
 Creates a new GravityField. More...
 
GravityFieldCreateGravityField (const XML::Node &SelfRoot)
 Creates a new GravityField. More...
 
GravityWellCreateGravityWell (const String &Name, const Boole AddToWorld=true)
 Creates a new GravityWell. More...
 
GravityWellCreateGravityWell (const String &Name, Physics::CollisionShape *AEShape, const Boole AddToWorld=true)
 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...
 
AreaEffectIterator EndAreaEffect ()
 Gets an iterator to one passed the last AreaEffect in this manager. More...
 
ConstAreaEffectIterator EndAreaEffect () const
 Gets a const iterator to one passed the last AreaEffect 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 (World *Creator)
 Class constructor. More...
 
virtual ~WorldManager ()
 Class destructor.
 
virtual WorldGetWorld () 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 = "DefaultAreaEffectManager"
 A String containing the name of this manager implementation.
 
static const ManagerBase::ManagerType InterfaceType = ManagerBase::MT_AreaEffectManager
 A ManagerType enum value used to describe the type of interface/functionality this manager provides.
 

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
Boole 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
Boole Initialized
 Simple Boole 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 102 of file areaeffectmanager.h.

Constructor & Destructor Documentation

Mezzanine::AreaEffectManager::AreaEffectManager ( World Creator)

Class constructor.

Parameters
CreatorThe parent world that is creating the manager.

Definition at line 93 of file areaeffectmanager.cpp.

Mezzanine::AreaEffectManager::AreaEffectManager ( World Creator,
const XML::Node XMLNode 
)

XML constructor.

Parameters
CreatorThe parent world that is creating the manager.
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 105 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 368 of file areaeffectmanager.cpp.

AreaEffectManager::AreaEffectIterator Mezzanine::AreaEffectManager::BeginAreaEffect ( )

Gets an iterator to the first AreaEffect in this manager.

Returns
Returns an iterator to the first AreaEffect being stored by this manager.

Definition at line 353 of file areaeffectmanager.cpp.

AreaEffectManager::ConstAreaEffectIterator Mezzanine::AreaEffectManager::BeginAreaEffect ( ) const

Gets a const iterator to the first AreaEffect in this manager.

Returns
Returns a const iterator to the first AreaEffect being stored by this manager.

Definition at line 359 of file areaeffectmanager.cpp.

AreaEffect * Mezzanine::AreaEffectManager::CreateAreaEffect ( const String TypeName,
const String InstanceName,
const NameValuePairMap Params,
const Boole  AddToWorld = true 
)

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.
AddToWorldWether or not the new AreaEffect should be added to the world after it has been created.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 260 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 275 of file areaeffectmanager.cpp.

FieldOfForce * Mezzanine::AreaEffectManager::CreateFieldOfForce ( const String Name,
const Boole  AddToWorld = true 
)

Creates a new FieldOfForce.

Parameters
NameThe name to be given to the new FieldOfForce.
AddToWorldWether or not the new AreaEffect should be added to the world after it has been created.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 131 of file areaeffectmanager.cpp.

FieldOfForce * Mezzanine::AreaEffectManager::CreateFieldOfForce ( const String Name,
Physics::CollisionShape AEShape,
const Boole  AddToWorld = true 
)

Creates a new FieldOfForce.

Parameters
NameThe name to be given to the new FieldOfForce.
AEShapeA pointer to the Collision shape that will be applied to the new FieldOfForce.
AddToWorldWether or not the new AreaEffect should be added to the world after it has been created.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 146 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 161 of file areaeffectmanager.cpp.

GravityField * Mezzanine::AreaEffectManager::CreateGravityField ( const String Name,
const Boole  AddToWorld = true 
)

Creates a new GravityField.

Parameters
NameThe name to be given to the new GravityField.
AddToWorldWether or not the new AreaEffect should be added to the world after it has been created.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 173 of file areaeffectmanager.cpp.

GravityField * Mezzanine::AreaEffectManager::CreateGravityField ( const String Name,
Physics::CollisionShape AEShape,
const Boole  AddToWorld = true 
)

Creates a new GravityField.

Parameters
NameThe name to be given to the new GravityField.
AEShapeA pointer to the Collision shape that will be applied to the new GravityField.
AddToWorldWether or not the new AreaEffect should be added to the world after it has been created.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 188 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 203 of file areaeffectmanager.cpp.

GravityWell * Mezzanine::AreaEffectManager::CreateGravityWell ( const String Name,
const Boole  AddToWorld = true 
)

Creates a new GravityWell.

Parameters
NameThe name to be given to the new GravityWell.
AddToWorldWether or not the new AreaEffect should be added to the world after it has been created.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 215 of file areaeffectmanager.cpp.

GravityWell * Mezzanine::AreaEffectManager::CreateGravityWell ( const String Name,
Physics::CollisionShape AEShape,
const Boole  AddToWorld = true 
)

Creates a new GravityWell.

Parameters
NameThe name to be given to the new GravityWell.
AEShapeA pointer to the Collision shape that will be applied to the new GravityWell.
AddToWorldWether or not the new AreaEffect should be added to the world after it has been created.
Returns
Returns a pointer to the created AreaEffect.

Definition at line 230 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 245 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 446 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 399 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 307 of file areaeffectmanager.cpp.

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

Destroys an areaeffect.

Parameters
ToBeDestroyedThe areaeffect to be destroyed.

Definition at line 323 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 385 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 390 of file areaeffectmanager.cpp.

AreaEffectManager::AreaEffectIterator Mezzanine::AreaEffectManager::EndAreaEffect ( )

Gets an iterator to one passed the last AreaEffect in this manager.

Returns
Returns an iterator to one passed the last AreaEffect being stored by this manager.

Definition at line 356 of file areaeffectmanager.cpp.

AreaEffectManager::ConstAreaEffectIterator Mezzanine::AreaEffectManager::EndAreaEffect ( ) const

Gets a const iterator to one passed the last AreaEffect in this manager.

Returns
Returns a const iterator to one passed the last AreaEffect being stored by this manager.

Definition at line 362 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 287 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 292 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 457 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 466 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 463 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 302 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 423 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 409 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 373 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 378 of file areaeffectmanager.cpp.

Member Data Documentation

FactoryMap Mezzanine::AreaEffectManager::AreaEffectFactories
protected

A map containing all registered AreaEffect type factories.

Definition at line 127 of file areaeffectmanager.h.

AreaEffectContainer Mezzanine::AreaEffectManager::AreaEffects
protected

Container storing all AreaEffects belonging to this manager.

Definition at line 130 of file areaeffectmanager.h.

AreaEffectUpdateWorkUnit* Mezzanine::AreaEffectManager::AreaEffectUpdateWork
protected

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

Definition at line 134 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 137 of file areaeffectmanager.h.


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