Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/system/ComponentManager.h
Show First 20 Lines • Show All 267 Lines • ▼ Show 20 Lines | public: | ||||
bool DeserializeState(std::istream& stream); | bool DeserializeState(std::istream& stream); | ||||
std::string GenerateSchema() const; | std::string GenerateSchema() const; | ||||
ScriptInterface& GetScriptInterface() { return m_ScriptInterface; } | ScriptInterface& GetScriptInterface() { return m_ScriptInterface; } | ||||
private: | private: | ||||
// Implementations of functions exposed to scripts | // Implementations of functions exposed to scripts | ||||
static void Script_RegisterComponentType_Common(ScriptInterface::CxPrivate* pCxPrivate, int iid, const std::string& cname, JS::HandleValue ctor, bool reRegister, bool systemComponent); | static void Script_RegisterComponentType_Common(ScriptInterface::CmptPrivate* pCmptPrivate, int iid, const std::string& cname, JS::HandleValue ctor, bool reRegister, bool systemComponent); | ||||
static void Script_RegisterComponentType(ScriptInterface::CxPrivate* pCxPrivate, int iid, const std::string& cname, JS::HandleValue ctor); | static void Script_RegisterComponentType(ScriptInterface::CmptPrivate* pCmptPrivate, int iid, const std::string& cname, JS::HandleValue ctor); | ||||
static void Script_RegisterSystemComponentType(ScriptInterface::CxPrivate* pCxPrivate, int iid, const std::string& cname, JS::HandleValue ctor); | static void Script_RegisterSystemComponentType(ScriptInterface::CmptPrivate* pCmptPrivate, int iid, const std::string& cname, JS::HandleValue ctor); | ||||
static void Script_ReRegisterComponentType(ScriptInterface::CxPrivate* pCxPrivate, int iid, const std::string& cname, JS::HandleValue ctor); | static void Script_ReRegisterComponentType(ScriptInterface::CmptPrivate* pCmptPrivate, int iid, const std::string& cname, JS::HandleValue ctor); | ||||
static void Script_RegisterInterface(ScriptInterface::CxPrivate* pCxPrivate, const std::string& name); | static void Script_RegisterInterface(ScriptInterface::CmptPrivate* pCmptPrivate, const std::string& name); | ||||
static void Script_RegisterMessageType(ScriptInterface::CxPrivate* pCxPrivate, const std::string& name); | static void Script_RegisterMessageType(ScriptInterface::CmptPrivate* pCmptPrivate, const std::string& name); | ||||
static void Script_RegisterGlobal(ScriptInterface::CxPrivate* pCxPrivate, const std::string& name, JS::HandleValue value); | static void Script_RegisterGlobal(ScriptInterface::CmptPrivate* pCmptPrivate, const std::string& name, JS::HandleValue value); | ||||
static IComponent* Script_QueryInterface(ScriptInterface::CxPrivate* pCxPrivate, int ent, int iid); | static IComponent* Script_QueryInterface(ScriptInterface::CmptPrivate* pCmptPrivate, int ent, int iid); | ||||
static std::vector<int> Script_GetEntitiesWithInterface(ScriptInterface::CxPrivate* pCxPrivate, int iid); | static std::vector<int> Script_GetEntitiesWithInterface(ScriptInterface::CmptPrivate* pCmptPrivate, int iid); | ||||
static std::vector<IComponent*> Script_GetComponentsWithInterface(ScriptInterface::CxPrivate* pCxPrivate, int iid); | static std::vector<IComponent*> Script_GetComponentsWithInterface(ScriptInterface::CmptPrivate* pCmptPrivate, int iid); | ||||
static void Script_PostMessage(ScriptInterface::CxPrivate* pCxPrivate, int ent, int mtid, JS::HandleValue data); | static void Script_PostMessage(ScriptInterface::CmptPrivate* pCmptPrivate, int ent, int mtid, JS::HandleValue data); | ||||
static void Script_BroadcastMessage(ScriptInterface::CxPrivate* pCxPrivate, int mtid, JS::HandleValue data); | static void Script_BroadcastMessage(ScriptInterface::CmptPrivate* pCmptPrivate, int mtid, JS::HandleValue data); | ||||
static int Script_AddEntity(ScriptInterface::CxPrivate* pCxPrivate, const std::string& templateName); | static int Script_AddEntity(ScriptInterface::CmptPrivate* pCmptPrivate, const std::string& templateName); | ||||
static int Script_AddLocalEntity(ScriptInterface::CxPrivate* pCxPrivate, const std::string& templateName); | static int Script_AddLocalEntity(ScriptInterface::CmptPrivate* pCmptPrivate, const std::string& templateName); | ||||
static void Script_DestroyEntity(ScriptInterface::CxPrivate* pCxPrivate, int ent); | static void Script_DestroyEntity(ScriptInterface::CmptPrivate* pCmptPrivate, int ent); | ||||
static void Script_FlushDestroyedEntities(ScriptInterface::CxPrivate* pCxPrivate); | static void Script_FlushDestroyedEntities(ScriptInterface::CmptPrivate* pCmptPrivate); | ||||
CMessage* ConstructMessage(int mtid, JS::HandleValue data); | CMessage* ConstructMessage(int mtid, JS::HandleValue data); | ||||
void SendGlobalMessage(entity_id_t ent, const CMessage& msg); | void SendGlobalMessage(entity_id_t ent, const CMessage& msg); | ||||
void FlattenDynamicSubscriptions(); | void FlattenDynamicSubscriptions(); | ||||
void RemoveComponentDynamicSubscriptions(IComponent* component); | void RemoveComponentDynamicSubscriptions(IComponent* component); | ||||
ComponentTypeId GetScriptWrapper(InterfaceId iid); | ComponentTypeId GetScriptWrapper(InterfaceId iid); | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator