CEL: Crystal Entity Layer: iCelEntity Struct Reference (CEL: Crystal Entity Layer Public API Reference)

| ## Public API Reference

- Main Page
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iCelEntity Struct Reference

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

`#include <physicallayer/entity.h>`

List of all members.

## Public Member Functions
virtual void | AddClass (csStringID cls)=0
| Add a class to this entity.
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 bool | HasClass (csStringID cls)=0
| Check if this entity belongs to some class.
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 | 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 45 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 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 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:

- physicallayer/entity.h