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);
44 #if defined(__CYGWIN__) 49 string to_string(
T value) {
61 namespace TMetaUtils {
62 class TNormalizedCtxt;
125 virtual bool ExistingTypeCheck(
const std::string & ,
127 virtual void GetPartiallyDesugaredName(std::string & ) = 0;
128 virtual bool IsAlreadyPartiallyDesugaredName(
const std::string & ,
129 const std::string & ) = 0;
130 virtual bool IsDeclaredScope(
const std::string & ,
bool & ) = 0;
131 virtual bool GetPartiallyDesugaredNameWithScopeHandling(
const std::string & ,
145 void ShortType(std::string &answer,
int mode);
154 std::string
CleanType (
const char *typeDesc,
int mode = 0,
const char **tail=0);
155 bool IsDefAlloc(
const char *alloc,
const char *classname);
156 bool IsDefAlloc(
const char *alloc,
const char *keyclassname,
const char *valueclassname);
157 bool IsDefComp (
const char *comp ,
const char *classname);
158 bool IsDefPred(
const char *predname,
const char *classname);
159 bool IsDefHash(
const char *hashname,
const char *classname);
166 int IsSTLCont (
const char *type,
int testAlloc);
177 std::string
ResolveTypedef(
const char *tname,
bool resolveAll =
false);
178 std::string
ShortType (
const char *typeDesc,
int mode);
179 std::string
InsertStd(
const char *tname);
188 std::vector<std::string>
v;
194 std::string
GetNameForIO(
const std::string& templateInstanceName,
196 bool* hasChanged =
nullptr);
198 std::string& typeNameBuf,
199 std::array<int, 5>& maxIndices,
209 char *demangled_name = __unDName(0, mangled_name, 0,
malloc,
free, UNDNAME_COMPLETE);
210 if (!demangled_name) {
215 char *demangled_name = abi::__cxa_demangle(mangled_name, 0, 0, &errorCode);
216 if (!demangled_name || errorCode) {
217 free(demangled_name);
221 return demangled_name;
void GetNormalizedName(std::string &norm_name, ROOT::Internal::TStringView name)
bool IsStdArray(ROOT::Internal::TStringView name)
basic_string_view< char > string_view
Namespace for new ROOT classes and functions.
int GetSplit(const char *type, std::vector< std::string > &output, int &nestedLoc, EModType mode=TClassEdit::kNone)
Stores in output (after emptying it) the split type.
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)
bool IsSTLBitset(const char *type)
Return true is the name is std::bitset<number> or bitset<number>
ROOT::ESTLType UnderlyingIsSTLCont(ROOT::Internal::TStringView type)
int STLArgs(int kind)
Return number of arguments for STL container before allocator.
char * DemangleName(const char *mangled_name, int &errorCode)
std::string GetNameForIO(const std::string &templateInstanceName, TClassEdit::EModType mode=TClassEdit::kNone, bool *hasChanged=nullptr)
void Init(TClassEdit::TInterpreterLookupHelper *helper)
bool IsUniquePtr(ROOT::Internal::TStringView name)
ROOT::ESTLType STLKind(ROOT::Internal::TStringView type)
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
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...
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
std::string GetLong64_Name(const std::string &original)
Replace 'long long' and 'unsigned long long' by 'Long64_t' and 'ULong64_t'.
bool IsVectorBool(const char *name)
virtual ~TInterpreterLookupHelper()
int IsSTLCont(const char *type, int testAlloc)
type : type name: vector<list<classA,allocator>,allocator> testAlloc: if true, we test allocator...
bool IsStdClass(const char *type)
return true if the class belongs to the std namespace
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...
Print a TSeq at the prompt:
TInterpreterLookupHelper()
bool IsDefComp(const char *comp, const char *classname)
return whether or not 'compare' is the STL default comparator for type 'classname' ...
Binding & operator=(OUT(*fun)(void))
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.
bool GetStdArrayProperties(const char *typeName, std::string &typeNameBuf, std::array< int, 5 > &maxIndices, int &ndim)
bool IsDefPred(const char *predname, const char *classname)
return whether or not 'predname' is the STL default predicate for type 'classname' ...
std::string GetUniquePtrType(ROOT::Internal::TStringView name)