MezzanineEngine 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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_AudioManager = 1, MT_AnimationManager, MT_CollisionShapeManager, MT_CompositorManager,
  MT_GraphicsManager, MT_EventManager, MT_InputManager, MT_LogManager,
  MT_MaterialManager, MT_MeshManager, MT_NetworkManager, MT_ResourceManager,
  MT_ScriptingManager, MT_UIManager, MT_ActorManager = 100, MT_AreaEffectManager,
  MT_CameraManager, MT_DebrisManager, MT_PagingManager, MT_PhysicsManager,
  MT_SceneManager, MT_SoundScapeManager, MT_TerrainManager, MT_VehicleManager,
  MT_UserCreated = 512
}
 

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

bool Initialized
 Simple bool 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 59 of file managerbase.h.

Member Enumeration Documentation

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 67 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 158 of file managerbase.cpp.

bool 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

bool Mezzanine::ManagerBase::Initialized
protected

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

Definition at line 109 of file managerbase.h.

Entresol* Mezzanine::ManagerBase::TheEntresol
protected

The actual pointer to the Entresol core class.

Definition at line 106 of file managerbase.h.


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