Public API Reference

celPcCommon Class Reference

This is a common implementation for a property class from which all other property classes can inherit. More...

#include <celtool/stdpcimp.h>

Inheritance diagram for celPcCommon:

Inheritance graph
List of all members.

Public Member Functions

virtual iCelEntityGetEntity ()
virtual const char * GetName () const
virtual csPtr< iCelDataBufferGetPersistentData (celPersistenceType persistence_type)
virtual bool GetPropertyBool (csStringID id)
virtual bool GetPropertyColor (csStringID id, csColor &c)
virtual iCelEntityGetPropertyEntity (csStringID id)
virtual float GetPropertyFloat (csStringID id)
virtual iBaseGetPropertyIBase (csStringID id)
virtual bool GetPropertyIndexed (int, iBase *&)
virtual bool GetPropertyIndexed (int, iCelEntity *&)
virtual bool GetPropertyIndexed (int, iCelPropertyClass *&)
virtual bool GetPropertyIndexed (int, csColor &)
virtual bool GetPropertyIndexed (int, csVector3 &)
virtual bool GetPropertyIndexed (int, csVector2 &)
virtual bool GetPropertyIndexed (int, const char *&)
virtual bool GetPropertyIndexed (int, bool &b)
virtual bool GetPropertyIndexed (int, float &f)
virtual bool GetPropertyIndexed (int, long &l)
virtual long GetPropertyLong (csStringID id)
virtual iCelPropertyClassGetPropertyPClass (csStringID id)
virtual const char * GetPropertyString (csStringID id)
virtual bool GetPropertyVector (csStringID id, csVector3 &v)
virtual bool GetPropertyVector (csStringID id, csVector2 &v)
virtual const char * GetTag () const
bool HavePropertyClassesChanged ()
virtual bool LoadFirstPass (iCelDataBuffer *)
virtual bool PerformActionIndexed (int, iCelParameterBlock *, celData &ret)
virtual void PropertyClassesHaveChanged ()
virtual csPtr< iCelDataBufferSaveFirstPass ()
virtual celPersistenceResult SetPersistentData (csTicks data_time, iCelDataBuffer *data, celPersistenceType persistence_type)
virtual bool SetPropertyIndexed (int, iBase *ibase)
virtual bool SetPropertyIndexed (int, iCelEntity *entity)
virtual bool SetPropertyIndexed (int, iCelPropertyClass *pclass)
virtual bool SetPropertyIndexed (int, const csColor &)
virtual bool SetPropertyIndexed (int, const csVector3 &)
virtual bool SetPropertyIndexed (int, const csVector2 &)
virtual bool SetPropertyIndexed (int, const char *)
virtual bool SetPropertyIndexed (int, bool)
virtual bool SetPropertyIndexed (int, float)
virtual bool SetPropertyIndexed (int, long)
virtual void TickEveryFrame ()
virtual void TickOnce ()

Protected Member Functions

void AddAction (int idx, const char *id)
 Helper function to setup an action.
void AddProperty (int idx, const char *id, celDataType type, bool readonly, const char *desc, void *prop)
 Helper function to setup properties.

Protected Attributes

csWeakRef< iCelPlLayerpl
void ** propdata

Detailed Description

This is a common implementation for a property class from which all other property classes can inherit.

This makes it easier to write a property class.

Definition at line 80 of file stdpcimp.h.

Member Function Documentation

void celPcCommon::AddAction ( int  idx,
const char *  id 
) [inline, protected]

Helper function to setup an action.

Definition at line 105 of file stdpcimp.h.

References PropertyHolder::actions_done, PropertyHolder::constants, pl, propholder, and csHash::Put().

void celPcCommon::AddProperty ( int  idx,
const char *  id,
celDataType  type,
bool  readonly,
const char *  desc,
void *  prop 
) [inline, protected]

Helper function to setup properties.

idx is a numerical index for the property starting at 0.
id is the id string ('cel.property.bla').
type is the type for the property.
desc is the description.
pointer is the pointer of the field this property corresponds with or 0 if it requires manual intervention.

Definition at line 122 of file stdpcimp.h.

References PropertyHolder::constants, csInvalidStringID(), Property::datatype, Property::desc, Property::id, pl, propdata, PropertyHolder::properties, PropertyHolder::propertycount, propholder, csHash::Put(), and Property::readonly.

The documentation for this class was generated from the following file:
Generated for CEL: Crystal Entity Layer 1.2 by doxygen 1.4.7