Clarisse 5.0 SP8 SDK
5.0.5.8.0
|
Public Member Functions | |
OfEnum (OfObjectFactory &factory, const CoreString &name, const int &invalid_value=0) | |
const CoreString & | get_name () const |
void | add_values (const CoreVector< CoreString > &labels, const CoreVector< int > &values) |
This methods provide a way to add/update several values in the enumeration and notify linked attributes only once. | |
void | add_value (const CoreString &label, const int &value) |
void | set_value (const CoreString &label, const int &value) |
const unsigned int & | get_value_count () const |
const CoreString & | get_label (const unsigned int &index) const |
const int & | get_value (const unsigned int &index) const |
int | get_value (const CoreString &label) const |
void | remove_value (const unsigned int &index) |
void | remove_value (const CoreString &label) |
void | remove_all_values () |
bool | add_alias (const unsigned int &value, const CoreString &alias) |
Adds a alias to the specified value. | |
bool | add_alias (const CoreString &label, const CoreString &alias) |
Adds a alias to the specified value. | |
unsigned int | find_value_index (const int &value) const |
Try to find the specified value in the enumeration value list. | |
unsigned int | find_label_index (const CoreString &label) const |
Try to find the specified label in the enumeration label list. | |
const int & | get_invalid_value () const |
enumeration invalid value get accessor | |
const char & | get_separator () const |
method to get the separator character | |
void | set_separator (const char &separator) |
method to set the separator character (this is used to have sub-menus in drop-down lists) | |
void | asleep () |
void | awake (const bool &send_event=true) |
Static Public Member Functions | |
static int | get_value_from_label (const CoreString &label, const OfEnum *enum_ptr) |
static method for convenience to get a value from a label if the label exists or not and if the enum exists or not | |
static bool | get_label_from_value (CoreString &label, const int &value, const OfEnum *enum_ptr) |
static method for convenience to get a value from a label if the label exists or not and if the enum exists or not | |
static bool | validate_label (CoreString &label, const OfEnum *enum_ptr) |
static method for convenience, provides an existing label from a specified label | |
static int | get_invalid_value_enum_not_exists () |
static method for convenience to get specific value when enumeration does not exist | |
static CoreString | get_invalid_label () |
static method to provide an invalid label | |
Friends | |
class | OfAttr |
class | OfObjectFactory |
bool OfEnum::add_alias | ( | const unsigned int & | value, |
const CoreString & | alias | ||
) |
Adds a alias to the specified value.
[in] | the | value to look for |
[in] | the | alias to add |
bool OfEnum::add_alias | ( | const CoreString & | label, |
const CoreString & | alias | ||
) |
Adds a alias to the specified value.
[in] | the | label to look for |
[in] | the | alias to add |
void OfEnum::add_values | ( | const CoreVector< CoreString > & | labels, |
const CoreVector< int > & | values | ||
) |
This methods provide a way to add/update several values in the enumeration and notify linked attributes only once.
[in] | the | vector of labels to add/update |
[in] | the | vector of values, one value per label |
unsigned int OfEnum::find_label_index | ( | const CoreString & | label | ) | const |
Try to find the specified label in the enumeration label list.
[in] | the | label to look for |
unsigned int OfEnum::find_value_index | ( | const int & | value | ) | const |
Try to find the specified value in the enumeration value list.
[in] | the | value to look for |
|
static |
static method to provide an invalid label
const int & OfEnum::get_invalid_value | ( | ) | const |
enumeration invalid value get accessor
|
static |
static method for convenience to get specific value when enumeration does not exist
|
static |
static method for convenience to get a value from a label if the label exists or not and if the enum exists or not
[out] | the | result label |
[in] | the | value to search for |
[in] | the | concerned enumeration |
const char & OfEnum::get_separator | ( | ) | const |
method to get the separator character
|
static |
static method for convenience to get a value from a label if the label exists or not and if the enum exists or not
[in] | the | label to look for |
[in] | the | concerned enumeration |
|
static |
static method for convenience, provides an existing label from a specified label
[out] | the | label or value (as a string) to search for that will be also the result label |
[in] | the | concerned enumeration |