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);
46 #if defined(__CYGWIN__) 51 string to_string(
T value) {
63 namespace TMetaUtils {
64 class TNormalizedCtxt;
127 virtual bool ExistingTypeCheck(
const std::string & ,
129 virtual void GetPartiallyDesugaredName(std::string & ) = 0;
130 virtual bool IsAlreadyPartiallyDesugaredName(
const std::string & ,
131 const std::string & ) = 0;
132 virtual bool IsDeclaredScope(
const std::string & ,
bool & ) = 0;
133 virtual bool GetPartiallyDesugaredNameWithScopeHandling(
const std::string & ,
147 void ShortType(std::string &answer,
int mode);
156 std::string
CleanType (
const char *typeDesc,
int mode = 0,
const char **tail=0);
157 bool IsDefAlloc(
const char *alloc,
const char *classname);
158 bool IsDefAlloc(
const char *alloc,
const char *keyclassname,
const char *valueclassname);
159 bool IsDefComp (
const char *comp ,
const char *classname);
160 bool IsDefPred(
const char *predname,
const char *classname);
161 bool IsDefHash(
const char *hashname,
const char *classname);
175 std::string
ResolveTypedef(
const char *tname,
bool resolveAll =
false);
176 std::string
ShortType (
const char *typeDesc,
int mode);
177 std::string
InsertStd(
const char *tname);
184 std::vector<std::string>
v;
189 std::string
GetNameForIO(
const std::string& templateInstanceName,
191 bool* hasChanged =
nullptr);
193 std::string& typeNameBuf,
194 std::array<int, 5>& maxIndices,
204 char *demangled_name = __unDName(0, mangled_name, 0,
malloc,
free, UNDNAME_COMPLETE);
205 if (!demangled_name) {
210 char *demangled_name = abi::__cxa_demangle(mangled_name, 0, 0, &errorCode);
211 if (!demangled_name || errorCode) {
212 free(demangled_name);
216 return demangled_name;
basic_string_view< char > string_view
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
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>
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)
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
ROOT::ESTLType STLKind(std::string_view type)
Converts STL container name to number.
char * DemangleTypeIdName(const std::type_info &ti, int &errorCode)
Demangle in a portable way the type id name.
bool IsStdArray(std::string_view name)
bool IsInterpreterDetail(const char *type)
Return true if the type is one the interpreter details which are only forward declared (ClassInfo_t e...
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
std::string GetLong64_Name(const std::string &original)
Replace 'long long' and 'unsigned long long' by 'Long64_t' and 'ULong64_t'.
void GetNormalizedName(std::string &norm_name, std::string_view name)
Return the normalized name.
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' ...
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 IsUniquePtr(std::string_view name)
std::string GetUniquePtrType(std::string_view name)
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' ...