Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros
Component.h File Reference
#include "simulation2/system/CmpPtr.h"
#include "simulation2/system/Components.h"
#include "simulation2/system/ComponentManager.h"
#include "simulation2/system/IComponent.h"
#include "simulation2/system/ParamNode.h"
#include "simulation2/system/SimContext.h"
#include "simulation2/serialization/ISerializer.h"
#include "simulation2/serialization/IDeserializer.h"

Go to the source code of this file.

Macros

#define REGISTER_COMPONENT_TYPE(cname)
 
#define REGISTER_COMPONENT_SCRIPT_WRAPPER(cname)
 
#define DEFAULT_COMPONENT_ALLOCATOR(cname)
 
#define DEFAULT_SCRIPT_WRAPPER(cname)
 
#define DEFAULT_MOCK_COMPONENT()
 

Macro Definition Documentation

#define DEFAULT_COMPONENT_ALLOCATOR (   cname)
Value:
static IComponent* Allocate(ScriptInterface&, jsval) { return new CCmp##cname(); } \
static void Deallocate(IComponent* cmp) { delete static_cast<CCmp##cname*> (cmp); } \
shared_ptr< u8 > Allocate(size_t size)
Definition: shared_ptr.cpp:55
Abstraction around a SpiderMonkey JSContext.

Definition at line 44 of file Component.h.

#define DEFAULT_MOCK_COMPONENT ( )
Value:
virtual void Init(const CParamNode& UNUSED(paramNode)) \
{ \
} \
virtual void Deinit() \
{ \
} \
virtual void Serialize(ISerializer& UNUSED(serialize)) \
{ \
} \
virtual void Deserialize(const CParamNode& UNUSED(paramNode), IDeserializer& UNUSED(deserialize)) \
{ \
} \
An entity initialisation parameter node.
Definition: ParamNode.h:112
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
Serialization interface; see serialization overview.
Definition: ISerializer.h:120
static Status Init()
Definition: h_mgr.cpp:744
Deserialization interface; see serialization overview.
Definition: IDeserializer.h:34

Definition at line 91 of file Component.h.

#define DEFAULT_SCRIPT_WRAPPER (   cname)

Definition at line 48 of file Component.h.

#define REGISTER_COMPONENT_SCRIPT_WRAPPER (   cname)
Value:
void RegisterComponentType_##cname(CComponentManager& mgr) \
{ \
mgr.RegisterComponentTypeScriptWrapper(CCmp##cname::GetInterfaceId(), CID_##cname, CCmp##cname::Allocate, CCmp##cname::Deallocate, #cname, CCmp##cname::GetSchema()); \
CCmp##cname::ClassInit(mgr); \
}
shared_ptr< u8 > Allocate(size_t size)
Definition: shared_ptr.cpp:55

Definition at line 37 of file Component.h.

#define REGISTER_COMPONENT_TYPE (   cname)
Value:
void RegisterComponentType_##cname(CComponentManager& mgr) \
{ \
mgr.RegisterComponentType(CCmp##cname::GetInterfaceId(), CID_##cname, CCmp##cname::Allocate, CCmp##cname::Deallocate, #cname, CCmp##cname::GetSchema()); \
CCmp##cname::ClassInit(mgr); \
}
shared_ptr< u8 > Allocate(size_t size)
Definition: shared_ptr.cpp:55

Definition at line 30 of file Component.h.