Clarisse 5.0 SP8 SDK
5.0.5.8.0
|
Manages names structure and guaranties unicity, and offers name manipulation functions. More...
Public Member Functions | |
void | generate_name (const CoreString &name, CoreString &gen_name) const |
Generates a unique name from the incoming name, by adding or incrementing a numeric suffix. | |
void | make_unique (CoreString &name) |
Modify if necessary the incoming name to make it unique. | |
void | make_unique (CoreString &name, CoreSet< CoreString > &names) const |
Modify if necessary the incoming name to make it unique and without changing the current name server. | |
void | clear () |
Removes all the names. | |
virtual size_t | get_memory_size () const override |
![]() | |
bool | is_kindof (const CoreBaseObject &object) const |
CoreString | get_class_info_name () const |
const unsigned long & | get_class_info_id () const |
virtual bool | is_kindof (const CoreClassInfo &cinfo) const |
virtual const CoreClassInfo & | get_class_info () const |
template<class T > | |
T * | cast () |
template<class T > | |
const T * | cast () const |
![]() | |
bool | is_kindof (const CoreClassInfo &cinfo) const |
Static Public Member Functions | |
static void | split_name (const CoreString &name, CoreString &prefix, int &suffix) |
Split a name into a prefix and a suffix number if name qualifies. Ex: name5 -> name (prefix), 5 (suffix). | |
![]() | |
static const CoreClassInfo & | class_info () |
template<class T > | |
static T * | cast (CoreBaseObject *object) |
template<class T > | |
static const T * | cast (const CoreBaseObject *object) |
![]() | |
static const CoreClassInfo & | class_info () |
Get the type descriptor of this instance. | |
Manages names structure and guaranties unicity, and offers name manipulation functions.
void CoreNameServer::generate_name | ( | const CoreString & | name, |
CoreString & | gen_name | ||
) | const |
Generates a unique name from the incoming name, by adding or incrementing a numeric suffix.
[in] | name | incoming name. |
[out] | gen_name | generated name. |
void CoreNameServer::make_unique | ( | CoreString & | name | ) |
Modify if necessary the incoming name to make it unique.
in/out] | name incoming name. Will be modified if necessary to become unique. |
void CoreNameServer::make_unique | ( | CoreString & | name, |
CoreSet< CoreString > & | names | ||
) | const |
Modify if necessary the incoming name to make it unique and without changing the current name server.
in/out] | name incoming name. Will be modified if necessary to become unique. |
in/out] | names the set of all the names already generated |
|
static |
Split a name into a prefix and a suffix number if name qualifies. Ex: name5 -> name (prefix), 5 (suffix).
[in] | name | name to split |
[out] | prefix | part of the name without suffix. If name has no suffix, will be set to empty string "". |
[out] | suffix | suffix number of the name, or -1 if no suffix |