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

This class represents a world for objects to interact within. More...

#include <world.h>

+ Collaboration diagram for Mezzanine::World:

Public Types

typedef
WorldManagerContainer::const_iterator 
ConstWorldManagerContainer
 Const Iterator type for WorldManager instances stored by this class.
 
typedef std::vector
< WorldManager * > 
WorldManagerContainer
 Basic container type for WorldManager storage by this class.
 
typedef
WorldManagerContainer::iterator 
WorldManagerIterator
 Iterator type for WorldManager instances stored by this class.
 

Public Member Functions

 World ()
 Class constructor.
 
 World (const WorldManagerContainer &Managers)
 Pre-made manager constructor. More...
 
 World (const Physics::ManagerConstructionInfo &PhysicsInfo, const String &SceneType)
 Descriptive constructor. More...
 
 World (const WorldManagerContainer &Managers, const Physics::ManagerConstructionInfo &PhysicsInfo, const String &SceneType)
 Descriptive pre-made manager constructor. More...
 
 World (const XML::Node &SelfNode)
 XML constructor. More...
 
virtual ~World ()
 class destructor.
 
Boolean AddManager (WorldManager *ManagerToAdd)
 This adds a manager, in the correct order, to the list that the world calls on. More...
 
void Deinitialize ()
 Deinitializes all managers in this world and unhooks all of it's systems, disabling this world.
 
ActorManagerGetActorManager ()
 This gets the ActorManager from the manager list. More...
 
AreaEffectManagerGetAreaEffectManager ()
 This gets the AreaEffectManager from the manager list. More...
 
CameraManager * GetCameraManager ()
 This gets the CameraManager from the manager list. More...
 
WorldManagerGetManager (const ManagerBase::ManagerType ManagerToGet)
 This is will find the manager of a given type. More...
 
Physics::PhysicsManagerGetPhysicsManager ()
 This gets the PhysicsManager from the manager list. More...
 
Graphics::SceneManagerGetSceneManager ()
 This gets the SceneManager from the manager list. More...
 
Audio::SoundScapeManagerGetSoundScapeManager ()
 This gets the SoundScapeManager from the manager list. More...
 
TerrainManagerGetTerrainManager ()
 This gets the TerrainManager from the manager list. More...
 
void Initialize ()
 Initializes all managers in this world and performs all the necessary hooks to enable this world.
 
void RemoveManager (WorldManager *ToBeRemoved)
 This removes a manager by finding the matching pointer. More...
 
void RemoveManager (const ManagerBase::ManagerType ToBeRemoved)
 This removes a manager of a specific type from the list. More...
 

Protected Attributes

WorldManagerContainer WorldManagers
 A container storing all the managers belonging to this world. More...
 

Detailed Description

This class represents a world for objects to interact within.

Objects can be inserted and removed from worlds in order to simulate them. Multiple worlds can exist but objects can only belong to one world at a time.

Definition at line 72 of file world.h.

Constructor & Destructor Documentation

Mezzanine::World::World ( const WorldManagerContainer Managers)

Pre-made manager constructor.

Parameters
ManagersA container of pre-made managers to be used by this world.

Definition at line 60 of file world.cpp.

Mezzanine::World::World ( const Physics::ManagerConstructionInfo PhysicsInfo,
const String SceneType 
)

Descriptive constructor.

Parameters
PhysicsInfoA ManagerConstructionInfo struct with data on how to configure the physics for this world.
SceneTypeA string containing the name of the underlying scene type for this world.

Definition at line 65 of file world.cpp.

Mezzanine::World::World ( const WorldManagerContainer Managers,
const Physics::ManagerConstructionInfo PhysicsInfo,
const String SceneType 
)

Descriptive pre-made manager constructor.

Parameters
ManagersA container of pre-made managers to be used by this world.
PhysicsInfoA ManagerConstructionInfo struct with data on how to configure the physics for this world.
SceneTypeA string containing the name of the underlying scene type for this world.

Definition at line 70 of file world.cpp.

Mezzanine::World::World ( const XML::Node SelfNode)

XML constructor.

Parameters
SelfNodeThe node that represents the data to populate this world with.

Definition at line 75 of file world.cpp.

Member Function Documentation

Boolean Mezzanine::World::AddManager ( WorldManager ManagerToAdd)

This adds a manager, in the correct order, to the list that the world calls on.

Parameters
ManagerToAddThe pointer to the manager to be added.
Returns
Returns true if the manager was successfully added, false if the manager or it's type was non-unique.

Definition at line 107 of file world.cpp.

ActorManager * Mezzanine::World::GetActorManager ( )

This gets the ActorManager from the manager list.

Returns
This returns a pointer to a ActorManager, or a NULL pointer if no matching manager exists.

Definition at line 153 of file world.cpp.

AreaEffectManager * Mezzanine::World::GetAreaEffectManager ( )

This gets the AreaEffectManager from the manager list.

Returns
This returns a pointer to a AreaEffectManager, or a NULL pointer if no matching manager exists.

Definition at line 159 of file world.cpp.

CameraManager * Mezzanine::World::GetCameraManager ( )

This gets the CameraManager from the manager list.

Returns
This returns a pointer to a CameraManager, or a NULL pointer if no matching manager exists.

Definition at line 165 of file world.cpp.

WorldManager * Mezzanine::World::GetManager ( const ManagerBase::ManagerType  ManagerToGet)

This is will find the manager of a given type.

Parameters
ManagerToGetThe ManagerBase::ManagerTypeName of the manager to get.
Returns
This returns a pointer to a WorldManager, or a NULL pointer if no matching manager exists.

Definition at line 119 of file world.cpp.

Physics::PhysicsManager * Mezzanine::World::GetPhysicsManager ( )

This gets the PhysicsManager from the manager list.

Returns
This returns a pointer to a PhysicsManager, or a NULL pointer if no matching manager exists.

Definition at line 171 of file world.cpp.

Graphics::SceneManager * Mezzanine::World::GetSceneManager ( )

This gets the SceneManager from the manager list.

Returns
This returns a pointer to a SceneManager, or a NULL pointer if no matching manager exists.

Definition at line 177 of file world.cpp.

Audio::SoundScapeManager * Mezzanine::World::GetSoundScapeManager ( )

This gets the SoundScapeManager from the manager list.

Returns
This returns a pointer to a SoundScapeManager, or a NULL pointer if no matching manager exists.

Definition at line 183 of file world.cpp.

TerrainManager * Mezzanine::World::GetTerrainManager ( )

This gets the TerrainManager from the manager list.

Returns
This returns a pointer to a TerrainManager, or a NULL pointer if no matching manager exists.

Definition at line 189 of file world.cpp.

void Mezzanine::World::RemoveManager ( WorldManager ToBeRemoved)

This removes a manager by finding the matching pointer.

Parameters
ToBeRemovedA pointer to the manager to be removed.

Definition at line 129 of file world.cpp.

void Mezzanine::World::RemoveManager ( const ManagerBase::ManagerType  ToBeRemoved)

This removes a manager of a specific type from the list.

Parameters
ToBeRemovedThe ManagerBase::ManagerTypeName of the manager to remove.

Definition at line 141 of file world.cpp.

Member Data Documentation

WorldManagerContainer Mezzanine::World::WorldManagers
protected

A container storing all the managers belonging to this world.

Definition at line 84 of file world.h.


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