13 #ifndef ROOT_TClassEdit
14 #define ROOT_TClassEdit
17 #include "RConfigure.h"
20 #ifndef UNDNAME_COMPLETE
21 #define UNDNAME_COMPLETE 0x0000
24 char *__unDName(
char *demangled,
const char *mangled,
int out_len,
25 void * (* pAlloc )(
size_t),
void (* pFree )(
void *),
26 unsigned short int flags);
45 #if defined(__CYGWIN__)
50 string to_string(
T value) {
62 namespace TMetaUtils {
63 class TNormalizedCtxt;
73 namespace TClassEdit {
130 const std::string & ) = 0;
146 void ShortType(std::string &answer,
int mode);
155 std::string
CleanType (
const char *typeDesc,
int mode = 0,
const char **tail=0);
156 bool IsDefAlloc(
const char *alloc,
const char *classname);
157 bool IsDefAlloc(
const char *alloc,
const char *keyclassname,
const char *valueclassname);
158 bool IsDefComp (
const char *comp ,
const char *classname);
159 bool IsDefPred(
const char *predname,
const char *classname);
160 bool IsDefHash(
const char *hashname,
const char *classname);
174 std::string
ResolveTypedef(
const char *tname,
bool resolveAll =
false);
175 std::string
ShortType (
const char *typeDesc,
int mode);
176 std::string
InsertStd(
const char *tname);
185 char *demangled_name = __unDName(0, mangled_name, 0,
malloc,
free, UNDNAME_COMPLETE);
186 if (!demangled_name) {
191 char *demangled_name = abi::__cxa_demangle(mangled_name, 0, 0, &errorCode);
192 if (!demangled_name || errorCode) {
193 free(demangled_name);
197 return demangled_name;
ROOT::ESTLType IsSTLCont(std::string_view type)
type : type name: vector<list<classA,allocator>,allocator> result: 0 : not stl container code of cont...
int IsSTLCont(int testAlloc=0) const
type : type name: vector<list<classA,allocator>,allocator> testAlloc: if true, we test allocator...
TSplitType & operator=(const TSplitType &)
TSplitType(const char *type2split, EModType mode=TClassEdit::kNone)
default constructor
int GetSplit(const char *type, std::vector< std::string > &output, int &nestedLoc, EModType mode=TClassEdit::kNone)
Stores in output (after emptying it) the splited type.
ROOT::ESTLType IsInSTL() const
type : type name: vector<list<classA,allocator>,allocator>[::iterator] result: 0 : not stl container ...
virtual bool GetPartiallyDesugaredNameWithScopeHandling(const std::string &, std::string &)=0
bool IsDefAlloc(const char *alloc, const char *classname)
return whether or not 'allocname' is the STL default allocator for type 'classname' ...
std::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 ...
std::string InsertStd(const char *tname)
virtual bool IsDeclaredScope(const std::string &, bool &)=0
bool IsSTLBitset(const char *type)
Return true is the name is std::bitset<number> or bitset<number>
int STLArgs(int kind)
Return number of arguments for STL container before allocator.
void ShortType(std::string &answer, int mode)
Return the absolute type of typeDesc into the string answ.
char * DemangleName(const char *mangled_name, int &errorCode)
void Init(TClassEdit::TInterpreterLookupHelper *helper)
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
ROOT::ESTLType STLKind(std::string_view type)
Converts STL container name to number.
virtual bool ExistingTypeCheck(const std::string &, std::string &)=0
char * DemangleTypeIdName(const std::type_info &ti, int &errorCode)
Demangle in a portable way the type id name.
bool IsInterpreterDetail(const char *type)
Return true if the type is one the interpreter details which are only forward declared (ClassInfo_t e...
virtual void GetPartiallyDesugaredName(std::string &)=0
std::string GetLong64_Name(const char *original)
Replace 'long long' and 'unsigned long long' by 'Long64_t' and 'ULong64_t'.
ROOT::ESTLType UnderlyingIsSTLCont(std::string_view type)
Return the type of STL collection, if any, that is the underlying type of the given type...
EComplexType GetComplexType(const char *)
bool IsDefHash(const char *hashname, const char *classname)
return whether or not 'hashname' is the STL default hash for type 'classname'
std::vector< std::string > fElements
void GetNormalizedName(std::string &norm_name, std::string_view name)
Return the normalized name.
bool IsVectorBool(const char *name)
virtual ~TInterpreterLookupHelper()
bool IsStdClass(const char *type)
return true if the class belongs to the std namespace
virtual bool IsAlreadyPartiallyDesugaredName(const std::string &, const std::string &)=0
TInterpreterLookupHelper()
bool IsDefComp(const char *comp, const char *classname)
return whether or not 'compare' is the STL default comparator for type 'classname' ...
const char * GetUnqualifiedName(const char *name)
Return the start of the unqualified name include in 'original'.
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.
static void output(int code)
Vc_ALWAYS_INLINE_L T *Vc_ALWAYS_INLINE_R malloc(size_t n)
Allocates memory on the Heap with alignment and padding suitable for vectorized access.
bool IsDefPred(const char *predname, const char *classname)
return whether or not 'predname' is the STL default predicate for type 'classname' ...