Pyrogenesis  trunk
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
IComponent Class Referenceabstract

#include <IComponent.h>

Inherited by ICmpAIInterface, ICmpAIManager, ICmpAttack, ICmpCinemaManager, ICmpCommandQueue, ICmpDecay, ICmpExample, ICmpFogging, ICmpFootprint, ICmpGarrisonHolder, ICmpGuiInterface, ICmpIdentity, ICmpMinimap, ICmpMirage, ICmpMotion, ICmpObstruction, ICmpObstructionManager, ICmpOverlayRenderer, ICmpOwnership, ICmpParticleManager, ICmpPathfinder, ICmpPlayer, ICmpPlayerManager, ICmpPosition, ICmpProjectileManager, ICmpRallyPoint, ICmpRallyPointRenderer, ICmpRangeManager, ICmpRangeOverlayRenderer, ICmpSelectable, ICmpSettlement, ICmpSound, ICmpSoundManager, ICmpTemplateManager, ICmpTerrain, ICmpTerritoryDecayManager, ICmpTerritoryInfluence, ICmpTerritoryManager, ICmpTest1, ICmpTest2, ICmpTurretHolder, ICmpUnitMotion, ICmpUnitMotionManager, ICmpUnitRenderer, ICmpUnknownScript, ICmpValueModificationManager, ICmpVisibility, ICmpVision, ICmpVisual, and ICmpWaterManager.

Collaboration diagram for IComponent:
Collaboration graph
[legend]

Public Types

using AllocFunc = IComponent *(*)(const ScriptInterface &scriptInterface, JS::HandleValue ctor)
 
using DeallocFunc = void(*)(IComponent *)
 

Public Member Functions

virtual ~IComponent ()
 
virtual void Init (const CParamNode &paramNode)=0
 
virtual void Deinit ()=0
 
virtual void HandleMessage (const CMessage &msg, bool global)
 
CEntityHandle GetEntityHandle () const
 
void SetEntityHandle (CEntityHandle ent)
 
entity_id_t GetEntityId () const
 
CEntityHandle GetSystemEntity () const
 
const CSimContextGetSimContext () const
 
void SetSimContext (const CSimContext &context)
 
virtual void Serialize (ISerializer &serialize)=0
 
virtual void Deserialize (const CParamNode &paramNode, IDeserializer &deserialize)=0
 
virtual bool NewJSObject (const ScriptInterface &scriptInterface, JS::MutableHandleObject out) const
 Returns false by default, indicating that a scripted wrapper of this IComponent is not supported. More...
 
virtual JS::Value GetJSInstance () const
 
virtual int GetComponentTypeId () const =0
 

Static Public Member Functions

static std::string GetSchema ()
 
static void RegisterComponentType (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
 
static void RegisterComponentTypeScriptWrapper (CComponentManager &mgr, EInterfaceId iid, EComponentTypeId cid, AllocFunc alloc, DeallocFunc dealloc, const char *name, const std::string &schema)
 
static u8 GetSerializationVersion ()
 

Private Attributes

CEntityHandle m_EntityHandle
 
const CSimContextm_SimContext
 

Member Typedef Documentation

◆ AllocFunc

using IComponent::AllocFunc = IComponent* (*)(const ScriptInterface& scriptInterface, JS::HandleValue ctor)

◆ DeallocFunc

using IComponent::DeallocFunc = void (*)(IComponent*)

Constructor & Destructor Documentation

◆ ~IComponent()

IComponent::~IComponent ( )
virtual

Member Function Documentation

◆ Deinit()

virtual void IComponent::Deinit ( )
pure virtual

◆ Deserialize()

virtual void IComponent::Deserialize ( const CParamNode paramNode,
IDeserializer deserialize 
)
pure virtual

◆ GetComponentTypeId()

virtual int IComponent::GetComponentTypeId ( ) const
pure virtual

◆ GetEntityHandle()

CEntityHandle IComponent::GetEntityHandle ( ) const
inline

◆ GetEntityId()

entity_id_t IComponent::GetEntityId ( ) const
inline

◆ GetJSInstance()

JS::Value IComponent::GetJSInstance ( ) const
virtual

◆ GetSchema()

std::string IComponent::GetSchema ( )
static

◆ GetSerializationVersion()

static u8 IComponent::GetSerializationVersion ( )
inlinestatic

◆ GetSimContext()

const CSimContext& IComponent::GetSimContext ( ) const
inline

◆ GetSystemEntity()

CEntityHandle IComponent::GetSystemEntity ( ) const
inline

◆ HandleMessage()

void IComponent::HandleMessage ( const CMessage msg,
bool  global 
)
virtual

◆ Init()

virtual void IComponent::Init ( const CParamNode paramNode)
pure virtual

◆ NewJSObject()

bool IComponent::NewJSObject ( const ScriptInterface scriptInterface,
JS::MutableHandleObject  out 
) const
virtual

Returns false by default, indicating that a scripted wrapper of this IComponent is not supported.

Derrived classes should return true if they implement such a wrapper.

◆ RegisterComponentType()

void IComponent::RegisterComponentType ( CComponentManager mgr,
EInterfaceId  iid,
EComponentTypeId  cid,
AllocFunc  alloc,
DeallocFunc  dealloc,
const char *  name,
const std::string &  schema 
)
static

◆ RegisterComponentTypeScriptWrapper()

void IComponent::RegisterComponentTypeScriptWrapper ( CComponentManager mgr,
EInterfaceId  iid,
EComponentTypeId  cid,
AllocFunc  alloc,
DeallocFunc  dealloc,
const char *  name,
const std::string &  schema 
)
static

◆ Serialize()

virtual void IComponent::Serialize ( ISerializer serialize)
pure virtual

◆ SetEntityHandle()

void IComponent::SetEntityHandle ( CEntityHandle  ent)
inline

◆ SetSimContext()

void IComponent::SetSimContext ( const CSimContext context)
inline

Member Data Documentation

◆ m_EntityHandle

CEntityHandle IComponent::m_EntityHandle
private

◆ m_SimContext

const CSimContext* IComponent::m_SimContext
private

The documentation for this class was generated from the following files: