Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
CSimContext Class Reference

Contains pointers to various 'global' objects that are needed by the simulation code, to allow easy access without using real (evil) global variables. More...

#include <SimContext.h>

Collaboration diagram for CSimContext:

Public Member Functions

 CSimContext (CTerrain *terrain=nullptr, CUnitManager *unitManager=nullptr)
 
 ~CSimContext ()
 
CComponentManagerGetComponentManager () const
 
void SetComponentManager (CComponentManager *man)
 
bool HasUnitManager () const
 
CUnitManagerGetUnitManager () const
 
CTerrainGetTerrain () const
 
ScriptInterfaceGetScriptInterface () const
 
void SetSystemEntity (CEntityHandle ent)
 
CEntityHandle GetSystemEntity () const
 
int GetCurrentDisplayedPlayer () const
 Returns the player ID that the current display is being rendered for. More...
 

Private Attributes

CComponentManagerm_ComponentManager {nullptr}
 
CUnitManagerm_UnitManager
 
CTerrainm_Terrain
 
CEntityHandle m_SystemEntity
 

Detailed Description

Contains pointers to various 'global' objects that are needed by the simulation code, to allow easy access without using real (evil) global variables.

Constructor & Destructor Documentation

◆ CSimContext()

CSimContext::CSimContext ( CTerrain terrain = nullptr,
CUnitManager unitManager = nullptr 
)

◆ ~CSimContext()

CSimContext::~CSimContext ( )

Member Function Documentation

◆ GetComponentManager()

CComponentManager & CSimContext::GetComponentManager ( ) const

◆ GetCurrentDisplayedPlayer()

int CSimContext::GetCurrentDisplayedPlayer ( ) const

Returns the player ID that the current display is being rendered for.

Currently relies on g_Game being initialised (evil globals...)

◆ GetScriptInterface()

ScriptInterface & CSimContext::GetScriptInterface ( ) const

◆ GetSystemEntity()

CEntityHandle CSimContext::GetSystemEntity ( ) const
inline

◆ GetTerrain()

CTerrain & CSimContext::GetTerrain ( ) const

◆ GetUnitManager()

CUnitManager & CSimContext::GetUnitManager ( ) const

◆ HasUnitManager()

bool CSimContext::HasUnitManager ( ) const

◆ SetComponentManager()

void CSimContext::SetComponentManager ( CComponentManager man)

◆ SetSystemEntity()

void CSimContext::SetSystemEntity ( CEntityHandle  ent)
inline

Member Data Documentation

◆ m_ComponentManager

CComponentManager* CSimContext::m_ComponentManager {nullptr}
private

◆ m_SystemEntity

CEntityHandle CSimContext::m_SystemEntity
private

◆ m_Terrain

CTerrain* CSimContext::m_Terrain
private

◆ m_UnitManager

CUnitManager* CSimContext::m_UnitManager
private

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