Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Mezzanine::ManagerBase Class Referenceabstract

This is the base class from which all the Entresol and World Managers inherit. More...

#include <managerbase.h>

+ Inheritance diagram for Mezzanine::ManagerBase:
+ Collaboration diagram for Mezzanine::ManagerBase:

Public Types

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

 ManagerBase ()
 Class constructor.
 
virtual ~ManagerBase ()
 Class destructor.
 
virtual void Deinitialize ()=0
 Removes this manager from any necessary configuration so it can be safely disposed of.
 
virtual String GetImplementationTypeName () const =0
 This Allows any manager name to be sent to a stream. Primarily used for logging. More...
 
virtual ManagerType GetInterfaceType () const =0
 This returns the type of this manager. More...
 
virtual String GetInterfaceTypeAsString () const
 Gets a string of the interface type of this manager. More...
 
virtual void Initialize ()=0
 Configures this manager for use prior to entering the main loop.
 
Boole IsInitialized () const
 Gets whether or not this manager has been initialized. More...
 

Static Public Member Functions

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

Protected Attributes

Boole Initialized
 Simple Boole indicating whether or not this manager has been initialized. More...
 
EntresolTheEntresol
 The actual pointer to the Entresol core class. More...
 

Detailed Description

This is the base class from which all the Entresol and World Managers inherit.

This creates a base set of functions that Managers are all expected to implement.

Definition at line 58 of file managerbase.h.

Member Enumeration Documentation

A listing of Manager Types.

These will be returned by ManagerBase::GetType(), and will allow code using this to determine what type of Manager class they are working with and use this information to more safely cast to the correct manager if needed.

Enumerator
MT_UserCreated 

This, and values above it, is what User created managers that do not derive from any other managers are expected to use to prevent confusion with game internals.

Definition at line 65 of file managerbase.h.

Member Function Documentation

virtual String Mezzanine::ManagerBase::GetImplementationTypeName ( ) const
pure virtual
virtual ManagerType Mezzanine::ManagerBase::GetInterfaceType ( ) const
pure virtual
String Mezzanine::ManagerBase::GetInterfaceTypeAsString ( ) const
virtual

Gets a string of the interface type of this manager.

Returns
Returns a string containing the interface name of this manager.

Definition at line 71 of file managerbase.cpp.

String Mezzanine::ManagerBase::GetTypeAsString ( const ManagerType ManagerType)
static

Gets the string form of the type of manager.

Returns
Returns a string containing the name of the requested type of manager.

Definition at line 76 of file managerbase.cpp.

ManagerBase::ManagerType Mezzanine::ManagerBase::GetTypeFromString ( const String ManagerName)
static

Gets the type of manager requested from a string.

Remarks
This function does not try to compare the full string for the sake of speed. Instead it'll check the first couple letters for a potential match. This function is also not case sensative. Providing the string "ac" will return an ActorManager value, for example. Additionally if it does not find a match it will throw an exception. So be careful about what you put into this.
Returns
Returns a ManagerTypeName cooresponding to the string provided.

Definition at line 161 of file managerbase.cpp.

Boole Mezzanine::ManagerBase::IsInitialized ( ) const

Gets whether or not this manager has been initialized.

Returns
Returns true if this manager has been initialized, false otherwise.

Definition at line 65 of file managerbase.cpp.

Member Data Documentation

Boole Mezzanine::ManagerBase::Initialized
protected

Simple Boole indicating whether or not this manager has been initialized.

Definition at line 111 of file managerbase.h.

Entresol* Mezzanine::ManagerBase::TheEntresol
protected

The actual pointer to the Entresol core class.

Definition at line 108 of file managerbase.h.


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