iCelPropertyClass Struct Reference
This is a property class for an entity. More...
#include <physicallayer/propclas.h>
Public Member Functions | |
virtual const char * | GetName () const =0 |
Get the name of this property class. | |
virtual void | SetTag (const char *tagname)=0 |
Set the optional tag of this property class. | |
virtual const char * | GetTag () const =0 |
Get the tag of this property class or return 0 if there is no tag. | |
virtual iCelEntity * | GetEntity ()=0 |
Get the parent entity associated with this property class. | |
virtual void | SetEntity (iCelEntity *entity)=0 |
Set the entity for this property class. | |
virtual csPtr< iCelDataBuffer > | SaveFirstPass ()=0 |
Save this object to a data buffer. | |
virtual bool | LoadFirstPass (iCelDataBuffer *databuf)=0 |
Load this object from a data buffer. | |
virtual csPtr< iCelDataBuffer > | Save ()=0 |
Save this object to a data buffer. | |
virtual bool | Load (iCelDataBuffer *databuf)=0 |
Load this object from a data buffer. | |
virtual bool | AddPropertyChangeCallback (iCelPropertyChangeCallback *cb)=0 |
Add a callback which will be fired when a property changes. | |
virtual bool | RemovePropertyChangeCallback (iCelPropertyChangeCallback *cb)=0 |
Remove a callback. | |
virtual bool | SetProperty (csStringID propertyID, long value)=0 |
Set a generic property. | |
virtual bool | SetProperty (csStringID propertyID, float value)=0 |
Set a generic property. | |
virtual bool | SetProperty (csStringID propertyID, bool value)=0 |
Set a generic property. | |
virtual bool | SetProperty (csStringID propertyID, const char *value)=0 |
Set a generic property. | |
virtual bool | SetProperty (csStringID propertyID, const csVector2 &value)=0 |
Set a generic property. | |
virtual bool | SetProperty (csStringID propertyID, const csVector3 &value)=0 |
Set a generic property. | |
virtual bool | SetProperty (csStringID propertyID, const csColor &value)=0 |
Set a generic property. | |
virtual bool | SetProperty (csStringID propertyID, iCelPropertyClass *value)=0 |
Set a generic property. | |
virtual bool | SetProperty (csStringID propertyID, iCelEntity *entity)=0 |
Set a generic property. | |
virtual celDataType | GetPropertyOrActionType (csStringID propertyID)=0 |
Get the type of the given property or action. | |
virtual bool | IsPropertyReadOnly (csStringID propertyID)=0 |
Return true if a property is read-only. | |
virtual long | GetPropertyLong (csStringID propertyID)=0 |
Get a property as long. | |
virtual float | GetPropertyFloat (csStringID propertyID)=0 |
Get a property as float. | |
virtual bool | GetPropertyBool (csStringID propertyID)=0 |
Get a property as bool. | |
virtual const char * | GetPropertyString (csStringID propertyID)=0 |
Get a property as string. | |
virtual bool | GetPropertyVector (csStringID propertyID, csVector2 &v)=0 |
Get a property as a 2D vector. | |
virtual bool | GetPropertyVector (csStringID propertyID, csVector3 &v)=0 |
Get a property as a 3D vector. | |
virtual bool | GetPropertyColor (csStringID propertyID, csColor &v)=0 |
Get a property as a color. | |
virtual iCelPropertyClass * | GetPropertyPClass (csStringID propertyID)=0 |
Get a property as property class. | |
virtual iCelEntity * | GetPropertyEntity (csStringID propertyID)=0 |
Get a property as entity. | |
virtual bool | PerformAction (csStringID actionID, iCelParameterBlock *params)=0 |
Perform an action with a generic string parameter. | |
virtual size_t | GetPropertyAndActionCount () const =0 |
Return the number of supported properties and actions. | |
virtual csStringID | GetPropertyOrActionID (size_t i)=0 |
Get the ID of the given property or action. | |
virtual const char * | GetPropertyOrActionDescription (csStringID)=0 |
Get the description of the given property or action. | |
virtual void | PropertyClassesHaveChanged ()=0 |
This method is called by the parent entity when there is a change in property class setting. | |
virtual void | TickEveryFrame ()=0 |
This function is called by the physical layer when a broadcast is needed. | |
virtual void | TickOnce ()=0 |
This function is called by the physical layer when a broadcast is needed. | |
virtual csPtr< iCelDataBuffer > | GetPersistentData (celPersistenceType persistence_type)=0 |
Return the persistent data of this property class. | |
virtual celPersistenceResult | SetPersistentData (csTicks data_time, iCelDataBuffer *data, celPersistenceType persistence_type)=0 |
Read the state of this property class from some persistent data. |
Detailed Description
This is a property class for an entity.A property class describe physical attributes of an entity.
Definition at line 105 of file propclas.h.
Member Function Documentation
|
Add a callback which will be fired when a property changes. Not all property class implementations actually have properties. It is safe to call this function with the same callback (nothing will happen in that case and false will be returned). Otherwise this function will IncRef the callback. |
|
Get the parent entity associated with this property class.
Referenced by celStandardLocalEntitySet::IsLocal(). |
|
Get the name of this property class.
|
|
Return the persistent data of this property class. Note: this function replaces the Save function. |
|
Return the number of supported properties and actions.
|
|
Get a property as bool.
|
|
Get a property as a color.
|
|
Get a property as entity.
|
|
Get a property as float.
|
|
Get a property as long.
|
|
Get the description of the given property or action.
|
|
Get the ID of the given property or action.
|
|
Get the type of the given property or action. Returns CEL_DATA_NONE if property is not supported. Only the following types are supported:
|
|
Get a property as property class.
|
|
Get a property as string.
|
|
Get a property as a 3D vector.
|
|
Get a property as a 2D vector.
|
|
Get the tag of this property class or return 0 if there is no tag.
|
|
Return true if a property is read-only.
|
|
Load this object from a data buffer.
|
|
Load this object from a data buffer. This is the first pass version. Most property classes will return 0 here. |
|
Perform an action with a generic string parameter.
|
|
This method is called by the parent entity when there is a change in property class setting. i.e. another property class has been added or removed from the entity. This allows this property class to make adjustments to the references it keeps internally for other property classes. |
|
Remove a callback. It is safe to call this function for a callback that is not registered. Nothing will happen in that case (except that false is returned). This function will DecRef the callback if it was present. |
|
Save this object to a data buffer.
|
|
Save this object to a data buffer. This routine is the first pass saving routine. Few property classes need to implement this. The idea is that here information is saved which is important to make other property classes work. This can be information related to level data that is essential for other property classes. Most property classes will return 0 here. |
|
Set the entity for this property class.
|
|
Read the state of this property class from some persistent data. Note: this function replaces the Load function.
|
|
Set a generic property.
|
|
Set a generic property.
|
|
Set a generic property.
|
|
Set a generic property.
|
|
Set a generic property.
|
|
Set a generic property.
|
|
Set a generic property.
|
|
Set a generic property.
|
|
Set a generic property. In order to make it easier to access properties in a property class from general scripting languages this generic interface to properties is provided. It is always faster and more efficient to set properties directly but this system is usable in general. This function returns false if the property could not be set for some reason. The physical layer maintains a registry of ID's to use. The convention is to use property names like: 'cel.property.num'. |
|
Set the optional tag of this property class. Multiple property classes of the same type (same name) can be attached to the same entity. To do that you need to add a tag so that you can uniquely identify them. |
|
This function is called by the physical layer when a broadcast is needed. Use iCelPlLayer->CallbackPCEveryFrame() to register a PC for this. |
|
This function is called by the physical layer when a broadcast is needed. Use iCelPlLayer->CallbackPCOnce() to register a PC for this. |
The documentation for this struct was generated from the following file:
- physicallayer/propclas.h
Generated for CEL: Crystal Entity Layer by doxygen 1.4.4