namespace TClassEdit

Function Members (Methods)

public:
stringCleanType(const char* typeDesc, int mode = 0, const char** tail = 0)
stringGetLong64_Name(const string& original)
intGetSplit(const char* type, vector<std::string>& output, int& nestedLoc)
boolIsDefAlloc(const char* alloc, const char* classname)
boolIsDefAlloc(const char* alloc, const char* keyclassname, const char* valueclassname)
boolIsDefComp(const char* comp, const char* classname)
boolIsStdClass(const char* type)
intIsSTLCont(const char* type, int testAlloc = 0)
boolIsVectorBool(const char* name)
stringResolveTypedef(const char* tname, bool resolveAll = false)
stringShortType(const char* typeDesc, int mode)
intSTLArgs(int kind)
intSTLKind(const char* type)

Data Members

Class Charts

Function documentation

int STLKind(const char* type)
      Converts STL container name to number. vector -> 1, etc..
int STLArgs(int kind)
      Return number of arguments for STL container before allocator
bool IsDefAlloc(const char* alloc, const char* classname)
 return whether or not 'allocname' is the STL default allocator for type
 'classname'
bool IsDefAlloc(const char* alloc, const char* keyclassname, const char* valueclassname)
 return whether or not 'allocname' is the STL default allocator for a key
 of type 'keyclassname' and a value of type 'valueclassname'
bool IsDefComp(const char* comp, const char* classname)
 return whether or not 'compare' is the STL default comparator for type
 'classname'
string GetLong64_Name(const string& original)
 Replace 'long long' and 'unsigned long long' by 'Long64_t' and 'ULong64_t'
int GetSplit(const char* type, vector<std::string>& output, int& nestedLoc)
  Stores in output (after emptying it) the splited type.
  Stores the location of the tail (nested names) in tailloc (0 indicates no tail).
  Return the number of elements stored.

  First in list is the template name or is empty
         "vector<list<int>,alloc>**" to "vector" "list<int>" "alloc" "**"
   or    "TNamed*" to "" "TNamed" "*"

string CleanType(const char* typeDesc, int mode = 0, const char** tail = 0)
      Cleanup type description, redundant blanks removed
      and redundant tail ignored
      return *tail = pointer to last used character
      if (mode==0) keep keywords
      if (mode==1) remove keywords outside the template params
      if (mode>=2) remove the keywords everywhere.
      if (tail!=0) cut before the trailing *

      The keywords currently are: "const" , "volatile" removed


      CleanType(" A<B, C< D, E> > *,F,G>") returns "A<B,C<D,E> >*"

string ShortType(const char* typeDesc, int mode)
 Return the absolute type of typeDesc.
 E.g.: typeDesc = "class const volatile TNamed**", returns "TNamed**".
 if (mode&1) remove last "*"s                     returns "TNamed"
 if (mode&2) remove default allocators from STL containers
 if (mode&4) remove all     allocators from STL containers
 if (mode&8) return inner class of stl container. list<innerClass>
 if (mode&16) return deapest class of stl container. vector<list<deapest>>

int IsSTLCont(const char* type, int testAlloc = 0)
  type     : type name: vector<list<classA,allocator>,allocator>
  testAlloc: if true, we test allocator, if it is not default result is negative
  result:    0          : not stl container
             abs(result): code of container 1=vector,2=list,3=deque,4=map
                           5=multimap,6=set,7=multiset
             positive val: we have a vector or list with default allocator to any depth
                   like vector<list<vector<int>>>
             negative val: STL container other than vector or int, or non default allocator
                           For example: vector<deque<int>> has answer -1

bool IsStdClass(const char* type)
 return true if the class belond to the std namespace
bool IsVectorBool(const char* name)
string ResolveTypedef(const char* tname, bool resolveAll = false)

Author: Victor Perev 10/04/2003
Last change: root/base:$Id: TClassEdit.h 20882 2007-11-19 11:31:26Z rdm $
Last generated: 2008-06-25 08:35
Copyright (C) 1995-2003, Rene Brun and Fons Rademakers. *

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.