Base template class for enum properties.
Definition at line 619 of file fbproperties.h.
#include <fbproperties.h>
Public Member Functions |
|
FBPropertyBaseEnum () | |
Constructor. |
|
~FBPropertyBaseEnum () | |
Destructor. |
|
FBPropertyBaseEnum (const FBPropertyBaseEnum< tType > &pValue) | |
FBPropertyBaseEnum.
|
|
operator tType () const | |
Overloaded cast to tType operator.
|
|
virtual char * | EnumList (int pIndex) override |
Return the string of an enum value. |
|
virtual char * | AsString () override |
Get as string. |
|
virtual bool | SetString (char *pString) override |
Set string for list. |
|
void | operator= (tType pValue) |
Overloaded = operator. |
|
Static Public Attributes |
|
static const char * | mStrings [] |
String list. |
FBPropertyBaseEnum | ( | ) | [inline] |
~FBPropertyBaseEnum | ( | ) | [inline] |
FBPropertyBaseEnum | ( | const FBPropertyBaseEnum< tType > & | pValue | ) | [inline] |
pValue | FBPropertyBaseEnum. |
Definition at line 638 of file fbproperties.h.
{ operator=((tType)pValue ); }
void operator= | ( | tType | pValue | ) | [inline] |
Overloaded = operator.
Set the value of the current object using Set function.
pValue | Value to set for object. |
Reimplemented from FBPropertyBase< tType, kFBPT_enum >.
Definition at line 645 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 from FBPropertyBase< tType, kFBPT_enum >.
Definition at line 652 of file fbproperties.h.
{ tType Value; GetData( &Value,sizeof(Value) ); return Value; }
virtual char* EnumList | ( | int | pIndex | ) | [inline, override, virtual] |
Return the string of an enum value.
pIndex | Enum value to get string for. |
pIndex
.Reimplemented from FBProperty.
Definition at line 654 of file fbproperties.h.
{ if( IsInternal() ) { return FBProperty::EnumList( pIndex ); } else if(mStrings) { return (char *)mStrings[pIndex]; } else { assert(mStrings || FBPropertyBaseEnum::IsInternal()); return NULL; } }
virtual char* AsString | ( | ) | [inline, override, virtual] |
Get as string.
Reimplemented from FBProperty.
Definition at line 674 of file fbproperties.h.
{ return EnumList( FBPropertyBaseEnum::AsInt() );}
virtual bool SetString | ( | char * | pString | ) | [inline, override, virtual] |
Set string for list.
pString | String to set for list. |
Reimplemented from FBProperty.
Definition at line 679 of file fbproperties.h.
{ int Count=0; const char * tmpstr; while ((tmpstr=EnumList( Count ))!=NULL) { if (strcmp(tmpstr,pString)==0) { FBPropertyBaseEnum::SetData( &Count ); return true; } Count++; } return false; }
const char*
mStrings[] [static] |