A manager responsible for the storage and management of all actors that exist in a world. More...
#include <actormanager.h>
Public Types | |
typedef std::vector< Actor * > | ActorContainer |
Basic container type for Actor storage by this class. | |
typedef ActorContainer::iterator | ActorIterator |
Iterator type for Actor instances stored by this class. | |
typedef ActorContainer::const_iterator | ConstActorIterator |
Const Iterator type for Actor instances stored by this class. | |
typedef FactoryMap::const_iterator | ConstFactoryIterator |
Const Iterator type for ActorFactory instances stored by this class. | |
typedef FactoryMap::iterator | FactoryIterator |
Iterator type for ActorFactory instances stored by this class. | |
typedef std::map< String, ActorFactory * > | FactoryMap |
Basic container type for ActorFactory 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 | |
ActorManager (World *Creator) | |
Class constructor. More... | |
ActorManager (World *Creator, const XML::Node &XMLNode) | |
XML constructor. More... | |
virtual | ~ActorManager () |
Class destructor. | |
virtual void | AddActorFactory (ActorFactory *ToBeAdded) |
Adds/registers a Actor factory with this manager, allowing it to be constructed through this API. More... | |
ActorIterator | BeginActor () |
Gets an iterator to the first Actor in this manager. More... | |
ConstActorIterator | BeginActor () const |
Gets a const iterator to the first Actor in this manager. More... | |
Actor * | CreateActor (const String &TypeName, const String &InstanceName, const NameValuePairMap &Params) |
Creates a new Actor. More... | |
Actor * | CreateActor (const XML::Node &SelfRoot) |
Creates a new Actor class from an XML node. More... | |
virtual void | Deinitialize () |
Removes this manager from any necessary configuration so it can be safely disposed of. More... | |
virtual void | DestroyActor (const Whole Index) |
Destroys an Actor at the specified index. More... | |
virtual void | DestroyActor (Actor *ToBeDestroyed) |
Destroys an Actor. More... | |
virtual void | DestroyActorFactory (ActorFactory *ToBeDestroyed) |
Removes and destroys a Actor factory in this manager. More... | |
virtual void | DestroyActorFactory (const String &ImplName) |
Removes and destroys a Actor factory in this manager. More... | |
virtual void | DestroyAllActorFactories () |
Destroys all Actor factories in this manager. More... | |
virtual void | DestroyAllActors () |
Destroys all Actors currently within this manager. | |
ActorIterator | EndActor () |
Gets an iterator to one passed the last Actor in this manager. More... | |
ConstActorIterator | EndActor () const |
Gets a const iterator to one passed the last Actor in this manager. More... | |
virtual Actor * | GetActor (const Whole Index) const |
Gets an Actor by Index. More... | |
virtual Actor * | GetActor (const String &Name) const |
Gets an Actor by Name. More... | |
ActorUpdateWorkUnit * | GetActorUpdateWork () |
Gets the work unit responsible for updating actors 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 | GetNumActors () 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 | Pause (const UInt32 PL) |
Sets the pause state of this manager, or has no effect depending on the value passed in. More... | |
virtual void | RemoveActorFactory (ActorFactory *ToBeRemoved) |
Removes a Actor factory from this manager. More... | |
virtual void | RemoveActorFactory (const String &ImplName) |
Removes a Actor 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 = "DefaultActorManager" |
A String containing the name of this manager implementation. | |
static const ManagerBase::ManagerType | InterfaceType = ManagerBase::MT_ActorManager |
A ManagerType enum value used to describe the type of interface/functionality this manager provides. | |
Protected Attributes | |
FactoryMap | ActorFactories |
A map containing all registered Actor type factories. More... | |
ActorContainer | Actors |
Container storing all Actors belonging to this manager. More... | |
ActorUpdateWorkUnit * | ActorUpdateWork |
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 | |
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 | ActorUpdateWorkUnit |
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 actors that exist in a world.
More or less Management point for a container of actors to help keep them sorted.
Definition at line 94 of file actormanager.h.
Mezzanine::ActorManager::ActorManager | ( | World * | Creator | ) |
Class constructor.
Creator | The parent world that is creating the manager. |
Definition at line 86 of file actormanager.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 94 of file actormanager.cpp.
|
virtual |
Adds/registers a Actor factory with this manager, allowing it to be constructed through this API.
ToBeAdded | The Actor factory to be added. |
Definition at line 223 of file actormanager.cpp.
ActorManager::ActorIterator Mezzanine::ActorManager::BeginActor | ( | ) |
Gets an iterator to the first Actor in this manager.
Definition at line 208 of file actormanager.cpp.
ActorManager::ConstActorIterator Mezzanine::ActorManager::BeginActor | ( | ) | const |
Gets a const iterator to the first Actor in this manager.
Definition at line 214 of file actormanager.cpp.
Actor * Mezzanine::ActorManager::CreateActor | ( | const String & | TypeName, |
const String & | InstanceName, | ||
const NameValuePairMap & | Params | ||
) |
Creates a new Actor.
TypeName | A string containing the name of the type of Actor to be constructed. |
InstanceName | A string containing the name to be given to the created Actor. |
Params | A container of additional parameters to be used for the construction of the new Actor. |
Definition at line 118 of file actormanager.cpp.
Creates a new Actor class from an XML node.
Definition at line 130 of file actormanager.cpp.
|
virtual |
Removes this manager from any necessary configuration so it can be safely disposed of.
Implements Mezzanine::ManagerBase.
Definition at line 285 of file actormanager.cpp.
|
virtual |
Destroys an Actor at the specified index.
Index | The index at which to destroy the Actor. |
Definition at line 162 of file actormanager.cpp.
|
virtual |
Destroys an Actor.
ToBeDestroyed | The Actor to be destroyed. |
Definition at line 178 of file actormanager.cpp.
|
virtual |
Removes and destroys a Actor factory in this manager.
ToBeDestroyed | A pointer to the Actor factory that is to be removed and destroyed. |
Definition at line 240 of file actormanager.cpp.
|
virtual |
Removes and destroys a Actor factory in this manager.
ImplName | The name of the Actor implementation created by the factory to be removed and destroyed. |
Definition at line 245 of file actormanager.cpp.
|
virtual |
Destroys all Actor factories in this manager.
Definition at line 254 of file actormanager.cpp.
ActorManager::ActorIterator Mezzanine::ActorManager::EndActor | ( | ) |
Gets an iterator to one passed the last Actor in this manager.
Definition at line 211 of file actormanager.cpp.
ActorManager::ConstActorIterator Mezzanine::ActorManager::EndActor | ( | ) | const |
Gets a const iterator to one passed the last Actor in this manager.
Definition at line 217 of file actormanager.cpp.
Gets an Actor by Index.
Index | The index of the Actor you wish to retrieve. |
Definition at line 142 of file actormanager.cpp.
Gets an Actor by Name.
Name | The name of the Actor you wish to retrieve. |
Definition at line 147 of file actormanager.cpp.
ActorUpdateWorkUnit * Mezzanine::ActorManager::GetActorUpdateWork | ( | ) |
Gets the work unit responsible for updating actors stored by this manager.
Definition at line 296 of file actormanager.cpp.
|
virtual |
This Allows any manager name to be sent to a stream. Primarily used for logging.
Implements Mezzanine::ManagerBase.
Definition at line 305 of file actormanager.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 302 of file actormanager.cpp.
|
virtual |
Gets the number of Actors stored in this manager.
Definition at line 157 of file actormanager.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 269 of file actormanager.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 264 of file actormanager.cpp.
|
virtual |
Removes a Actor factory from this manager.
ToBeRemoved | A pointer to the Actor factory that is to be removed. |
Definition at line 228 of file actormanager.cpp.
|
virtual |
Removes a Actor factory from this manager.
ImplName | The name of the Actor implementation created by the factory to be removed. |
Definition at line 233 of file actormanager.cpp.
|
protected |
A map containing all registered Actor type factories.
Definition at line 119 of file actormanager.h.
|
protected |
Container storing all Actors belonging to this manager.
Definition at line 122 of file actormanager.h.
|
protected |
The work unit that updates all the actors stored by this manager.
Definition at line 126 of file actormanager.h.
|
protected |
Can be used for thread safe logging and other thread specific resources.
Definition at line 129 of file actormanager.h.