CEL

Public API Reference

iCelEntity Struct Reference

This is an entity in the CEL layer at the PL (physical layer) side. More...

#include <physicallayer/entity.h>

Inheritance diagram for iCelEntity:

List of all members.

Public Member Functions

virtual void AddClass (csStringID cls)=0
 Add a class to this entity.
virtual csRef< iMessageDispatcherCreateTaggedMessageDispatcher (iMessageSender *sender, const char *msg_id, const char *tag)=0
 This is a special version of CreateMessageDispatcher() as it can be found in the channel.
virtual iCelBehaviourGetBehaviour ()=0
 Get the behaviour layer entity associated with this entity.
virtual const csSet< csStringID > & GetClasses () const =0
 Return the set of classes for this entity.
virtual uint GetID () const =0
 Return the (unique) ID of the entity.
virtual const char * GetName () const =0
 Get the name of this entity.
virtual iCelPropertyClassListGetPropertyClassList ()=0
 Get the list of property classes.
virtual bool HasClass (csStringID cls)=0
 Check if this entity belongs to some class.
virtual iMessageChannelQueryMessageChannel ()=0
 An entity is a message channel.
virtual iObjectQueryObject ()=0
 Get the iObject for this entity (if supported).
virtual void RemoveClass (csStringID cls)=0
 Remove a class from this entity.
virtual void SetBehaviour (iCelBehaviour *behaviour)=0
 Set the behaviour layer entity associated with this entity.
virtual void SetID (uint n)=0
 Set the (unique) ID of the entity.
virtual void SetName (const char *n)=0
 Set the name of this entity.

Detailed Description

This is an entity in the CEL layer at the PL (physical layer) side.

Every object in the game is represented by an entity. The entity system allows the game programmer (using CEL) to speak to game objects in a consistent manner. Examples of entities are the player, the world itself, creates, a candle, objects in general and items.

Entities are generally created, and destroyed, as required by the Physical Layer at the request of the Behaviour Layer.

Definition at line 47 of file entity.h.


Member Function Documentation

virtual void iCelEntity::AddClass ( csStringID  cls  )  [pure virtual]

Add a class to this entity.

A class is an application defined attribute which indicates to what the entity belongs. It can be something like 'weapon' or 'creature' or whatever the application desires.

virtual csRef<iMessageDispatcher> iCelEntity::CreateTaggedMessageDispatcher ( iMessageSender sender,
const char *  msg_id,
const char *  tag 
) [pure virtual]

This is a special version of CreateMessageDispatcher() as it can be found in the channel.

This version only allows receivers that are property classes that have a certain tag.

virtual iCelBehaviour* iCelEntity::GetBehaviour (  )  [pure virtual]

Get the behaviour layer entity associated with this entity.

Returns:
A pointer to the iCelBehaviour object representing the behaviour layer for this entity.
virtual const csSet<csStringID>& iCelEntity::GetClasses (  )  const [pure virtual]

Return the set of classes for this entity.

virtual uint iCelEntity::GetID (  )  const [pure virtual]

Return the (unique) ID of the entity.

Returns:
A uint uniquely representing this entity.
virtual const char* iCelEntity::GetName (  )  const [pure virtual]

Get the name of this entity.

Returns:
A pointer to the name of this entity.
virtual iCelPropertyClassList* iCelEntity::GetPropertyClassList (  )  [pure virtual]

Get the list of property classes.

Returns:
An pointer to an iCelPropertyClassList containing a list of the property classes for this entity.
virtual bool iCelEntity::HasClass ( csStringID  cls  )  [pure virtual]

Check if this entity belongs to some class.

virtual iMessageChannel* iCelEntity::QueryMessageChannel (  )  [pure virtual]

An entity is a message channel.

Instead of doing scfQueryInterface to fetch the message channel you can also use this function.

virtual iObject* iCelEntity::QueryObject (  )  [pure virtual]

Get the iObject for this entity (if supported).

Returns:
A pointer to the iObject for this entity if supported, otherwise 0.
virtual void iCelEntity::RemoveClass ( csStringID  cls  )  [pure virtual]

Remove a class from this entity.

virtual void iCelEntity::SetBehaviour ( iCelBehaviour behaviour  )  [pure virtual]

Set the behaviour layer entity associated with this entity.

Parameters:
behaviour A pointer to the iCelBehaviour object representing the behaviour layer for this entity.
virtual void iCelEntity::SetID ( uint  n  )  [pure virtual]

Set the (unique) ID of the entity.

@@ UGLY! This should be removed as soon as we find another solution for this problem!!!! See history.txt entry of 23-Jan-2003.

Parameters:
n A uint to uniquely represent this entity.
virtual void iCelEntity::SetName ( const char *  n  )  [pure virtual]

Set the name of this entity.

Parameters:
n A pointer to the name to set for this entity.

The documentation for this struct was generated from the following file:

Generated for CEL: Crystal Entity Layer 1.4.1 by doxygen 1.7.1