Clarisse 4.0 SP5b SDK  4.0.0.0.5.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
CoreNameServer Class Reference

Manages names structure and guaranties unicity, and offers name manipulation functions. More...

Inheritance diagram for CoreNameServer:
CoreBaseObject CoreBaseType

Public Member Functions

void generate_name (const CoreString &name, CoreString &gen_name)
 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 clear ()
 Removes all the names.
 
size_t get_memory_size () const
 
- Public Member Functions inherited from CoreBaseObject
bool is_kindof (const CoreBaseObject &object) const
 
CoreString get_class_info_name () const
 
CoreString get_class_interface () const
 
const unsigned long & get_class_info_id () const
 
bool is_kindof (const CoreClassInfo &cinfo) const
 
virtual const CoreClassInfoget_class_info () const
 
bool operator== (const CoreBaseObject &obj) const
 
template<class T >
T * cast ()
 
template<class T >
const T * cast () const
 
- Public Member Functions inherited from CoreBaseType
bool is_kindof (const CoreClassInfo &cinfo) const
 
bool operator== (const CoreBaseType &obj) 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 Public Member Functions inherited from CoreBaseObject
static const CoreClassInfoclass_info ()
 
static bool ___class_destructor__ (void *instance, const bool &is_array)
 
template<class T >
static T * cast (CoreBaseObject *object)
 
template<class T >
static const T * cast (const CoreBaseObject *object)
 
- Static Public Member Functions inherited from CoreBaseType
static bool ___class_destructor__ (void *instance, const bool &is_array)
 
static const CoreClassInfoclass_info ()
 

Detailed Description

Manages names structure and guaranties unicity, and offers name manipulation functions.

Member Function Documentation

void CoreNameServer::generate_name ( const CoreString name,
CoreString gen_name 
)

Generates a unique name from the incoming name, by adding or incrementing a numeric suffix.

Parameters
[in]nameincoming name.
[out]gen_namegenerated name.
void CoreNameServer::make_unique ( CoreString name)

Modify if necessary the incoming name to make it unique.

Parameters
in/out]name incoming name. Will be modified if necessary to become unique.
void CoreNameServer::split_name ( const CoreString name,
CoreString prefix,
int &  suffix 
)
static

Split a name into a prefix and a suffix number if name qualifies. Ex: name5 -> name (prefix), 5 (suffix).

Parameters
[in]namename to split
[out]prefixpart of the name without suffix. If name has no suffix, will be set to empty string "".
[out]suffixsuffix number of the name, or -1 if no suffix