This reference page is linked to from the following overview topics: Object Model, FBComponent - The Base Entity Class, FBProperty - Object Properties, FBPlug - Object Connection Management, FBCamera - Cameras, FBCharacter - Characters.
Property: Base property class.
A property is a holder for function callbacks into the internals of the application.
You cannot instantiate FBProperty objects. To reference a property:
myProp = myObject.PropertyList.Find( 'Visibility' ) if myProp: myProp.Data = True
To see how to create a custom property in Python, see CustomProperty.py.
Definition at line 173 of file fbproperties.h.
#include <fbproperties.h>
Public Member Functions |
|
FBProperty () | |
Constructor. |
|
IObject_Declare (Implementation) | |
IObject_Declare Interface to IObject. |
|
FBProperty * | InitInternal (KProperty *pProperty) |
Initialize internal pointer. |
|
KProperty * | GetInternal () const |
Get property. |
|
void * | GetValuePtr () const |
Get property value. |
|
FBProperty * | CreateInternal (FBComponent *pParent, char *pName, fbExternalGetSetHandler pGet=NULL, fbExternalGetSetHandler pSet=NULL) |
Creation of internal property. |
|
void | SetInternal (KProperty *pInternal) |
Set internal property. |
|
void | SetEnable (bool pValue) |
Set property enable status. |
|
char * | GetName () |
Get the property's name. |
|
void | SetName (char *pName) |
Set the property's name. |
|
virtual FBPropertyType | GetPropertyType () |
Get the property's type. |
|
char * | GetPropertyTypeName () |
Get the property's type name. |
|
virtual KDataType * | GetDataType () |
Get the property datatype pointer. |
|
int | AsInt () |
Get the property as an integer. |
|
bool | SetInt (int pInt) |
Set the property from an integer. |
|
virtual char * | AsString () |
Get the property as a string. |
|
virtual bool | SetString (char *pString) |
Set the property from a string. |
|
bool | IsMinClamp () |
Indicate if minimum value clamping will be
applied on user input value. |
|
bool | IsMaxClamp () |
Indicate if maximum value clamping will be
applied on user input value. |
|
bool | IsTemporaryProperty () |
Indicate if a property was created on
retrieve because it didn't exist. |
|
bool | AcceptTemporaryProperty (const char *pEnumList[]=NULL, fbExternalGetSetHandler pGet=NULL, fbExternalGetSetHandler pSet=NULL) |
Accept a temporary property as a dynamic
property. |
|
bool | IsObjectList () |
Indicate if is an instance of FBPropertyListObject. |
|
virtual bool | IsReadOnly () |
Is property read-only? |
|
virtual char * | EnumList (int pIndex) |
Return the string of an enum value. |
|
FBStringList * | GetEnumStringList (bool pCreateIt=false) |
String list for enum properties. |
|
void | NotifyEnumStringListChanged () |
Notify system that the enum list was
modified. |
|
void | ModifyPropertyFlag (FBPropertyFlag pFlag, bool pValue) |
ModifyPropertyFlag. |
|
FBPropertyFlag | GetPropertyFlags () |
GetPropertyFlags. |
|
bool | GetPropertyFlag (FBPropertyFlag pFlag) |
GetPropertyFlag. |
|
void | SetMinMax (double pMin, double pMax, bool pForceMinClamp=false, bool pForceMaxClamp=false) |
SetMinMax. |
|
void | SetMin (double pMin, bool pForceMinClamp=false) |
SetMin. |
|
void | SetMax (double pMax, bool pForceMaxClamp=false) |
SetMax. |
|
double | GetMin () |
GetMin. |
|
double | GetMax () |
GetMax. |
|
void * | GetParent () |
Get the parent of the object. |
|
virtual void | SetData (void *pData) |
Set the value of the property, passing the
type as an argument. |
|
virtual void | GetData (void *pData, int pSize, FBEvaluateInfo *pEvalInfo=NULL) const |
Get the value of a property. |
|
virtual bool | IsList () |
Verify if property is of this type. |
|
virtual bool | IsAnimatable () |
bool | IsInternal () const |
bool | IsUserProperty () |
bool | IsReferenceProperty () |
Protected Attributes |
|
FBString | mName |
mName Property unique name. |
|
void * | mParent |
mParent Parent of the property. |
FBProperty | ( | ) |
Constructor.
IObject_Declare | ( | Implementation | ) |
FBProperty* InitInternal | ( | KProperty * | pProperty | ) |
Initialize internal pointer.
KProperty* GetInternal | ( | ) | const |
Get property.
void* GetValuePtr | ( | ) | const |
Get property value.
FBProperty* CreateInternal | ( | FBComponent * | pParent, |
char * | pName, | ||
fbExternalGetSetHandler | pGet = NULL , |
||
fbExternalGetSetHandler | pSet = NULL |
||
) |
Creation of internal property.
void SetInternal | ( | KProperty * | pInternal | ) |
Set internal property.
void SetEnable | ( | bool | pValue | ) |
Set property enable status.
char* GetName | ( | ) |
void SetName | ( | char * | pName | ) |
virtual FBPropertyType GetPropertyType | ( | ) | [virtual] |
Get the property's type.
Reimplemented in FBPropertyListComponentBase, FBPropertyEvent, FBPropertyBase< tType, pPT >, FBPropertyStringList, FBPropertyBaseAnimatable< tType, pPT >, FBPropertyBase< FBTimeSpan, kFBPT_TimeSpan >, FBPropertyBase< FBColor, kFBPT_ColorRGB >, FBPropertyBase< HFBPlug, kFBPT_object >, FBPropertyBase< double, kFBPT_double >, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< HFBProperty, kFBPT_Reference >, FBPropertyBase< int, kFBPT_int >, FBPropertyBase< bool, kFBPT_bool >, FBPropertyBase< tType, kFBPT_enum >, FBPropertyBase< bool, kFBPT_Action >, FBPropertyBase< char *, kFBPT_charptr >, FBPropertyBase< FBVector2d, kFBPT_Vector2D >, FBPropertyBase< FBVector3d, kFBPT_Vector3D >, FBPropertyBase< FBTime, kFBPT_Time >, FBPropertyBase< kReference, kFBPT_kReference >, FBPropertyBase< float, kFBPT_float >, FBPropertyBase< HFBComponent, kFBPT_object >, FBPropertyBaseAnimatable< FBColor, kFBPT_ColorRGB >, FBPropertyBaseAnimatable< int, kFBPT_enum >, FBPropertyBaseAnimatable< double, kFBPT_double >, FBPropertyBaseAnimatable< bool, kFBPT_bool >, and FBPropertyBaseAnimatable< FBVector3d, kFBPT_Vector3D >.
char* GetPropertyTypeName | ( | ) |
virtual KDataType* GetDataType | ( | ) | [virtual] |
Get the property datatype pointer.
Reimplemented in FBPropertyAnimatable.
virtual void SetData | ( | void * | pData | ) | [virtual] |
Set the value of the property, passing the type as an argument.
pData | Value to affect property with. |
Reimplemented in FBPropertyBase< tType, pPT >, FBPropertyAnimatable, FBPropertyBase< FBTimeSpan, kFBPT_TimeSpan >, FBPropertyBase< FBColor, kFBPT_ColorRGB >, FBPropertyBase< HFBPlug, kFBPT_object >, FBPropertyBase< double, kFBPT_double >, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< HFBProperty, kFBPT_Reference >, FBPropertyBase< int, kFBPT_int >, FBPropertyBase< bool, kFBPT_bool >, FBPropertyBase< tType, kFBPT_enum >, FBPropertyBase< bool, kFBPT_Action >, FBPropertyBase< char *, kFBPT_charptr >, FBPropertyBase< FBVector2d, kFBPT_Vector2D >, FBPropertyBase< FBVector3d, kFBPT_Vector3D >, FBPropertyBase< FBTime, kFBPT_Time >, FBPropertyBase< kReference, kFBPT_kReference >, FBPropertyBase< float, kFBPT_float >, and FBPropertyBase< HFBComponent, kFBPT_object >.
virtual void GetData | ( | void * | pData, |
int | pSize, | ||
FBEvaluateInfo * | pEvalInfo =
NULL |
||
) | const [virtual] |
Get the value of a property.
pData | Value to fill with property's current value. |
pSize | Size of pData buffer |
pEvalInfo | Used only with animated properties |
Reimplemented in FBPropertyBase< tType, pPT >, FBPropertyBase< FBTimeSpan, kFBPT_TimeSpan >, FBPropertyBase< FBColor, kFBPT_ColorRGB >, FBPropertyBase< HFBPlug, kFBPT_object >, FBPropertyBase< double, kFBPT_double >, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< HFBProperty, kFBPT_Reference >, FBPropertyBase< int, kFBPT_int >, FBPropertyBase< bool, kFBPT_bool >, FBPropertyBase< tType, kFBPT_enum >, FBPropertyBase< bool, kFBPT_Action >, FBPropertyBase< char *, kFBPT_charptr >, FBPropertyBase< FBVector2d, kFBPT_Vector2D >, FBPropertyBase< FBVector3d, kFBPT_Vector3D >, FBPropertyBase< FBTime, kFBPT_Time >, FBPropertyBase< kReference, kFBPT_kReference >, FBPropertyBase< float, kFBPT_float >, and FBPropertyBase< HFBComponent, kFBPT_object >.
int AsInt | ( | ) |
Get the property as an integer.
bool SetInt | ( | int | pInt | ) |
Set the property from an integer.
pInt | Int to set property from. |
virtual char* AsString | ( | ) | [virtual] |
Get the property as a string.
Reimplemented in FBPropertyBaseEnum< tType >, FBPropertyStringList, and FBPropertyBaseAnimatableEnum< tType >.
virtual bool SetString | ( | char * | pString | ) | [virtual] |
Set the property from a string.
pString | String to set property from. |
Reimplemented in FBPropertyBaseEnum< tType >, FBPropertyStringList, and FBPropertyBaseAnimatableEnum< tType >.
virtual bool IsList | ( | ) | [virtual] |
Verify if property is of this type.
Reimplemented in FBPropertyBasicList, and FBPropertyStringList.
virtual bool IsAnimatable | ( | ) | [virtual] |
Reimplemented in FBPropertyAnimatable.
bool IsInternal | ( | ) | const |
bool IsUserProperty | ( | ) |
bool IsReferenceProperty | ( | ) |
bool IsMinClamp | ( | ) |
Indicate if minimum value clamping will be applied on user input value.
bool IsMaxClamp | ( | ) |
Indicate if maximum value clamping will be applied on user input value.
bool IsTemporaryProperty | ( | ) |
Indicate if a property was created on retrieve because it didn't exist.
bool AcceptTemporaryProperty | ( | const char * | pEnumList[] =
NULL , |
fbExternalGetSetHandler | pGet = NULL , |
||
fbExternalGetSetHandler | pSet = NULL |
||
) |
Accept a temporary property as a dynamic property.
bool IsObjectList | ( | ) |
Indicate if is an instance of FBPropertyListObject.
virtual bool IsReadOnly | ( | ) | [virtual] |
Is property read-only?
Reimplemented in FBPropertyBase< tType, pPT >, FBPropertyBase< FBTimeSpan, kFBPT_TimeSpan >, FBPropertyBase< FBColor, kFBPT_ColorRGB >, FBPropertyBase< HFBPlug, kFBPT_object >, FBPropertyBase< double, kFBPT_double >, FBPropertyBase< tType, kFBPT_object >, FBPropertyBase< HFBProperty, kFBPT_Reference >, FBPropertyBase< int, kFBPT_int >, FBPropertyBase< bool, kFBPT_bool >, FBPropertyBase< tType, kFBPT_enum >, FBPropertyBase< bool, kFBPT_Action >, FBPropertyBase< char *, kFBPT_charptr >, FBPropertyBase< FBVector2d, kFBPT_Vector2D >, FBPropertyBase< FBVector3d, kFBPT_Vector3D >, FBPropertyBase< FBTime, kFBPT_Time >, FBPropertyBase< kReference, kFBPT_kReference >, FBPropertyBase< float, kFBPT_float >, and FBPropertyBase< HFBComponent, kFBPT_object >.
virtual char* EnumList | ( | int | pIndex | ) | [virtual] |
Return the string of an enum value.
pIndex | Enum value to get string for. |
pIndex
.Reimplemented in FBPropertyBaseEnum< tType >, and FBPropertyBaseAnimatableEnum< tType >.
FBStringList* GetEnumStringList | ( | bool | pCreateIt = false |
) |
String list for enum properties.
pCreateIt | Create a new list if necessary. |
void NotifyEnumStringListChanged | ( | ) |
Notify system that the enum list was modified.
void ModifyPropertyFlag | ( | FBPropertyFlag | pFlag, |
bool | pValue | ||
) |
ModifyPropertyFlag.
pFlag | The flag to switch to True or False. |
pValue | The value to set about this flag. |
FBPropertyFlag GetPropertyFlags | ( | ) |
bool GetPropertyFlag | ( | FBPropertyFlag | pFlag | ) |
GetPropertyFlag.
pFlag | Flag to test if it is True or False. |
void SetMinMax | ( | double | pMin, |
double | pMax, | ||
bool | pForceMinClamp =
false , |
||
bool | pForceMaxClamp =
false |
||
) |
SetMinMax.
pMin | Minimum value of the property. |
pMax | Maximum value of the property. |
pForceMinClamp | Force clamping to minimum value of the property. |
pForceMaxClamp | Force clamping to maximum value of the property. |
void SetMin | ( | double | pMin, |
bool | pForceMinClamp =
false |
||
) |
SetMin.
pMin | Minimum value of the property. |
pForceMinClamp | Force clamping to minimum value of the property. |
void SetMax | ( | double | pMax, |
bool | pForceMaxClamp =
false |
||
) |
SetMax.
pMax | Maximum value of the property. |
pForceMaxClamp | Force clamping to maximum value of the property. |
double GetMin | ( | ) |
double GetMax | ( | ) |
void* GetParent | ( | ) | [inline] |
Get the parent of the object.
Definition at line 384 of file fbproperties.h.
{ return mParent; }
mName Property unique name.
Definition at line 179 of file fbproperties.h.
void* mParent
[protected] |
mParent Parent of the property.
Definition at line 181 of file fbproperties.h.