ug4
ug::bridge::ClassNameProvider< TClass > Class Template Reference

provides the name for a class More...

#include <class_name_provider.h>

Static Public Member Functions

static const ClassNameNodeclass_name_node ()
 return the class name node in the class hierarchy More...
 
static bool forward_declared ()
 returns if class name is forward declared More...
 
static const std::string & group ()
 groups More...
 
static bool is_a (const std::string &parent, bool strict=false)
 
static const std::string & name ()
 name of this class More...
 
static bool named ()
 returns if the class has been named by user More...
 
static const std::vector< const char * > & names ()
 returns vector of all names including parent class names More...
 
static void set_name (const std::string &nameIn, const std::string &group, bool newName=false)
 set name of class and copy parent names More...
 
template<typename TParent1 >
static void set_name (const std::string &nameIn, const std::string &group, bool newName=false)
 set name of class and copy parent names More...
 
template<typename TParent1 , typename TParent2 >
static void set_name (const std::string &nameIn, const std::string &group, bool newName=false)
 set name of class and copy parent names More...
 

Static Protected Member Functions

static void set_foreward_declared ()
 sets a temporary name to the class More...
 

Static Private Attributes

static bool m_bForwardDeclared
 set to true if class has not been named by user, but a default name given More...
 
static ClassNameNode m_ClassNameNode
 class name node holding own name and pointers to base class name nodes More...
 
static std::string m_group
 Name of group, we're this class is sorted. More...
 
static std::vector< const char * > m_names
 vector of parent class names (depreciated) More...
 

Detailed Description

template<typename TClass>
class ug::bridge::ClassNameProvider< TClass >

provides the name for a class

Member Function Documentation

◆ class_name_node()

template<typename TClass >
static const ClassNameNode& ug::bridge::ClassNameProvider< TClass >::class_name_node ( )
inlinestatic

◆ forward_declared()

template<typename TClass >
static bool ug::bridge::ClassNameProvider< TClass >::forward_declared ( )
inlinestatic

returns if class name is forward declared

◆ group()

template<typename TClass >
static const std::string& ug::bridge::ClassNameProvider< TClass >::group ( )
inlinestatic

◆ is_a()

template<typename TClass >
bool ug::bridge::ClassNameProvider< TClass >::is_a ( const std::string &  parent,
bool  strict = false 
)
static

check if a given class name is equal This function checks if a given class name is equal to this class name. If the flag 'strict' is set to true, the class name must match exactly. If it is set to false, also parent names (of the class hierarchy) are checked and if this class inherits from the parent class true is returned.

References ug::bridge::ClassNameTreeContains(), name, and UG_THROW_REGISTRY_ERROR.

◆ name()

template<typename TClass >
const std::string & ug::bridge::ClassNameProvider< TClass >::name
static

◆ named()

template<typename TClass >
static bool ug::bridge::ClassNameProvider< TClass >::named ( )
inlinestatic

returns if the class has been named by user

◆ names()

template<typename TClass >
const std::vector< const char * > & ug::bridge::ClassNameProvider< TClass >::names
static

returns vector of all names including parent class names

References ug::bridge::ExtractClassNameVec().

Referenced by ug::bridge::ExportedClass< TClass >::class_names().

◆ set_foreward_declared()

template<typename TClass >
void ug::bridge::ClassNameProvider< TClass >::set_foreward_declared
staticprotected

sets a temporary name to the class

References name.

◆ set_name() [1/3]

template<typename TClass >
void ug::bridge::ClassNameProvider< TClass >::set_name ( const std::string &  nameIn,
const std::string &  group,
bool  newName = false 
)
static

set name of class and copy parent names

References name, UG_ERR_LOG, UG_THROW_REGISTRY_ERROR, and UG_THROW_REGISTRY_MSG.

Referenced by ug::bridge::ExportedClass< TClass >::ExportedClass().

◆ set_name() [2/3]

template<typename TClass >
template<typename TParent1 >
static void ug::bridge::ClassNameProvider< TClass >::set_name ( const std::string &  nameIn,
const std::string &  group,
bool  newName = false 
)
static

set name of class and copy parent names

◆ set_name() [3/3]

template<typename TClass >
template<typename TParent1 , typename TParent2 >
static void ug::bridge::ClassNameProvider< TClass >::set_name ( const std::string &  nameIn,
const std::string &  group,
bool  newName = false 
)
static

set name of class and copy parent names

Member Data Documentation

◆ m_bForwardDeclared

template<typename TClass >
bool ug::bridge::ClassNameProvider< TClass >::m_bForwardDeclared
staticprivate

set to true if class has not been named by user, but a default name given

◆ m_ClassNameNode

template<typename TClass >
ClassNameNode ug::bridge::ClassNameProvider< TClass >::m_ClassNameNode
staticprivate

class name node holding own name and pointers to base class name nodes

◆ m_group

template<typename TClass >
std::string ug::bridge::ClassNameProvider< TClass >::m_group
staticprivate

Name of group, we're this class is sorted.

◆ m_names

template<typename TClass >
std::vector<const char*> ug::bridge::ClassNameProvider< TClass >::m_names
staticprivate

vector of parent class names (depreciated)


The documentation for this class was generated from the following files: