Base template class for all standard properties
Definition at line 490 of file fbproperties.h.
#include <fbproperties.h>
Public Member Functions |
|
FBPropertyBase () | |
Constructor. |
|
FBPropertyBase (const FBPropertyBase< tType, pPT > &pValue) | |
Constructor. |
|
~FBPropertyBase () | |
Destructor. |
|
FBPropertyBase * | Init (void *pParent, char *pName, tType(*pGet)(void *)=NULL, void(*pSet)(void *, tType)=NULL) |
Initialization function. |
|
operator tType () const | |
Overloaded cast to tType operator.
|
|
virtual FBPropertyType | GetPropertyType () override |
Get the property's type. |
|
void | SetPropertyValue (tType pValue) |
Set the value of the internal property.
|
|
tType | GetPropertyValue () |
Get the value of the internal property.
|
|
virtual bool | IsReadOnly () |
Is this class read-only? If there is an
existing set function, this class is read/write, otherwise it is
read-only. |
|
virtual void | GetData (void *pData, int pSize, FBEvaluateInfo *pEvalInfo=NULL) const |
Get value. |
|
virtual void | SetData (void *pData) |
Set value. |
|
void | operator= (tType pValue) |
Overloaded = operator. |
|
Protected Attributes |
|
void(* | Set )(void *, tType) |
Set function pointer. |
|
tType(* | Get )(void *) |
Get function pointer. |
FBPropertyBase | ( | ) | [inline] |
FBPropertyBase | ( | const FBPropertyBase< tType, pPT > & | pValue | ) | [inline] |
Constructor.
pValue | FBPropertyBase. |
Definition at line 504 of file fbproperties.h.
{ operator=((tType)pValue ); }
~FBPropertyBase | ( | ) | [inline] |
FBPropertyBase* Init | ( | void * | pParent, |
char * | pName, | ||
tType(*)(void *) | pGet = NULL , |
||
void(*)(void *, tType) | pSet = NULL |
||
) | [inline] |
Initialization function.
pParent | Parent object. |
pName | Name of base enum. |
pGet | Get function (default=NULL). |
pSet | Set function (default=NULL). |
Definition at line 518 of file fbproperties.h.
void operator= | ( | tType | pValue | ) | [inline] |
Overloaded = operator.
Set the value of the current object using the Set function.
pValue | Value to set for object. |
Reimplemented in FBPropertyBaseEnum< tType >, FBPropertyBaseComponent< tType >, FBPropertyBaseComponent< HFBPlug >, and FBPropertyBaseComponent< HFBComponent >.
Definition at line 532 of file fbproperties.h.
{ SetData( &pValue ); }
operator tType | ( | ) | const [inline] |
Overloaded cast to tType operator.
Get the value of the current object using Get fuction.
Reimplemented in FBPropertyBaseEnum< tType >, FBPropertyBaseComponent< tType >, FBPropertyBaseComponent< HFBPlug >, and FBPropertyBaseComponent< HFBComponent >.
Definition at line 539 of file fbproperties.h.
{ tType Value; GetData( &Value,sizeof(Value) ); return Value; }
virtual FBPropertyType GetPropertyType | ( | ) | [inline, override, virtual] |
Get the property's type.
Reimplemented from FBProperty.
Definition at line 544 of file fbproperties.h.
{ return pPT; }
void SetPropertyValue | ( | tType | pValue | ) | [inline] |
Set the value of the internal property.
pValue | Value to set to internal property. |
Definition at line 549 of file fbproperties.h.
{ if(IsInternal() && GetValuePtr()) { *(tType*)GetValuePtr() = pValue; } }
tType GetPropertyValue | ( | ) | [inline] |
Get the value of the internal property.
Definition at line 560 of file fbproperties.h.
{ if(IsInternal() && GetValuePtr()) { return *(tType*)GetValuePtr(); } else { return (tType)0; } }
virtual bool IsReadOnly | ( | ) | [inline, virtual] |
Is this class read-only? If there is an existing set function, this class is read/write, otherwise it is read-only.
Reimplemented from FBProperty.
Definition at line 575 of file fbproperties.h.
{ return IsInternal() ? (FBProperty::IsReadOnly()) : (Set == NULL); }
virtual void GetData | ( | void * | pData, |
int | pSize, | ||
FBEvaluateInfo * | pEvalInfo =
NULL |
||
) | const [inline, virtual] |
Get value.
pValue | Value to fill with current object value. |
Reimplemented from FBProperty.
Definition at line 580 of file fbproperties.h.
{ if(Get) { *((tType*)pData) = (*Get)(mParent); } else if (IsInternal()) { FBProperty::GetData( pData, pSize, pEvalInfo ); } else { assert(Get != NULL || IsInternal()); *((tType*)pData) = (tType)0; } }
virtual void SetData | ( | void * | pData | ) | [inline, virtual] |
Set value.
pData | Integer to use to set. |
Reimplemented from FBProperty.
Definition at line 599 of file fbproperties.h.
{ if(Set) { (*Set)( mParent,*(tType*)pData ); } else if (IsInternal()) { FBProperty::SetData( pData ); } else { assert( Set != NULL || IsInternal() ); } }
void(* Set)(void
*, tType) [protected] |
tType(* Get)(void
*) [protected] |