iCelEntity Struct Reference
This is an entity in the CEL layer at the PL (physical layer) side. More...
#include <physicallayer/entity.h>

Public Member Functions | |
| virtual void | Activate ()=0 |
| Activate this entity. | |
| virtual void | AddClass (csStringID cls)=0 |
| Add a class to this entity. | |
| virtual csRef< iMessageDispatcher > | CreateTaggedMessageDispatcher (iMessageSender *sender, csStringID msg_id, const char *tag)=0 |
| This is a special version of CreateMessageDispatcher() as it can be found in the channel. | |
| virtual void | Deactivate ()=0 |
| Deactivate this entity. | |
| virtual bool | ExistedAtBaseline () const =0 |
| Returns true if this entity existed at the baseline. | |
| virtual iCelBehaviour * | GetBehaviour ()=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 iCelPropertyClassList * | GetPropertyClassList ()=0 |
| Get the list of property classes. | |
| virtual csStringID | GetTemplateNameID () const =0 |
| Get the Id of the template that created this entity. | |
| virtual bool | HasClass (csStringID cls)=0 |
| Check if this entity belongs to some class. | |
| virtual bool | IsActive () const =0 |
| Return true if the entity is active. | |
| virtual bool | IsModifiedSinceBaseline () const =0 |
| Return true if there is any property class that has been modified since the baseline. | |
| virtual bool | IsPositional () const =0 |
| Returns true if this entity is 'positional'. | |
| virtual void | MarkBaseline ()=0 |
| Mark the baseline for this entity. | |
| virtual iMessageChannel * | QueryMessageChannel ()=0 |
| An entity is a message channel. | |
| virtual iObject * | QueryObject ()=0 |
| Get the iObject for this entity (if supported). | |
| virtual void | RemoveClass (csStringID cls)=0 |
| Remove a class from this entity. | |
| virtual void | RestoreModifications (iCelCompactDataBufferReader *buf, const csHash< csString, csStringID > &strings)=0 |
| Call this function if the entity is in the state as it was at the moment of the baseline. | |
| virtual void | SaveModifications (iCelCompactDataBufferWriter *buf, iStringSet *strings)=0 |
| Return the data that represents the information that changed after the baseline. | |
| 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. | |
| virtual void | SetTemplateNameID (csStringID id)=0 |
| Set the ID for the template name. | |
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 53 of file entity.h.
Member Function Documentation
| virtual void iCelEntity::Activate | ( | ) | [pure virtual] |
Activate this entity.
This means it will process events again (including all property classes and other things attached to this entity). Entities are activated by default.
| 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, | |
| csStringID | 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 void iCelEntity::Deactivate | ( | ) | [pure virtual] |
Deactivate this entity.
This means that events will no longer be processed and the entity will be 'frozen'.
| virtual bool iCelEntity::ExistedAtBaseline | ( | ) | const [pure virtual] |
Returns true if this entity existed at the baseline.
| 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 csStringID iCelEntity::GetTemplateNameID | ( | ) | const [pure virtual] |
Get the Id of the template that created this entity.
Returns csInvalidStringID if this entity was not created from a template.
| virtual bool iCelEntity::HasClass | ( | csStringID | cls | ) | [pure virtual] |
Check if this entity belongs to some class.
| virtual bool iCelEntity::IsActive | ( | ) | const [pure virtual] |
Return true if the entity is active.
| virtual bool iCelEntity::IsModifiedSinceBaseline | ( | ) | const [pure virtual] |
Return true if there is any property class that has been modified since the baseline.
| virtual bool iCelEntity::IsPositional | ( | ) | const [pure virtual] |
Returns true if this entity is 'positional'.
That means that it has at least one property class which implements iCelPositionInfo.
| virtual void iCelEntity::MarkBaseline | ( | ) | [pure virtual] |
Mark the baseline for this entity.
This means that the status of this entity as it is now doesn't have to be saved. Only changes to the entity that happen after this baseline have to be modified. This function will delegate to the property classes.
| 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] |
| virtual void iCelEntity::RemoveClass | ( | csStringID | cls | ) | [pure virtual] |
Remove a class from this entity.
| virtual void iCelEntity::RestoreModifications | ( | iCelCompactDataBufferReader * | buf, | |
| const csHash< csString, csStringID > & | strings | |||
| ) | [pure virtual] |
Call this function if the entity is in the state as it was at the moment of the baseline.
This function will put back the modifications that were made after the baseline.
| virtual void iCelEntity::SaveModifications | ( | iCelCompactDataBufferWriter * | buf, | |
| iStringSet * | strings | |||
| ) | [pure virtual] |
Return the data that represents the information that changed after the baseline.
Only the modified property classes are saved here.
| 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.
- 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.
| virtual void iCelEntity::SetTemplateNameID | ( | csStringID | id | ) | [pure virtual] |
Set the ID for the template name.
Normally this is not needed as this is done by the physical layer automatically if the entity is created from a template.
The documentation for this struct was generated from the following file:
- physicallayer/entity.h
Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1
