Go to the documentation of this file. 18 #ifndef INCLUDED_COMPONENT 19 #define INCLUDED_COMPONENT 32 #define REGISTER_COMPONENT_TYPE(cname) \ 33 void RegisterComponentType_##cname(CComponentManager& mgr) \ 35 IComponent::RegisterComponentType(mgr, CCmp##cname::GetInterfaceId(), CID_##cname, CCmp##cname::Allocate, CCmp##cname::Deallocate, #cname, CCmp##cname::GetSchema()); \ 36 CCmp##cname::ClassInit(mgr); \ 39 #define DEFAULT_COMPONENT_ALLOCATOR(cname) \ 40 static IComponent* Allocate(const ScriptInterface&, JS::HandleValue) { return new CCmp##cname(); } \ 41 static void Deallocate(IComponent* cmp) { delete static_cast<CCmp##cname*> (cmp); } \ 42 int GetComponentTypeId() const override \ 47 #define DEFAULT_MOCK_COMPONENT() \ 48 int GetComponentTypeId() const override \ 52 void Init(const CParamNode& UNUSED(paramNode)) override \ 55 void Deinit() override \ 58 void Serialize(ISerializer& UNUSED(serialize)) override \ 61 void Deserialize(const CParamNode& UNUSED(paramNode), IDeserializer& UNUSED(deserialize)) override \ 65 #endif // INCLUDED_COMPONENT