Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/system/ComponentManager.h
Show All 14 Lines | |||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#ifndef INCLUDED_COMPONENTMANAGER | #ifndef INCLUDED_COMPONENTMANAGER | ||||
#define INCLUDED_COMPONENTMANAGER | #define INCLUDED_COMPONENTMANAGER | ||||
#include "ps/Filesystem.h" | #include "ps/Filesystem.h" | ||||
#include "scriptinterface/ScriptInterface.h" | #include "scriptinterface/ScriptInterface.h" | ||||
#include "scriptinterface/ScriptVal.h" | |||||
#include "simulation2/helpers/Player.h" | #include "simulation2/helpers/Player.h" | ||||
#include "simulation2/system/Components.h" | #include "simulation2/system/Components.h" | ||||
#include "simulation2/system/Entity.h" | #include "simulation2/system/Entity.h" | ||||
#include <boost/random/linear_congruential.hpp> | #include <boost/random/linear_congruential.hpp> | ||||
#include <map> | #include <map> | ||||
#include <set> | #include <set> | ||||
#include <unordered_map> | #include <unordered_map> | ||||
Show All 34 Lines | private: | ||||
struct ComponentType | struct ComponentType | ||||
{ | { | ||||
EComponentTypeType type; | EComponentTypeType type; | ||||
InterfaceId iid; | InterfaceId iid; | ||||
AllocFunc alloc; | AllocFunc alloc; | ||||
DeallocFunc dealloc; | DeallocFunc dealloc; | ||||
std::string name; | std::string name; | ||||
std::string schema; // RelaxNG fragment | std::string schema; // RelaxNG fragment | ||||
DefPersistentRooted<JS::Value> ctor; // only valid if type == CT_Script | JS::PersistentRootedValue ctor; // only valid if type == CT_Script | ||||
Stan: Comment still accurate? Caps, final dot. Should be on top too. | |||||
}; | }; | ||||
public: | public: | ||||
CComponentManager(CSimContext&, shared_ptr<ScriptRuntime> rt, bool skipScriptFunctions = false); | CComponentManager(CSimContext&, shared_ptr<ScriptRuntime> rt, bool skipScriptFunctions = false); | ||||
~CComponentManager(); | ~CComponentManager(); | ||||
void LoadComponentTypes(); | void LoadComponentTypes(); | ||||
▲ Show 20 Lines • Show All 261 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Comment still accurate? Caps, final dot. Should be on top too.