Public Member Functions | Protected Attributes

FBProperty Class Reference

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.


Search for all occurrences

Detailed Description

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:

To see how to create a custom property in Python, see CustomProperty.py.

Definition at line 173 of file fbproperties.h.

#include <fbproperties.h>

Inheritance diagram for FBProperty:
Inheritance graph
[legend]

List of all members.

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.

Constructor & Destructor Documentation

Constructor.


Member Function Documentation

IObject_Declare ( Implementation  )

IObject_Declare Interface to IObject.

Reimplemented from FBPlug.

FBProperty* InitInternal ( KProperty *  pProperty )

Initialize internal pointer.

KProperty* GetInternal ( ) const
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.

Returns:
The property's name.
void SetName ( char *  pName )

Set the property's name.

Parameters:
pName New name for the property.
virtual FBPropertyType GetPropertyType ( ) [virtual]
char* GetPropertyTypeName ( )

Get the property's type name.

Returns:
The property's type name.
virtual KDataType* GetDataType ( ) [virtual]

Get the property datatype pointer.

Returns:
Datatype of property (NULL in the case of the FBProperty overloaded in FBAnimatableProperty).

Reimplemented in FBPropertyAnimatable.

virtual void SetData ( void *  pData ) [virtual]
virtual void GetData ( void *  pData,
int  pSize,
FBEvaluateInfo pEvalInfo = NULL 
) const [virtual]
int AsInt ( )

Get the property as an integer.

Returns:
The integer version of the property.
bool SetInt ( int  pInt )

Set the property from an integer.

Parameters:
pInt Int to set property from.
Returns:
True if it was possible.
virtual char* AsString ( ) [virtual]

Get the property as a string.

Returns:
The string version of the property.

Reimplemented in FBPropertyBaseEnum< tType >, FBPropertyStringList, and FBPropertyBaseAnimatableEnum< tType >.

virtual bool SetString ( char *  pString ) [virtual]

Set the property from a string.

Parameters:
pString String to set property from.
Returns:
True if it was possible.

Reimplemented in FBPropertyBaseEnum< tType >, FBPropertyStringList, and FBPropertyBaseAnimatableEnum< tType >.

virtual bool IsList ( ) [virtual]

Verify if property is of this type.

Returns:
true if property is of type.

Reimplemented in FBPropertyBasicList, and FBPropertyStringList.

virtual bool IsAnimatable ( ) [virtual]
bool IsInternal ( ) const
bool IsUserProperty ( )
bool IsReferenceProperty ( )
bool IsMinClamp ( )

Indicate if minimum value clamping will be applied on user input value.

Returns:
true if property the value will be clamped to a minimum value.
bool IsMaxClamp ( )

Indicate if maximum value clamping will be applied on user input value.

Returns:
true if property the value will be clamped to a maximum value.
bool IsTemporaryProperty ( )

Indicate if a property was created on retrieve because it didn't exist.

Warning:
if there is no call to AcceptTemporaryProperty(), is will be converted to a user property after the file is retrieved.
Returns:
true if property is temporary.
bool AcceptTemporaryProperty ( const char *  pEnumList[] = NULL,
fbExternalGetSetHandler  pGet = NULL,
fbExternalGetSetHandler  pSet = NULL 
)

Accept a temporary property as a dynamic property.

Warning:
if there is no call to AcceptTemporaryProperty(), is will be converted to a user property after the file is retrieved.
Returns:
true if property was temporary and converted to a user property.
bool IsObjectList ( )

Indicate if is an instance of FBPropertyListObject.

Warning:
A FBPropertyListObject will also return true on a call to 'IsList()'.
virtual bool IsReadOnly ( ) [virtual]
virtual char* EnumList ( int  pIndex ) [virtual]

Return the string of an enum value.

Parameters:
pIndex Enum value to get string for.
Returns:
String value of enum specified by pIndex.

Reimplemented in FBPropertyBaseEnum< tType >, and FBPropertyBaseAnimatableEnum< tType >.

FBStringList* GetEnumStringList ( bool  pCreateIt = false )

String list for enum properties.

Parameters:
pCreateIt Create a new list if necessary.
Returns:
the pointer to the string list..
void NotifyEnumStringListChanged ( )

Notify system that the enum list was modified.

void ModifyPropertyFlag ( FBPropertyFlag  pFlag,
bool  pValue 
)

ModifyPropertyFlag.

Parameters:
pFlag The flag to switch to True or False.
pValue The value to set about this flag.
Warning:
Flags are not saved into or read from a FBX file.
FBPropertyFlag GetPropertyFlags ( )

GetPropertyFlags.

Returns:
Return all flags at once.
bool GetPropertyFlag ( FBPropertyFlag  pFlag )

GetPropertyFlag.

Parameters:
pFlag Flag to test if it is True or False.
Returns:
If the flag is True, the function returns True and vice-versa.
Warning:
Flags are not saved into or read from a FBX file.
void SetMinMax ( double  pMin,
double  pMax,
bool  pForceMinClamp = false,
bool  pForceMaxClamp = false 
)

SetMinMax.

Parameters:
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.

Parameters:
pMin Minimum value of the property.
pForceMinClamp Force clamping to minimum value of the property.
void SetMax ( double  pMax,
bool  pForceMaxClamp = false 
)

SetMax.

Parameters:
pMax Maximum value of the property.
pForceMaxClamp Force clamping to maximum value of the property.
double GetMin ( )

GetMin.

Returns:
Minimum value for the property.
double GetMax ( )

GetMax.

Returns:
Maximum value for the property.
void* GetParent ( ) [inline]

Get the parent of the object.

Returns:
Parent object.

Definition at line 384 of file fbproperties.h.

{ return mParent; } 

Member Data Documentation

FBString mName [protected]

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.


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

FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty
FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty FBProperty