18#ifndef INCLUDED_ICOMPONENT
19#define INCLUDED_ICOMPONENT
EComponentTypeId
Definition: Components.h:51
EInterfaceId
Definition: Components.h:40
Definition: ComponentManager.h:46
Object wrapping an entity_id_t, with a SEntityComponentCache to support fast QueryInterface() / CmpPt...
Definition: Entity.h:80
entity_id_t GetId() const
Definition: Entity.h:88
An entity initialisation parameter node.
Definition: ParamNode.h:153
Contains pointers to various 'global' objects that are needed by the simulation code,...
Definition: SimContext.h:34
CEntityHandle GetSystemEntity() const
Definition: SimContext.h:50
Definition: IComponent.h:33
virtual void Serialize(ISerializer &serialize)=0
entity_id_t GetEntityId() const
Definition: IComponent.h:57
virtual ~IComponent()
Definition: IComponent.cpp:26
const CSimContext & GetSimContext() const
Definition: IComponent.h:61
void(*)(IComponent *) DeallocFunc
Definition: IComponent.h:37
virtual void Deserialize(const CParamNode ¶mNode, IDeserializer &deserialize)=0
void SetEntityHandle(CEntityHandle ent)
Definition: IComponent.h:55
virtual JS::HandleValue GetJSInstance() const =0
@Returns JS::NullHandleValue if a scripted wrapper of this IComponent is not supported,...
IComponent *(*)(const Script::Interface &scriptInterface, JS::HandleValue ctor) AllocFunc
Definition: IComponent.h:36
static void RegisterComponentType(CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
Definition: IComponent.cpp:36
virtual void HandleMessage(const CMessage &msg, bool global)
Definition: IComponent.cpp:48
virtual int GetComponentTypeId() const =0
void SetSimContext(const CSimContext &context)
Definition: IComponent.h:62
static void RegisterComponentTypeScriptWrapper(CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema, ClassInitFunc classInit)
Definition: IComponent.cpp:41
static std::string GetSchema()
Definition: IComponent.cpp:30
void(*)(CComponentManager &componentManager) ClassInitFunc
Definition: IComponent.h:38
static std::uint8_t GetSerializationVersion()
Definition: IComponent.h:64
CEntityHandle GetEntityHandle() const
Definition: IComponent.h:54
CEntityHandle m_EntityHandle
Definition: IComponent.h:81
virtual void Init(const CParamNode ¶mNode)=0
const CSimContext * m_SimContext
Definition: IComponent.h:82
CEntityHandle GetSystemEntity() const
Definition: IComponent.h:59
virtual bool NewJSObject(const Script::Interface &scriptInterface, JS::MutableHandleObject out) const =0
@Returns whether a scripted wrapper of this IComponent is not supported.
Deserialization interface; see serialization overview.
Definition: IDeserializer.h:40
Serialization interface; see serialization overview.
Definition: ISerializer.h:126
Definition: Interface.h:93
std::uint32_t entity_id_t
Entity ID type.
Definition: Entity.h:29
static void out(const wchar_t *fmt,...)
Definition: wdbg_sym.cpp:407