11// //////////////////////////////////////////////////////////////////////////
2- // Module : alife_simulator_base.h
3- // Created : 25.12.2002
4- // Modified : 12.05.2004
5- // Author : Dmitriy Iassenev
6- // Description : ALife Simulator base class
2+ // Module : alife_simulator_base.h
3+ // Created : 25.12.2002
4+ // Modified : 12.05.2004
5+ // Author : Dmitriy Iassenev
6+ // Description : ALife Simulator base class
77// //////////////////////////////////////////////////////////////////////////
88
99#pragma once
@@ -62,48 +62,47 @@ class CALifeSimulatorBase : public IPureDestroyableObject
6262 ALife::SCHEDULE_P_VECTOR m_tpaCombatGroups[2 ];
6363
6464protected:
65- IC CALifeSimulatorHeader& header ();
66- IC CALifeTimeManager& time ();
67- IC CALifeSpawnRegistry& spawns ();
68- IC CALifeObjectRegistry& objects ();
69- IC CALifeStoryRegistry& story_objects ();
70- IC CALifeSmartTerrainRegistry& smart_terrains ();
71- IC CALifeGroupRegistry& groups ();
72- IC void can_register_objects (const bool & value);
73- IC const bool & can_register_objects () const ;
65+ CALifeSimulatorHeader& header ();
66+ CALifeTimeManager& time ();
67+ CALifeSpawnRegistry& spawns ();
68+ CALifeObjectRegistry& objects ();
69+ CALifeStoryRegistry& story_objects ();
70+ CALifeSmartTerrainRegistry& smart_terrains ();
71+ CALifeGroupRegistry& groups ();
72+ void can_register_objects (bool value);
73+ const bool & can_register_objects () const { return m_can_register_objects; }
7474
7575public:
76- IC CALifeGraphRegistry& graph ();
77- IC CALifeScheduleRegistry& scheduled ();
78- IC CALifeTimeManager& time_manager ();
79- IC CALifeRegistryContainer& registry () const ;
80- IC inventory::upgrade::Manager& inventory_upgrade_manager () const ;
76+ CALifeGraphRegistry& graph ();
77+ CALifeScheduleRegistry& scheduled ();
78+ CALifeTimeManager& time_manager ();
79+ CALifeRegistryContainer& registry () const ;
80+ inventory::upgrade::Manager& inventory_upgrade_manager () const ;
8181
8282public:
8383 CALifeSimulatorBase (IPureServer* server, LPCSTR section);
8484 virtual ~CALifeSimulatorBase ();
8585 virtual void destroy ();
86- IC bool initialized () const ;
87- IC const CALifeSimulatorHeader& header () const ;
88- IC const CALifeTimeManager& time () const ;
89- IC const CALifeSpawnRegistry& spawns () const ;
90- IC const CALifeObjectRegistry& objects () const ;
91- IC const CALifeGraphRegistry& graph () const ;
92- IC const CALifeScheduleRegistry& scheduled () const ;
93- IC const CALifeStoryRegistry& story_objects () const ;
94- IC const CALifeSmartTerrainRegistry& smart_terrains () const ;
95- IC const CALifeGroupRegistry& groups () const ;
96- IC CRandom32& random ();
97- IC IPureServer& server () const ;
98- IC const CALifeTimeManager& time_manager () const ;
99- IC shared_str* server_command_line () const ;
86+ bool initialized () const { return m_initialized; }
87+ const CALifeSimulatorHeader& header () const ;
88+ const CALifeTimeManager& time () const ;
89+ const CALifeSpawnRegistry& spawns () const ;
90+ const CALifeObjectRegistry& objects () const ;
91+ const CALifeGraphRegistry& graph () const ;
92+ const CALifeScheduleRegistry& scheduled () const ;
93+ const CALifeStoryRegistry& story_objects () const ;
94+ const CALifeSmartTerrainRegistry& smart_terrains () const ;
95+ const CALifeGroupRegistry& groups () const ;
96+ CRandom32& random ();
97+ IPureServer& server () const ;
98+ const CALifeTimeManager& time_manager () const ;
99+ shared_str* server_command_line () const ;
100100 template <typename T>
101- IC T& registry (T* t) const ;
102-
101+ T& registry (T* t) const { return registry ()(t); }
103102protected:
104103 void unload ();
105104 virtual void reload (LPCSTR section);
106- IC void setup_command_line (shared_str* command_line);
105+ void setup_command_line (shared_str* command_line);
107106 void assign_death_position (CSE_ALifeCreatureAbstract* tpALifeCreatureAbstract, GameGraph::_GRAPH_ID tGraphID,
108107 CSE_ALifeSchedulable* tpALifeSchedulable = 0 );
109108 virtual void setup_simulator (CSE_ALifeObject* object) = 0;
@@ -126,4 +125,6 @@ class CALifeSimulatorBase : public IPureDestroyableObject
126125 ALife::ITEM_P_VECTOR m_temp_item_vector;
127126};
128127
128+ #ifndef DEBUG // for debug builds, the functions are instantiated by alife_simulator_base.cpp
129129#include " alife_simulator_base_inline.h"
130+ #endif
0 commit comments