## Public API Reference

- Main Page
- Classes
- Files

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

# iPcProperties Struct Reference

This is a general property class. More...

`#include <propclass/prop.h>`

List of all members.

## Public Member Functions

virtual void | AddPropertyListener (iPcPropertyListener *listener)=0
| Add a property listener.
virtual void | Clear ()=0
| Clear all properties.
virtual void | ClearProperty (size_t index)=0
| Clear a property.
virtual void | Dump ()=0
| Debug dump information.
virtual bool | GetPropertyBool (size_t index) const =0
| Get property as bool.
virtual bool | GetPropertyColor (size_t index, csColor &v) const =0
| Get property as bool.
virtual size_t | GetPropertyCount () const =0
| Get the number of properties defined in this property class.
virtual iCelEntity * | GetPropertyEntity (size_t index) const =0
| Get property as entity.
virtual float | GetPropertyFloat (size_t index) const =0
| Get property as float.
virtual size_t | GetPropertyIndex (const char *name)=0
| Get the specified property index for a named property.
virtual long | GetPropertyLong (size_t index) const =0
| Get property as long.
virtual const char * | GetPropertyName (size_t idx) const =0
| Get the specified property name.
virtual iCelPropertyClass * | GetPropertyPClass (size_t index) const =0
| Get property as property class.
virtual const char * | GetPropertyString (size_t index) const =0
| Get property as string.
virtual celDataType | GetPropertyType (size_t index) const =0
| Get the type of a property.
virtual bool | GetPropertyVector (size_t index, csVector3 &v) const =0
| Get property as bool.
virtual bool | GetPropertyVector (size_t index, csVector2 &v) const =0
| Get property as bool.
virtual void | RemovePropertyListener (iPcPropertyListener *listener)=0
| Remove a property listener.
virtual void | SetProperty (const char *name, iCelEntity *entity)=0
| Set property.
virtual void | SetProperty (const char *name, iCelPropertyClass *pclass)=0
| Set property.
virtual void | SetProperty (const char *name, const csColor &value)=0
| Set property.
virtual void | SetProperty (const char *name, const csVector3 &value)=0
| Set property.
virtual void | SetProperty (const char *name, const csVector2 &value)=0
| Set property.
virtual void | SetProperty (const char *name, const char *value)=0
| Set property.
virtual void | SetProperty (const char *name, bool value)=0
| Set property.
virtual void | SetProperty (const char *name, long value)=0
| Set property.
virtual void | SetProperty (const char *name, float value)=0
| Set property.
virtual void | SetPropertyIndex (size_t index, iCelEntity *entity)=0
| Set property based on index.
virtual void | SetPropertyIndex (size_t index, iCelPropertyClass *pc)=0
| Set property based on index.
virtual void | SetPropertyIndex (size_t index, const char *value)=0
| Set property based on index.
virtual void | SetPropertyIndex (size_t index, const csColor &value)=0
| Set property based on index.
virtual void | SetPropertyIndex (size_t index, const csVector3 &value)=0
| Set property based on index.
virtual void | SetPropertyIndex (size_t index, const csVector2 &value)=0
| Set property based on index.
virtual void | SetPropertyIndex (size_t index, bool value)=0
| Set property based on index.
virtual void | SetPropertyIndex (size_t index, long value)=0
| Set property based on index.
virtual void | SetPropertyIndex (size_t index, float value)=0
| Set property based on index.

## Detailed Description

This is a general property class.

This property class can send out the following messages to the behaviour (add prefix 'cel.parameter.' to get the ID for parameters):

- pcproperties_setproperty: sets the property (index)
- pcproperties_clearproperty: clears the property (index)

This property class supports the following actions (add prefix 'cel.action.' to get the ID of the action and add prefix 'cel.parameter.' to get the ID of the parameter):

- SetProperty: parameters 'name' (string) and 'value' (string).

Definition at line 66 of file prop.h.

## Member Function Documentation

virtual void iPcProperties::AddPropertyListener | ( | iPcPropertyListener * | listener | ) | `[pure virtual]`

| Add a property listener. Property listeners are called right before the behaviour is called.

virtual void iPcProperties::Clear | ( |  | ) | `[pure virtual]`

| Clear all properties.

virtual void iPcProperties::ClearProperty | ( | size_t | index | ) | `[pure virtual]`

| Clear a property.

virtual void iPcProperties::Dump | ( |  | ) | `[pure virtual]`

| Debug dump information.

virtual bool iPcProperties::GetPropertyBool | ( | size_t | index | ) | const`[pure virtual]`

| Get property as bool. Returns false if wrong type.

virtual bool iPcProperties::GetPropertyColor | ( | size_t | index,
|  | csColor & | v
| ) | const`[pure virtual]`

| Get property as bool. Returns false if wrong type.

virtual size_t iPcProperties::GetPropertyCount | ( |  | ) | const`[pure virtual]`

| Get the number of properties defined in this property class.

virtual iCelEntity* iPcProperties::GetPropertyEntity | ( | size_t | index | ) | const`[pure virtual]`

| Get property as entity. Returns 0 if wrong type.

virtual float iPcProperties::GetPropertyFloat | ( | size_t | index | ) | const`[pure virtual]`

| Get property as float. Returns 0 if wrong type.

virtual size_t iPcProperties::GetPropertyIndex | ( | const char * | name | ) | `[pure virtual]`

| Get the specified property index for a named property. Returns -1 if not found.

virtual long iPcProperties::GetPropertyLong | ( | size_t | index | ) | const`[pure virtual]`

| Get property as long. Returns 0 if wrong type.

virtual const char* iPcProperties::GetPropertyName | ( | size_t | idx | ) | const`[pure virtual]`

| Get the specified property name.

virtual iCelPropertyClass* iPcProperties::GetPropertyPClass | ( | size_t | index | ) | const`[pure virtual]`

| Get property as property class. Returns 0 if wrong type.

virtual const char* iPcProperties::GetPropertyString | ( | size_t | index | ) | const`[pure virtual]`

| Get property as string. Returns 0 if wrong type.

virtual celDataType iPcProperties::GetPropertyType | ( | size_t | index | ) | const`[pure virtual]`

Get the type of a property.

Returns CEL_DATA_NONE if the property is undefined. Note that only the following data types are supported:

- CEL_DATA_LONG
- CEL_DATA_FLOAT
- CEL_DATA_BOOL
- CEL_DATA_STRING
- CEL_DATA_VECTOR2
- CEL_DATA_VECTOR3
- CEL_DATA_COLOR
- CEL_DATA_PCLASS
- CEL_DATA_ENTITY

virtual bool iPcProperties::GetPropertyVector | ( | size_t | index,
|  | csVector3 & | v
| ) | const`[pure virtual]`

| Get property as bool. Returns false if wrong type.

virtual bool iPcProperties::GetPropertyVector | ( | size_t | index,
|  | csVector2 & | v
| ) | const`[pure virtual]`

| Get property as bool. Returns false if wrong type.

virtual void iPcProperties::RemovePropertyListener | ( | iPcPropertyListener * | listener | ) | `[pure virtual]`

| Remove a property listener.

virtual void iPcProperties::SetProperty | ( | const char * | name,
|  | iCelEntity * | entity
| ) | `[pure virtual]`

| Set property.

virtual void iPcProperties::SetProperty | ( | const char * | name,
|  | iCelPropertyClass * | pclass
| ) | `[pure virtual]`

| Set property.

virtual void iPcProperties::SetProperty | ( | const char * | name,
|  | const csColor & | value
| ) | `[pure virtual]`

| Set property.

virtual void iPcProperties::SetProperty | ( | const char * | name,
|  | const csVector3 & | value
| ) | `[pure virtual]`

| Set property.

virtual void iPcProperties::SetProperty | ( | const char * | name,
|  | const csVector2 & | value
| ) | `[pure virtual]`

| Set property.

virtual void iPcProperties::SetProperty | ( | const char * | name,
|  | const char * | value
| ) | `[pure virtual]`

| Set property.

virtual void iPcProperties::SetProperty | ( | const char * | name,
|  | bool | value
| ) | `[pure virtual]`

| Set property.

virtual void iPcProperties::SetProperty | ( | const char * | name,
|  | long | value
| ) | `[pure virtual]`

| Set property.

virtual void iPcProperties::SetProperty | ( | const char * | name,
|  | float | value
| ) | `[pure virtual]`

| Set property.

virtual void iPcProperties::SetPropertyIndex | ( | size_t | index,
|  | iCelEntity * | entity
| ) | `[pure virtual]`

| Set property based on index.

virtual void iPcProperties::SetPropertyIndex | ( | size_t | index,
|  | iCelPropertyClass * | pc
| ) | `[pure virtual]`

| Set property based on index.

virtual void iPcProperties::SetPropertyIndex | ( | size_t | index,
|  | const char * | value
| ) | `[pure virtual]`

| Set property based on index.

virtual void iPcProperties::SetPropertyIndex | ( | size_t | index,
|  | const csColor & | value
| ) | `[pure virtual]`

| Set property based on index.

virtual void iPcProperties::SetPropertyIndex | ( | size_t | index,
|  | const csVector3 & | value
| ) | `[pure virtual]`

| Set property based on index.

virtual void iPcProperties::SetPropertyIndex | ( | size_t | index,
|  | const csVector2 & | value
| ) | `[pure virtual]`

| Set property based on index.

virtual void iPcProperties::SetPropertyIndex | ( | size_t | index,
|  | bool | value
| ) | `[pure virtual]`

| Set property based on index.

virtual void iPcProperties::SetPropertyIndex | ( | size_t | index,
|  | long | value
| ) | `[pure virtual]`

| Set property based on index.

virtual void iPcProperties::SetPropertyIndex | ( | size_t | index,
|  | float | value
| ) | `[pure virtual]`

| Set property based on index.

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

- propclass/prop.h