namespace Reflex::Tools

 Split a scoped name. If returnScope is true return the scope part otherwise
 the base part. If startFromLeft is true, parse from left otherwise from the end.

Function Members (Methods)

public:
stringBuildTypeName(Reflex::Type& t, unsigned int modifiers)
stringDemangle(const type_info& ti)
Reflex::EFUNDAMENTALTYPEFundamentalType(const Reflex::Type& typ)
vector<std::string>GenTemplateArgVec(const string& name)
stringGetBaseName(const string& name, bool startFromLeft = false)
size_tGetBasePosition(const string& name)
size_tGetFirstScopePosition(const string& name)
stringGetScopeName(const string& name, bool startFromLeft = false)
stringGetTemplateArguments(const char* name)
voidGetTemplateComponents(const string& Name, string& templatename, vector<std::string>& args)
stringGetTemplateName(const char* name)
boolIsTemplated(const char* name)
stringNormalizeName(const string& name)
stringNormalizeName(const char* name)
voidStringSplit(vector<std::string>& splitValues, const string& str, const string& delim = ",")
voidStringSplitPair(string& val1, string& val2, const string& str, const string& delim = ",")
voidStringStrip(string& str)
stringStringVec2String(const vector<std::string>& vec)

Class Charts

Function documentation

EFUNDAMENTALTYPE FundamentalType(const Reflex::Type& typ)
 Return an enum representing the fundamental type passed in.
std::string BuildTypeName(Reflex::Type& t, unsigned int modifiers)
 Build a complete qualified type name.
std::vector<std::string> GenTemplateArgVec(const string& name)
 Return a vector of template arguments from a template type string.
void GetTemplateComponents(const string& Name, string& templatename, vector<std::string>& args)
size_t GetBasePosition(const string& name)
 -- Get the position of the base part of a scoped name.

 Remove the template part of the name <...>,
 but we must be careful of:

       operator<,   operator>,
       operator<=,  operator>=,
       operator<<,  operator>>,
       operator<<=, operator>>=
       operator->,  operator->*,
       operator()

size_t GetFirstScopePosition(const string& name)
 Get the position of the first scope of a scoped name.
std::string GetScopeName(const string& name, bool startFromLeft = false)
 Get the scope of a name. Start either from the beginning (startfFromLeft=true) or end.
std::string GetBaseName(const string& name, bool startFromLeft = false)
 Get the base of a name. Start either from the beginning (startFromLeft=true) or end.
bool IsTemplated(const char* name)
 Check if a type name is templated.
 Only check the current scope, i.e. IsTemplated("A<T>::B") will return false!
 Functions are treated as templated if they have an explicit template argument
 in front of their argument list, e.g. both "operator A<T>()" and "int f<T>()"
 are determined to be templated.
void StringSplit(vector<std::string>& splitValues, const string& str, const string& delim = ",")
 Split a string by a delimiter and return it's vector of strings.
std::string StringVec2String(const vector<std::string>& vec)
std::string Demangle(const type_info& ti)
 Demangle a type_info object.
void StringSplitPair(string& val1, string& val2, const string& str, const string& delim = ",")
 Split a string by a delimiter into a pair and return them as val1 and val2.
void StringStrip(string& str)
 Strip spaces at the beginning and the end from a string.
std::string GetTemplateArguments(const char* name)
 Return the template arguments part of a templated type name.
std::string GetTemplateName(const char* name)
 Return the fully qualified scope name without template arguments.
std::string NormalizeName( const char * nam )
 Normalize a type name.
std::string NormalizeName( const std::string & nam )

Author: Stefan Roiser 2004
Last change: root/reflex:$Id: Tools.h 23156 2008-04-11 18:49:22Z pcanal $
Last generated: 2008-06-25 08:31

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.