Logo ROOT   master
Reference Guide
ROOT::TMetaUtils Namespace Reference

Namespaces

 AST2SourceTools
 
 propNames
 

Classes

class  AnnotatedRecordDecl
 
class  RConstructorType
 
class  TClingLookupHelper
 
class  TNormalizedCtxt
 

Typedefs

typedef void(* CallWriteStreamer_t) (const AnnotatedRecordDecl &cl, const cling::Interpreter &interp, const TNormalizedCtxt &normCtxt, std::ostream &dictStream, bool isAutoStreamer)
 
typedef std::list< RConstructorTypeRConstructorTypes
 

Enumerations

enum  DataMemberInfo__ValidArrayIndex_error_code {
  VALID, NOT_INT, NOT_DEF, IS_PRIVATE,
  UNKNOWN
}
 
enum  EIOCtorCategory : short { EIOCtorCategory::kAbsent, EIOCtorCategory::kDefault, EIOCtorCategory::kIOPtrType, EIOCtorCategory::kIORefType }
 

Functions

clang::QualType AddDefaultParameters (clang::QualType instanceType, const cling::Interpreter &interpret, const TNormalizedCtxt &normCtxt)
 Add any unspecified template parameters to the class template instance, mentioned anywhere in the type. More...
 
bool BeginsWith (const std::string &theString, const std::string &theSubstring)
 
EIOCtorCategory CheckConstructor (const clang::CXXRecordDecl *, const RConstructorType &, const cling::Interpreter &interp)
 Check if class has constructor of provided type - either default or with single argument. More...
 
bool CheckDefaultConstructor (const clang::CXXRecordDecl *, const cling::Interpreter &interp)
 Checks if default constructor exists and accessible. More...
 
EIOCtorCategory CheckIOConstructor (const clang::CXXRecordDecl *, const char *, const clang::CXXRecordDecl *, const cling::Interpreter &interp)
 Checks IO constructor - must be public and with specified argument. More...
 
bool CheckPublicFuncWithProto (clang::CXXRecordDecl const *, char const *, char const *, const cling::Interpreter &, bool diagnose)
 Return true, if the function (defined by the name and prototype) exists and is public. More...
 
const clang::FunctionDecl * ClassInfo__HasMethod (const clang::DeclContext *cl, char const *, const cling::Interpreter &interp)
 
void CreateNameTypeMap (clang::CXXRecordDecl const &, std::map< std::string, ROOT::Internal::TSchemaType > &)
 
llvm::StringRef DataMemberInfo__ValidArrayIndex (const clang::DeclaratorDecl &m, int *errnum=0, llvm::StringRef *errstr=0)
 ValidArrayIndex return a static string (so use it or copy it immediatly, do not call GrabIndex twice in the same expression) containing the size of the array data member. More...
 
int ElementStreamer (std::ostream &finalString, const clang::NamedDecl &forcontext, const clang::QualType &qti, const char *t, int rwmode, const cling::Interpreter &interp, const char *tcl=0)
 
bool EndsWith (const std::string &theString, const std::string &theSubstring)
 
void Error (const char *location, const char *va_(fmt),...)
 
bool ExtractAttrIntPropertyFromName (const clang::Decl &decl, const std::string &propName, int &propValue)
 This routine counts on the "propName<separator>propValue" format. More...
 
bool ExtractAttrPropertyFromName (const clang::Decl &decl, const std::string &propName, std::string &propValue)
 This routine counts on the "propName<separator>propValue" format. More...
 
int extractAttrString (clang::Attr *attribute, std::string &attrString)
 Extract attr string. More...
 
void ExtractCtxtEnclosingNameSpaces (const clang::DeclContext &, std::list< std::pair< std::string, bool > > &)
 Extract enclosing namespaces recursively. More...
 
void ExtractEnclosingNameSpaces (const clang::Decl &, std::list< std::pair< std::string, bool > > &)
 Extract the immediately outer namespace and then launch the recursion. More...
 
const clang::RecordDecl * ExtractEnclosingScopes (const clang::Decl &decl, std::list< std::pair< std::string, unsigned int > > &enclosingSc)
 Extract the names and types of containing scopes. More...
 
int extractPropertyNameVal (clang::Attr *attribute, std::string &attrName, std::string &attrValue)
 
int extractPropertyNameValFromString (const std::string attributeStr, std::string &attrName, std::string &attrValue)
 
clang::TemplateName ExtractTemplateNameFromQualType (const clang::QualType &qt)
 These manipulations are necessary because a template specialisation type does not inherit from a record type (there is an asymmetry between the decls and the types in the clang interface). More...
 
void Fatal (const char *location, const char *va_(fmt),...)
 
void foreachHeaderInModule (const clang::Module &module, const std::function< void(const clang::Module::Header &)> &closure, bool includeDirectlyUsedModules=true)
 Calls the given lambda on every header in the given module. More...
 
template<typename T >
const T * GetAnnotatedRedeclarable (const T *Redecl)
 
const clang::TypedefNameDecl * GetAnnotatedRedeclarable (const clang::TypedefNameDecl *TND)
 
const clang::TagDecl * GetAnnotatedRedeclarable (const clang::TagDecl *TND)
 
llvm::StringRef GetClassComment (const clang::CXXRecordDecl &decl, clang::SourceLocation *loc, const cling::Interpreter &interpreter)
 Return the class comment after the ClassDef: class MyClass { ... More...
 
int GetClassVersion (const clang::RecordDecl *cl, const cling::Interpreter &interp)
 Return the version number of the class or -1 if the function Class_Version does not exist. More...
 
llvm::StringRef GetComment (const clang::Decl &decl, clang::SourceLocation *loc=0)
 Returns the comment (// striped away), annotating declaration in a meaningful for ROOT IO way. More...
 
void GetCppName (std::string &output, const char *input)
 Return (in the argument 'output') a mangled version of the C++ symbol/type (pass as 'input') that can be used in C++ as a variable name. More...
 
intGetErrorIgnoreLevel ()
 
llvm::StringRef GetFileName (const clang::Decl &decl, const cling::Interpreter &interp)
 Return the header file to be included to declare the Decl. More...
 
void GetFullyQualifiedTypeName (std::string &name, const clang::QualType &type, const cling::Interpreter &interpreter)
 
void GetFullyQualifiedTypeName (std::string &name, const clang::QualType &type, const clang::ASTContext &)
 
const clang::FunctionDecl * GetFuncWithProto (const clang::Decl *cinfo, const char *method, const char *proto, const cling::Interpreter &gInterp, bool diagnose)
 
long GetLineNumber (clang::Decl const *)
 It looks like the template specialization decl actually contains less information on the location of the code than the decl (in case where there is forward declaration, that is what the specialization points to. More...
 
std::string GetModuleFileName (const char *moduleName)
 Return the dictionary file name for a module. More...
 
std::pair< std::string, clang::QualType > GetNameTypeForIO (const clang::QualType &templateInstanceType, const cling::Interpreter &interpreter, const TNormalizedCtxt &normCtxt, TClassEdit::EModType mode=TClassEdit::kNone)
 
bool GetNameWithinNamespace (std::string &, std::string &, std::string &, clang::CXXRecordDecl const *)
 Return true if one of the class' enclosing scope is a namespace and set fullname to the fully qualified name, clsname to the name within a namespace and nsname to the namespace fully qualified name. More...
 
void GetNormalizedName (std::string &norm_name, const clang::QualType &type, const cling::Interpreter &interpreter, const TNormalizedCtxt &normCtxt)
 Return the type name normalized for ROOT, keeping only the ROOT opaque typedef (Double32_t, etc.) and adding default template argument for all types except the STL collections where we remove the default template argument if any. More...
 
void GetNormalizedName (std::string &norm_name, const clang::TypeDecl *typeDecl, const cling::Interpreter &interpreter)
 
clang::QualType GetNormalizedType (const clang::QualType &type, const cling::Interpreter &interpreter, const TNormalizedCtxt &normCtxt)
 Return the type normalized for ROOT, keeping only the ROOT opaque typedef (Double32_t, etc.) and adding default template argument for all types except those explicitly requested to be drop by the user. More...
 
unsigned intGetNumberOfErrors ()
 
const std::string & GetPathSeparator ()
 Return the separator suitable for this platform. More...
 
void GetQualifiedName (std::string &qual_name, const clang::QualType &type, const clang::NamedDecl &forcontext)
 Main implementation relying on GetFullyQualifiedTypeName All other GetQualifiedName functions leverage this one except the one for namespaces. More...
 
std::string GetQualifiedName (const clang::QualType &type, const clang::NamedDecl &forcontext)
 
void GetQualifiedName (std::string &qual_name, const clang::Type &type, const clang::NamedDecl &forcontext)
 
std::string GetQualifiedName (const clang::Type &type, const clang::NamedDecl &forcontext)
 
void GetQualifiedName (std::string &qual_name, const clang::NamedDecl &nd)
 This implementation does not rely on GetFullyQualifiedTypeName. More...
 
std::string GetQualifiedName (const clang::NamedDecl &nd)
 
void GetQualifiedName (std::string &qual_name, const AnnotatedRecordDecl &annotated)
 
std::string GetQualifiedName (const AnnotatedRecordDecl &annotated)
 
void GetQualifiedName (std::string &qual_name, const clang::RecordDecl &recordDecl)
 
std::string GetQualifiedName (const clang::RecordDecl &recordDecl)
 
std::string GetRealPath (const std::string &path)
 
std::pair< bool, intGetTrivialIntegralReturnValue (const clang::FunctionDecl *funcCV, const cling::Interpreter &interp)
 If the function contains 'just': return SomeValue; this routine will extract this value and return it. More...
 
clang::QualType GetTypeForIO (const clang::QualType &templateInstanceType, const cling::Interpreter &interpreter, const TNormalizedCtxt &normCtxt, TClassEdit::EModType mode=TClassEdit::kNone)
 
clang::RecordDecl * GetUnderlyingRecordDecl (clang::QualType type)
 
const clang::Type * GetUnderlyingType (clang::QualType type)
 Return the base/underlying type of a chain of array or pointers type. More...
 
boolGetWarningsAreErrors ()
 
bool HasCustomConvStreamerMemberFunction (const AnnotatedRecordDecl &cl, const clang::CXXRecordDecl *clxx, const cling::Interpreter &interp, const TNormalizedCtxt &normCtxt)
 Return true if the class has a custom member function streamer. More...
 
bool HasCustomOperatorNewArrayPlacement (clang::RecordDecl const &, const cling::Interpreter &interp)
 return true if we can find a custom operator new with placement More...
 
bool HasCustomOperatorNewPlacement (char const *, clang::RecordDecl const &, const cling::Interpreter &)
 return true if we can find a custom operator new with placement More...
 
bool HasCustomOperatorNewPlacement (clang::RecordDecl const &, const cling::Interpreter &)
 return true if we can find a custom operator new with placement More...
 
bool HasCustomStreamerMemberFunction (const AnnotatedRecordDecl &cl, const clang::CXXRecordDecl *clxx, const cling::Interpreter &interp, const TNormalizedCtxt &normCtxt)
 Return true if the class has a custom member function streamer. More...
 
bool HasDirectoryAutoAdd (clang::CXXRecordDecl const *, const cling::Interpreter &)
 Return true if the class has a method DirectoryAutoAdd(TDirectory *) More...
 
bool HasIOConstructor (clang::CXXRecordDecl const *, std::string &, const RConstructorTypes &, const cling::Interpreter &)
 return true if we can find an constructor calleable without any arguments or with one the IOCtor special types. More...
 
bool HasNewMerge (clang::CXXRecordDecl const *, const cling::Interpreter &)
 Return true if the class has a method Merge(TCollection*,TFileMergeInfo*) More...
 
bool HasOldMerge (clang::CXXRecordDecl const *, const cling::Interpreter &)
 Return true if the class has a method Merge(TCollection*) More...
 
bool hasOpaqueTypedef (clang::QualType instanceType, const TNormalizedCtxt &normCtxt)
 Return true if the type is a Double32_t or Float16_t or is a instance template that depends on Double32_t or Float16_t. More...
 
bool hasOpaqueTypedef (const AnnotatedRecordDecl &cl, const cling::Interpreter &interp, const TNormalizedCtxt &normCtxt)
 Return true if any of the argument is or contains a double32. More...
 
bool HasResetAfterMerge (clang::CXXRecordDecl const *, const cling::Interpreter &)
 Return true if the class has a method ResetAfterMerge(TFileMergeInfo *) More...
 
void Info (const char *location, const char *va_(fmt),...)
 
bool IsBase (const clang::CXXRecordDecl *cl, const clang::CXXRecordDecl *base, const clang::CXXRecordDecl *context, const cling::Interpreter &interp)
 
bool IsBase (const clang::FieldDecl &m, const char *basename, const cling::Interpreter &interp)
 
bool IsHeaderName (const std::string &filename)
 
bool IsLinkdefFile (const char *filename)
 
bool IsOfType (const clang::CXXRecordDecl &cl, const std::string &type, const cling::LookupHelper &lh)
 
bool IsStdClass (const clang::RecordDecl &cl)
 Return true, if the decl is part of the std namespace. More...
 
bool IsStdDropDefaultClass (const clang::RecordDecl &cl)
 Return true, if the decl is part of the std namespace and we want its default parameter dropped. More...
 
ROOT::ESTLType IsSTLCont (const clang::RecordDecl &cl)
 type : type name: vector<list<classA,allocator>,allocator> result: 0 : not stl container abs(result): code of container 1=vector,2=list,3=deque,4=map 5=multimap,6=set,7=multiset More...
 
int IsSTLContainer (const AnnotatedRecordDecl &annotated)
 Is this an STL container. More...
 
ROOT::ESTLType IsSTLContainer (const clang::FieldDecl &m)
 Is this an STL container? More...
 
int IsSTLContainer (const clang::CXXBaseSpecifier &base)
 Is this an STL container? More...
 
bool IsStreamableObject (const clang::FieldDecl &m, const cling::Interpreter &interp)
 
void LevelPrint (bool prefix, int level, const char *location, const char *fmt, va_list ap)
 
bool MatchWithDeclOrAnyOfPrevious (const clang::CXXRecordDecl &cl, const clang::CXXRecordDecl &currentCl)
 This is a recursive function. More...
 
bool NeedDestructor (clang::CXXRecordDecl const *, const cling::Interpreter &)
 
bool NeedTemplateKeyword (clang::CXXRecordDecl const *)
 
clang::ClassTemplateDecl * QualType2ClassTemplateDecl (const clang::QualType &qt)
 Extract from a qualtype the class template if this makes sense. More...
 
bool QualType2Template (const clang::QualType &qt, clang::ClassTemplateDecl *&ctd, clang::ClassTemplateSpecializationDecl *&ctsd)
 Get the template specialisation decl and template decl behind the qualtype Returns true if successfully found, false otherwise. More...
 
int RemoveTemplateArgsFromName (std::string &name, unsigned int)
 Remove the last n template arguments from the name. More...
 
void ReplaceAll (std::string &str, const std::string &from, const std::string &to, bool recurse=false)
 
bool RequireCompleteType (const cling::Interpreter &interp, const clang::CXXRecordDecl *cl)
 
bool RequireCompleteType (const cling::Interpreter &interp, clang::SourceLocation Loc, clang::QualType Type)
 
clang::QualType ReSubstTemplateArg (clang::QualType input, const clang::Type *instance)
 Check if 'input' or any of its template parameter was substituted when instantiating the class template instance and replace it with the partially sugared types we have from 'instance'. More...
 
const clang::CXXRecordDecl * ScopeSearch (const char *name, const cling::Interpreter &gInterp, bool diagnose, const clang::Type **resultType)
 Return the scope corresponding to 'name' or std::'name'. More...
 
void SetPathsForRelocatability (std::vector< std::string > &clingArgs)
 Organise the parameters for cling in order to guarantee relocatability It treats the gcc toolchain and the root include path FIXME: enables relocatability for experiments' framework headers until PCMs are available. More...
 
const char * ShortTypeName (const char *typeDesc)
 Return the absolute type of typeDesc. More...
 
std::string ShortTypeName (const clang::FieldDecl &m)
 Return the absolute type of typeDesc. More...
 
ROOT::ESTLType STLKind (const llvm::StringRef type)
 Converts STL container name to number. vector -> 1, etc.. More...
 
void SysError (const char *location, const char *va_(fmt),...)
 
std::string TrueName (const clang::FieldDecl &m)
 TrueName strips the typedefs and array dimensions. More...
 
void Warning (const char *location, const char *va_(fmt),...)
 
void WriteAuxFunctions (std::ostream &finalString, const AnnotatedRecordDecl &cl, const clang::CXXRecordDecl *decl, const cling::Interpreter &interp, const RConstructorTypes &ctorTypes, const TNormalizedCtxt &normCtxt)
 std::string NormalizedName; GetNormalizedName(NormalizedName, decl->getASTContext().getTypeDeclType(decl), interp, normCtxt); More...
 
void WriteClassCode (CallWriteStreamer_t WriteStreamerFunc, const AnnotatedRecordDecl &cl, const cling::Interpreter &interp, const TNormalizedCtxt &normCtxt, std::ostream &finalString, const RConstructorTypes &ctorTypes, bool isGenreflex)
 Generate the code of the class If the requestor is genreflex, request the new streamer format. More...
 
void WriteClassInit (std::ostream &finalString, const AnnotatedRecordDecl &cl, const clang::CXXRecordDecl *decl, const cling::Interpreter &interp, const TNormalizedCtxt &normCtxt, const RConstructorTypes &ctorTypes, bool &needCollectionProxy)
 FIXME: a function of ~300 lines! More...
 
int WriteNamespaceHeader (std::ostream &, const clang::RecordDecl *)
 
int WriteNamespaceHeader (std::ostream &, const clang::DeclContext *)
 Write all the necessary opening part of the namespace and return the number of closing brackets needed For example for Space1::Space2 we write: namespace Space1 { namespace Space2 { and return 2. More...
 
void WritePointersSTL (const AnnotatedRecordDecl &cl, const cling::Interpreter &interp, const TNormalizedCtxt &normCtxt)
 Write interface function for STL members. More...
 

Variables

const int kError = 2000
 
const int kFatal = 4000
 
const int kInfo = 0
 
const int kMaxLen = 1024
 
const int kNote = 500
 
const int kSysError = 3000
 
const int kWarning = 1000
 

Typedef Documentation

◆ CallWriteStreamer_t

typedef void(* ROOT::TMetaUtils::CallWriteStreamer_t) (const AnnotatedRecordDecl &cl, const cling::Interpreter &interp, const TNormalizedCtxt &normCtxt, std::ostream &dictStream, bool isAutoStreamer)

Definition at line 117 of file TClingUtils.h.

◆ RConstructorTypes

Definition at line 314 of file TClingUtils.h.

Enumeration Type Documentation

◆ DataMemberInfo__ValidArrayIndex_error_code

Enumerator
VALID 
NOT_INT 
NOT_DEF 
IS_PRIVATE 
UNKNOWN 

Definition at line 115 of file TClingUtils.h.

◆ EIOCtorCategory

Enumerator
kAbsent 
kDefault 
kIOPtrType 
kIORefType 

Definition at line 352 of file TClingUtils.h.

Function Documentation

◆ AddDefaultParameters()

clang::QualType ROOT::TMetaUtils::AddDefaultParameters ( clang::QualType  instanceType,
const cling::Interpreter &  interpreter,
const TNormalizedCtxt normCtxt 
)

Add any unspecified template parameters to the class template instance, mentioned anywhere in the type.

Note: this does not strip any typedef but could be merged with cling::utils::Transform::GetPartiallyDesugaredType if we can safely replace TClassEdit::IsStd with a test on the declaring scope and if we can resolve the fact that the added parameter do not take into account possible use/dependences on Double32_t and if we decide that adding the default is the right long term solution or not. Whether it is or not depend on the I/O on whether the default template argument might change or not and whether they (should) affect the on disk layout (for STL containers, we do know they do not).

Definition at line 2842 of file TClingUtils.cxx.

◆ BeginsWith()

bool ROOT::TMetaUtils::BeginsWith ( const std::string &  theString,
const std::string &  theSubstring 
)

Definition at line 4991 of file TClingUtils.cxx.

◆ CheckConstructor()

ROOT::TMetaUtils::EIOCtorCategory ROOT::TMetaUtils::CheckConstructor ( const clang::CXXRecordDecl *  cl,
const RConstructorType ioctortype,
const cling::Interpreter &  interp 
)

Check if class has constructor of provided type - either default or with single argument.

Definition at line 1072 of file TClingUtils.cxx.

◆ CheckDefaultConstructor()

bool ROOT::TMetaUtils::CheckDefaultConstructor ( const clang::CXXRecordDecl *  cl,
const cling::Interpreter &  interp 
)

Checks if default constructor exists and accessible.

Definition at line 994 of file TClingUtils.cxx.

◆ CheckIOConstructor()

ROOT::TMetaUtils::EIOCtorCategory ROOT::TMetaUtils::CheckIOConstructor ( const clang::CXXRecordDecl *  cl,
const char *  typeOfArg,
const clang::CXXRecordDecl *  expectedArgType,
const cling::Interpreter &  interp 
)

Checks IO constructor - must be public and with specified argument.

Definition at line 1014 of file TClingUtils.cxx.

◆ CheckPublicFuncWithProto()

bool ROOT::TMetaUtils::CheckPublicFuncWithProto ( clang::CXXRecordDecl const *  cl,
char const *  methodname,
char const *  proto,
const cling::Interpreter &  interp,
bool  diagnose 
)

Return true, if the function (defined by the name and prototype) exists and is public.

Definition at line 1195 of file TClingUtils.cxx.

◆ ClassInfo__HasMethod()

const clang::FunctionDecl * ROOT::TMetaUtils::ClassInfo__HasMethod ( const clang::DeclContext *  cl,
char const *  name,
const cling::Interpreter &  interp 
)

Definition at line 716 of file TClingUtils.cxx.

◆ CreateNameTypeMap()

void ROOT::TMetaUtils::CreateNameTypeMap ( clang::CXXRecordDecl const &  ,
std::map< std::string, ROOT::Internal::TSchemaType > &   
)

◆ DataMemberInfo__ValidArrayIndex()

llvm::StringRef ROOT::TMetaUtils::DataMemberInfo__ValidArrayIndex ( const clang::DeclaratorDecl &  m,
int errnum = 0,
llvm::StringRef *  errstr = 0 
)

ValidArrayIndex return a static string (so use it or copy it immediatly, do not call GrabIndex twice in the same expression) containing the size of the array data member.

In case of error, or if the size is not specified, GrabIndex returns 0. If errnum is not null, *errnum updated with the error number: Cint::G__DataMemberInfo::G__VALID : valid array index Cint::G__DataMemberInfo::G__NOT_INT : array index is not an int Cint::G__DataMemberInfo::G__NOT_DEF : index not defined before array (this IS an error for streaming to disk) Cint::G__DataMemberInfo::G__IS_PRIVATE: index exist in a parent class but is private Cint::G__DataMemberInfo::G__UNKNOWN : index is not known If errstr is not null, *errstr is updated with the address of a static string containing the part of the index with is invalid.

Definition at line 3065 of file TClingUtils.cxx.

◆ ElementStreamer()

int ROOT::TMetaUtils::ElementStreamer ( std::ostream &  finalString,
const clang::NamedDecl &  forcontext,
const clang::QualType &  qti,
const char *  t,
int  rwmode,
const cling::Interpreter &  interp,
const char *  tcl = 0 
)

Definition at line 815 of file TClingUtils.cxx.

◆ EndsWith()

bool ROOT::TMetaUtils::EndsWith ( const std::string &  theString,
const std::string &  theSubstring 
)

Definition at line 4980 of file TClingUtils.cxx.

◆ Error()

void ROOT::TMetaUtils::Error ( const char *  location,
const char *  va_fmt,
  ... 
)
inline

Definition at line 782 of file TClingUtils.h.

◆ ExtractAttrIntPropertyFromName()

bool ROOT::TMetaUtils::ExtractAttrIntPropertyFromName ( const clang::Decl &  decl,
const std::string &  propName,
int propValue 
)

This routine counts on the "propName<separator>propValue" format.

Definition at line 1671 of file TClingUtils.cxx.

◆ ExtractAttrPropertyFromName()

bool ROOT::TMetaUtils::ExtractAttrPropertyFromName ( const clang::Decl &  decl,
const std::string &  propName,
std::string &  propValue 
)

This routine counts on the "propName<separator>propValue" format.

Definition at line 1648 of file TClingUtils.cxx.

◆ extractAttrString()

int ROOT::TMetaUtils::extractAttrString ( clang::Attr *  attribute,
std::string &  attrString 
)

Extract attr string.

Definition at line 1607 of file TClingUtils.cxx.

◆ ExtractCtxtEnclosingNameSpaces()

void ROOT::TMetaUtils::ExtractCtxtEnclosingNameSpaces ( const clang::DeclContext &  ctxt,
std::list< std::pair< std::string, bool > > &  enclosingNamespaces 
)

Extract enclosing namespaces recursively.

Definition at line 4832 of file TClingUtils.cxx.

◆ ExtractEnclosingNameSpaces()

void ROOT::TMetaUtils::ExtractEnclosingNameSpaces ( const clang::Decl &  decl,
std::list< std::pair< std::string, bool > > &  enclosingNamespaces 
)

Extract the immediately outer namespace and then launch the recursion.

Definition at line 4812 of file TClingUtils.cxx.

◆ ExtractEnclosingScopes()

const clang::RecordDecl * ROOT::TMetaUtils::ExtractEnclosingScopes ( const clang::Decl &  decl,
std::list< std::pair< std::string, unsigned int > > &  enclosingSc 
)

Extract the names and types of containing scopes.

Stop if a class is met and return its pointer.

Definition at line 4859 of file TClingUtils.cxx.

◆ extractPropertyNameVal()

int ROOT::TMetaUtils::extractPropertyNameVal ( clang::Attr *  attribute,
std::string &  attrName,
std::string &  attrValue 
)

Definition at line 1637 of file TClingUtils.cxx.

◆ extractPropertyNameValFromString()

int ROOT::TMetaUtils::extractPropertyNameValFromString ( const std::string  attributeStr,
std::string &  attrName,
std::string &  attrValue 
)

Definition at line 1620 of file TClingUtils.cxx.

◆ ExtractTemplateNameFromQualType()

clang::TemplateName ROOT::TMetaUtils::ExtractTemplateNameFromQualType ( const clang::QualType &  qt)

These manipulations are necessary because a template specialisation type does not inherit from a record type (there is an asymmetry between the decls and the types in the clang interface).

We may need therefore to step into the "Decl dimension" to then get back to the "type dimension".

Definition at line 3515 of file TClingUtils.cxx.

◆ Fatal()

void ROOT::TMetaUtils::Fatal ( const char *  location,
const char *  va_fmt,
  ... 
)
inline

Definition at line 822 of file TClingUtils.h.

◆ foreachHeaderInModule()

void ROOT::TMetaUtils::foreachHeaderInModule ( const clang::Module &  module,
const std::function< void(const clang::Module::Header &)> &  closure,
bool  includeDirectlyUsedModules = true 
)

Calls the given lambda on every header in the given module.

includeDirectlyUsedModules designates if the foreach should also loop over the headers in all modules that are directly used via a use declaration in the modulemap.

Definition at line 2619 of file TClingUtils.cxx.

◆ GetAnnotatedRedeclarable() [1/3]

template<typename T >
const T* ROOT::TMetaUtils::GetAnnotatedRedeclarable ( const T *  Redecl)

Definition at line 634 of file TClingUtils.h.

◆ GetAnnotatedRedeclarable() [2/3]

const clang::TypedefNameDecl * ROOT::TMetaUtils::GetAnnotatedRedeclarable ( const clang::TypedefNameDecl *  TND)

Definition at line 4783 of file TClingUtils.cxx.

◆ GetAnnotatedRedeclarable() [3/3]

const clang::TagDecl * ROOT::TMetaUtils::GetAnnotatedRedeclarable ( const clang::TagDecl *  TND)

Definition at line 4797 of file TClingUtils.cxx.

◆ GetClassComment()

llvm::StringRef ROOT::TMetaUtils::GetClassComment ( const clang::CXXRecordDecl &  decl,
clang::SourceLocation *  loc,
const cling::Interpreter &  interpreter 
)

Return the class comment after the ClassDef: class MyClass { ...

ClassDef(MyClass, 1) // class comment

Definition at line 4253 of file TClingUtils.cxx.

◆ GetClassVersion()

int ROOT::TMetaUtils::GetClassVersion ( const clang::RecordDecl *  cl,
const cling::Interpreter &  interp 
)

Return the version number of the class or -1 if the function Class_Version does not exist.

Definition at line 2521 of file TClingUtils.cxx.

◆ GetComment()

llvm::StringRef ROOT::TMetaUtils::GetComment ( const clang::Decl &  decl,
clang::SourceLocation *  loc = 0 
)

Returns the comment (// striped away), annotating declaration in a meaningful for ROOT IO way.

Takes optional out parameter clang::SourceLocation returning the source location of the comment.

CXXMethodDecls, FieldDecls and TagDecls are annotated. CXXMethodDecls declarations and FieldDecls are annotated as follows: Eg. void f(); // comment1 int member; // comment2 Inline definitions of CXXMethodDecls after the closing }
. Eg: void f() {...} // comment3 TagDecls are annotated in the end of the ClassDef macro. Eg. class MyClass { ... ClassDef(MyClass, 1) // comment4

Definition at line 4120 of file TClingUtils.cxx.

◆ GetCppName()

void ROOT::TMetaUtils::GetCppName ( std::string &  out,
const char *  in 
)

Return (in the argument 'output') a mangled version of the C++ symbol/type (pass as 'input') that can be used in C++ as a variable name.

Definition at line 3214 of file TClingUtils.cxx.

◆ GetErrorIgnoreLevel()

int& ROOT::TMetaUtils::GetErrorIgnoreLevel ( )
inline

Definition at line 737 of file TClingUtils.h.

◆ GetFileName()

llvm::StringRef ROOT::TMetaUtils::GetFileName ( const clang::Decl &  decl,
const cling::Interpreter &  interp 
)

Return the header file to be included to declare the Decl.

Definition at line 3275 of file TClingUtils.cxx.

◆ GetFullyQualifiedTypeName() [1/2]

void ROOT::TMetaUtils::GetFullyQualifiedTypeName ( std::string &  name,
const clang::QualType &  type,
const cling::Interpreter &  interpreter 
)

Definition at line 3437 of file TClingUtils.cxx.

◆ GetFullyQualifiedTypeName() [2/2]

void ROOT::TMetaUtils::GetFullyQualifiedTypeName ( std::string &  name,
const clang::QualType &  type,
const clang::ASTContext &  astContext 
)

Definition at line 3425 of file TClingUtils.cxx.

◆ GetFuncWithProto()

const clang::FunctionDecl * ROOT::TMetaUtils::GetFuncWithProto ( const clang::Decl *  cinfo,
const char *  method,
const char *  proto,
const cling::Interpreter &  gInterp,
bool  diagnose 
)

Definition at line 1469 of file TClingUtils.cxx.

◆ GetLineNumber()

long ROOT::TMetaUtils::GetLineNumber ( clang::Decl const *  decl)

It looks like the template specialization decl actually contains less information on the location of the code than the decl (in case where there is forward declaration, that is what the specialization points to.

const clang::CXXRecordDecl* clxx = llvm::dyn_cast<clang::CXXRecordDecl>(decl); if (clxx) { switch(clxx->getTemplateSpecializationKind()) { case clang::TSK_Undeclared: // We want the default behavior break; case clang::TSK_ExplicitInstantiationDeclaration: case clang::TSK_ExplicitInstantiationDefinition: case clang::TSK_ImplicitInstantiation: { // We want the location of the template declaration: const clang::ClassTemplateSpecializationDecl *tmplt_specialization = llvm::dyn_cast<clang::ClassTemplateSpecializationDecl> (clxx); if (tmplt_specialization) { return GetLineNumber(const_cast< clang::ClassTemplateSpecializationDecl *>(tmplt_specialization)->getSpecializedTemplate()); } break; } case clang::TSK_ExplicitSpecialization: // We want the default behavior break; default: break; } }

Definition at line 1509 of file TClingUtils.cxx.

◆ GetModuleFileName()

std::string ROOT::TMetaUtils::GetModuleFileName ( const char *  moduleName)

Return the dictionary file name for a module.

Definition at line 4088 of file TClingUtils.cxx.

◆ GetNameTypeForIO()

std::pair< std::string, clang::QualType > ROOT::TMetaUtils::GetNameTypeForIO ( const clang::QualType &  templateInstanceType,
const cling::Interpreter &  interpreter,
const TNormalizedCtxt normCtxt,
TClassEdit::EModType  mode = TClassEdit::kNone 
)

Definition at line 4029 of file TClingUtils.cxx.

◆ GetNameWithinNamespace()

bool ROOT::TMetaUtils::GetNameWithinNamespace ( std::string &  fullname,
std::string &  clsname,
std::string &  nsname,
clang::CXXRecordDecl const *  cl 
)

Return true if one of the class' enclosing scope is a namespace and set fullname to the fully qualified name, clsname to the name within a namespace and nsname to the namespace fully qualified name.

Definition at line 2147 of file TClingUtils.cxx.

◆ GetNormalizedName() [1/2]

void ROOT::TMetaUtils::GetNormalizedName ( std::string &  norm_name,
const clang::QualType &  type,
const cling::Interpreter &  interpreter,
const TNormalizedCtxt normCtxt 
)

Return the type name normalized for ROOT, keeping only the ROOT opaque typedef (Double32_t, etc.) and adding default template argument for all types except the STL collections where we remove the default template argument if any.

This routine might actually belong in the interpreter because cache the clang::Type might be intepreter specific.

Definition at line 3972 of file TClingUtils.cxx.

◆ GetNormalizedName() [2/2]

void ROOT::TMetaUtils::GetNormalizedName ( std::string &  norm_name,
const clang::TypeDecl *  typeDecl,
const cling::Interpreter &  interpreter 
)

Definition at line 4012 of file TClingUtils.cxx.

◆ GetNormalizedType()

clang::QualType ROOT::TMetaUtils::GetNormalizedType ( const clang::QualType &  type,
const cling::Interpreter &  interpreter,
const TNormalizedCtxt normCtxt 
)

Return the type normalized for ROOT, keeping only the ROOT opaque typedef (Double32_t, etc.) and adding default template argument for all types except those explicitly requested to be drop by the user.

Default template for STL collections are not yet removed by this routine.

Definition at line 3946 of file TClingUtils.cxx.

◆ GetNumberOfErrors()

unsigned int& ROOT::TMetaUtils::GetNumberOfErrors ( )
inline

Definition at line 721 of file TClingUtils.h.

◆ GetPathSeparator()

const std::string & ROOT::TMetaUtils::GetPathSeparator ( )
inline

Return the separator suitable for this platform.

Returns
the path separator slash or backslash depending on the platform.

Definition at line 4973 of file TClingUtils.cxx.

◆ GetQualifiedName() [1/10]

void ROOT::TMetaUtils::GetQualifiedName ( std::string &  qual_name,
const clang::QualType &  type,
const clang::NamedDecl &  forcontext 
)

Main implementation relying on GetFullyQualifiedTypeName All other GetQualifiedName functions leverage this one except the one for namespaces.

Definition at line 1312 of file TClingUtils.cxx.

◆ GetQualifiedName() [2/10]

std::string ROOT::TMetaUtils::GetQualifiedName ( const clang::QualType &  type,
const clang::NamedDecl &  forcontext 
)

Definition at line 1318 of file TClingUtils.cxx.

◆ GetQualifiedName() [3/10]

void ROOT::TMetaUtils::GetQualifiedName ( std::string &  qual_name,
const clang::Type &  type,
const clang::NamedDecl &  forcontext 
)

Definition at line 1330 of file TClingUtils.cxx.

◆ GetQualifiedName() [4/10]

std::string ROOT::TMetaUtils::GetQualifiedName ( const clang::Type &  type,
const clang::NamedDecl &  forcontext 
)

Definition at line 1339 of file TClingUtils.cxx.

◆ GetQualifiedName() [5/10]

void ROOT::TMetaUtils::GetQualifiedName ( std::string &  qual_name,
const clang::NamedDecl &  nd 
)

This implementation does not rely on GetFullyQualifiedTypeName.

Definition at line 1362 of file TClingUtils.cxx.

◆ GetQualifiedName() [6/10]

std::string ROOT::TMetaUtils::GetQualifiedName ( const clang::NamedDecl &  nd)

Definition at line 1379 of file TClingUtils.cxx.

◆ GetQualifiedName() [7/10]

void ROOT::TMetaUtils::GetQualifiedName ( std::string &  qual_name,
const AnnotatedRecordDecl annotated 
)

Definition at line 1407 of file TClingUtils.cxx.

◆ GetQualifiedName() [8/10]

std::string ROOT::TMetaUtils::GetQualifiedName ( const AnnotatedRecordDecl annotated)

Definition at line 1413 of file TClingUtils.cxx.

◆ GetQualifiedName() [9/10]

void ROOT::TMetaUtils::GetQualifiedName ( std::string &  qual_name,
const clang::RecordDecl &  recordDecl 
)

Definition at line 1388 of file TClingUtils.cxx.

◆ GetQualifiedName() [10/10]

std::string ROOT::TMetaUtils::GetQualifiedName ( const clang::RecordDecl &  recordDecl)

Definition at line 1398 of file TClingUtils.cxx.

◆ GetRealPath()

std::string ROOT::TMetaUtils::GetRealPath ( const std::string &  path)
Returns
the resolved normalized absolute path possibly resolving symlinks.

Definition at line 72 of file TClingUtils.cxx.

◆ GetTrivialIntegralReturnValue()

std::pair< bool, int > ROOT::TMetaUtils::GetTrivialIntegralReturnValue ( const clang::FunctionDecl *  funcCV,
const cling::Interpreter &  interp 
)

If the function contains 'just': return SomeValue; this routine will extract this value and return it.

The first element is set to true we have the body of the function and it is indeed a trivial function with just a return of a value. The second element contains the value (or -1 is case of failure)

Definition at line 2548 of file TClingUtils.cxx.

◆ GetTypeForIO()

clang::QualType ROOT::TMetaUtils::GetTypeForIO ( const clang::QualType &  templateInstanceType,
const cling::Interpreter &  interpreter,
const TNormalizedCtxt normCtxt,
TClassEdit::EModType  mode = TClassEdit::kNone 
)

Definition at line 4077 of file TClingUtils.cxx.

◆ GetUnderlyingRecordDecl()

clang::RecordDecl * ROOT::TMetaUtils::GetUnderlyingRecordDecl ( clang::QualType  type)

Definition at line 2778 of file TClingUtils.cxx.

◆ GetUnderlyingType()

const clang::Type * ROOT::TMetaUtils::GetUnderlyingType ( clang::QualType  type)

Return the base/underlying type of a chain of array or pointers type.

Does not yet support the array and pointer part being intermixed.

Definition at line 4287 of file TClingUtils.cxx.

◆ GetWarningsAreErrors()

bool& ROOT::TMetaUtils::GetWarningsAreErrors ( )
inline

Definition at line 729 of file TClingUtils.h.

◆ HasCustomConvStreamerMemberFunction()

bool ROOT::TMetaUtils::HasCustomConvStreamerMemberFunction ( const AnnotatedRecordDecl cl,
const clang::CXXRecordDecl *  clxx,
const cling::Interpreter &  interp,
const TNormalizedCtxt normCtxt 
)

Return true if the class has a custom member function streamer.

Definition at line 1290 of file TClingUtils.cxx.

◆ HasCustomOperatorNewArrayPlacement()

bool ROOT::TMetaUtils::HasCustomOperatorNewArrayPlacement ( clang::RecordDecl const &  cl,
const cling::Interpreter &  interp 
)

return true if we can find a custom operator new with placement

Definition at line 2332 of file TClingUtils.cxx.

◆ HasCustomOperatorNewPlacement() [1/2]

bool ROOT::TMetaUtils::HasCustomOperatorNewPlacement ( char const *  which,
clang::RecordDecl const &  cl,
const cling::Interpreter &  interp 
)

return true if we can find a custom operator new with placement

Definition at line 2244 of file TClingUtils.cxx.

◆ HasCustomOperatorNewPlacement() [2/2]

bool ROOT::TMetaUtils::HasCustomOperatorNewPlacement ( clang::RecordDecl const &  cl,
const cling::Interpreter &  interp 
)

return true if we can find a custom operator new with placement

Definition at line 2324 of file TClingUtils.cxx.

◆ HasCustomStreamerMemberFunction()

bool ROOT::TMetaUtils::HasCustomStreamerMemberFunction ( const AnnotatedRecordDecl cl,
const clang::CXXRecordDecl *  clxx,
const cling::Interpreter &  interp,
const TNormalizedCtxt normCtxt 
)

Return true if the class has a custom member function streamer.

Definition at line 1271 of file TClingUtils.cxx.

◆ HasDirectoryAutoAdd()

bool ROOT::TMetaUtils::HasDirectoryAutoAdd ( clang::CXXRecordDecl const *  cl,
const cling::Interpreter &  interp 
)

Return true if the class has a method DirectoryAutoAdd(TDirectory *)

Definition at line 1211 of file TClingUtils.cxx.

◆ HasIOConstructor()

bool ROOT::TMetaUtils::HasIOConstructor ( clang::CXXRecordDecl const *  cl,
std::string &  arg,
const RConstructorTypes ctorTypes,
const cling::Interpreter &  interp 
)

return true if we can find an constructor calleable without any arguments or with one the IOCtor special types.

Definition at line 1128 of file TClingUtils.cxx.

◆ HasNewMerge()

bool ROOT::TMetaUtils::HasNewMerge ( clang::CXXRecordDecl const *  cl,
const cling::Interpreter &  interp 
)

Return true if the class has a method Merge(TCollection*,TFileMergeInfo*)

Definition at line 1226 of file TClingUtils.cxx.

◆ HasOldMerge()

bool ROOT::TMetaUtils::HasOldMerge ( clang::CXXRecordDecl const *  cl,
const cling::Interpreter &  interp 
)

Return true if the class has a method Merge(TCollection*)

Definition at line 1240 of file TClingUtils.cxx.

◆ hasOpaqueTypedef() [1/2]

bool ROOT::TMetaUtils::hasOpaqueTypedef ( clang::QualType  instanceType,
const TNormalizedCtxt normCtxt 
)

Return true if the type is a Double32_t or Float16_t or is a instance template that depends on Double32_t or Float16_t.

Definition at line 1534 of file TClingUtils.cxx.

◆ hasOpaqueTypedef() [2/2]

bool ROOT::TMetaUtils::hasOpaqueTypedef ( const AnnotatedRecordDecl cl,
const cling::Interpreter &  interp,
const TNormalizedCtxt normCtxt 
)

Return true if any of the argument is or contains a double32.

Definition at line 1587 of file TClingUtils.cxx.

◆ HasResetAfterMerge()

bool ROOT::TMetaUtils::HasResetAfterMerge ( clang::CXXRecordDecl const *  cl,
const cling::Interpreter &  interp 
)

Return true if the class has a method ResetAfterMerge(TFileMergeInfo *)

Definition at line 1255 of file TClingUtils.cxx.

◆ Info()

void ROOT::TMetaUtils::Info ( const char *  location,
const char *  va_fmt,
  ... 
)
inline

Definition at line 802 of file TClingUtils.h.

◆ IsBase() [1/2]

bool ROOT::TMetaUtils::IsBase ( const clang::CXXRecordDecl *  cl,
const clang::CXXRecordDecl *  base,
const clang::CXXRecordDecl *  context,
const cling::Interpreter &  interp 
)

Definition at line 772 of file TClingUtils.cxx.

◆ IsBase() [2/2]

bool ROOT::TMetaUtils::IsBase ( const clang::FieldDecl &  m,
const char *  basename,
const cling::Interpreter &  interp 
)

Definition at line 796 of file TClingUtils.cxx.

◆ IsHeaderName()

bool ROOT::TMetaUtils::IsHeaderName ( const std::string &  filename)

Definition at line 5029 of file TClingUtils.cxx.

◆ IsLinkdefFile()

bool ROOT::TMetaUtils::IsLinkdefFile ( const char *  filename)

Definition at line 5004 of file TClingUtils.cxx.

◆ IsOfType()

bool ROOT::TMetaUtils::IsOfType ( const clang::CXXRecordDecl &  cl,
const std::string &  type,
const cling::LookupHelper &  lh 
)

Definition at line 4369 of file TClingUtils.cxx.

◆ IsStdClass()

bool ROOT::TMetaUtils::IsStdClass ( const clang::RecordDecl &  cl)

Return true, if the decl is part of the std namespace.

Definition at line 4322 of file TClingUtils.cxx.

◆ IsStdDropDefaultClass()

bool ROOT::TMetaUtils::IsStdDropDefaultClass ( const clang::RecordDecl &  cl)

Return true, if the decl is part of the std namespace and we want its default parameter dropped.

Definition at line 4331 of file TClingUtils.cxx.

◆ IsSTLCont()

ROOT::ESTLType ROOT::TMetaUtils::IsSTLCont ( const clang::RecordDecl &  cl)

type : type name: vector<list<classA,allocator>,allocator> result: 0 : not stl container abs(result): code of container 1=vector,2=list,3=deque,4=map 5=multimap,6=set,7=multiset

Definition at line 4399 of file TClingUtils.cxx.

◆ IsSTLContainer() [1/3]

int ROOT::TMetaUtils::IsSTLContainer ( const AnnotatedRecordDecl annotated)

Is this an STL container.

Definition at line 2585 of file TClingUtils.cxx.

◆ IsSTLContainer() [2/3]

ROOT::ESTLType ROOT::TMetaUtils::IsSTLContainer ( const clang::FieldDecl &  m)

Is this an STL container?

Definition at line 2593 of file TClingUtils.cxx.

◆ IsSTLContainer() [3/3]

int ROOT::TMetaUtils::IsSTLContainer ( const clang::CXXBaseSpecifier &  base)

Is this an STL container?

Definition at line 2605 of file TClingUtils.cxx.

◆ IsStreamableObject()

bool ROOT::TMetaUtils::IsStreamableObject ( const clang::FieldDecl &  m,
const cling::Interpreter &  interp 
)

Definition at line 2702 of file TClingUtils.cxx.

◆ LevelPrint()

void ROOT::TMetaUtils::LevelPrint ( bool  prefix,
int  level,
const char *  location,
const char *  fmt,
va_list  ap 
)
inline

Definition at line 743 of file TClingUtils.h.

◆ MatchWithDeclOrAnyOfPrevious()

bool ROOT::TMetaUtils::MatchWithDeclOrAnyOfPrevious ( const clang::CXXRecordDecl &  cl,
const clang::CXXRecordDecl &  currentCl 
)

This is a recursive function.

Definition at line 4349 of file TClingUtils.cxx.

◆ NeedDestructor()

bool ROOT::TMetaUtils::NeedDestructor ( clang::CXXRecordDecl const *  cl,
const cling::Interpreter &  interp 
)

Definition at line 1174 of file TClingUtils.cxx.

◆ NeedTemplateKeyword()

bool ROOT::TMetaUtils::NeedTemplateKeyword ( clang::CXXRecordDecl const *  cl)

Definition at line 2226 of file TClingUtils.cxx.

◆ QualType2ClassTemplateDecl()

clang::ClassTemplateDecl * ROOT::TMetaUtils::QualType2ClassTemplateDecl ( const clang::QualType &  qt)

Extract from a qualtype the class template if this makes sense.

Retuns the ClassTemplateDecl or nullptr otherwise.

Definition at line 3499 of file TClingUtils.cxx.

◆ QualType2Template()

bool ROOT::TMetaUtils::QualType2Template ( const clang::QualType &  qt,
clang::ClassTemplateDecl *&  ctd,
clang::ClassTemplateSpecializationDecl *&  ctsd 
)

Get the template specialisation decl and template decl behind the qualtype Returns true if successfully found, false otherwise.

Definition at line 3455 of file TClingUtils.cxx.

◆ RemoveTemplateArgsFromName()

int ROOT::TMetaUtils::RemoveTemplateArgsFromName ( std::string &  name,
unsigned int  nArgsToRemove 
)

Remove the last n template arguments from the name.

Definition at line 4732 of file TClingUtils.cxx.

◆ ReplaceAll()

void ROOT::TMetaUtils::ReplaceAll ( std::string &  str,
const std::string &  from,
const std::string &  to,
bool  recurse = false 
)

Definition at line 4954 of file TClingUtils.cxx.

◆ RequireCompleteType() [1/2]

bool ROOT::TMetaUtils::RequireCompleteType ( const cling::Interpreter &  interp,
const clang::CXXRecordDecl *  cl 
)

Definition at line 753 of file TClingUtils.cxx.

◆ RequireCompleteType() [2/2]

bool ROOT::TMetaUtils::RequireCompleteType ( const cling::Interpreter &  interp,
clang::SourceLocation  Loc,
clang::QualType  Type 
)

Definition at line 761 of file TClingUtils.cxx.

◆ ReSubstTemplateArg()

clang::QualType ROOT::TMetaUtils::ReSubstTemplateArg ( clang::QualType  input,
const clang::Type *  instance 
)

Check if 'input' or any of its template parameter was substituted when instantiating the class template instance and replace it with the partially sugared types we have from 'instance'.

Definition at line 4477 of file TClingUtils.cxx.

◆ ScopeSearch()

const clang::CXXRecordDecl * ROOT::TMetaUtils::ScopeSearch ( const char *  name,
const cling::Interpreter &  gInterp,
bool  diagnose,
const clang::Type **  resultType 
)

Return the scope corresponding to 'name' or std::'name'.

Definition at line 730 of file TClingUtils.cxx.

◆ SetPathsForRelocatability()

void ROOT::TMetaUtils::SetPathsForRelocatability ( std::vector< std::string > &  clingArgs)

Organise the parameters for cling in order to guarantee relocatability It treats the gcc toolchain and the root include path FIXME: enables relocatability for experiments' framework headers until PCMs are available.

Definition at line 4934 of file TClingUtils.cxx.

◆ ShortTypeName() [1/2]

const char * ROOT::TMetaUtils::ShortTypeName ( const char *  typeDesc)

Return the absolute type of typeDesc.

E.g.: typeDesc = "class TNamed**", returns "TNamed". we remove * and const keywords. (we do not want to remove & ). You need to use the result immediately before it is being overwritten.

Definition at line 2670 of file TClingUtils.cxx.

◆ ShortTypeName() [2/2]

std::string ROOT::TMetaUtils::ShortTypeName ( const clang::FieldDecl &  m)

Return the absolute type of typeDesc.

E.g.: typeDesc = "class TNamed**", returns "TNamed". we remove * and const keywords. (we do not want to remove & ). You need to use the result immediately before it is being overwritten.

Definition at line 2760 of file TClingUtils.cxx.

◆ STLKind()

ROOT::ESTLType ROOT::TMetaUtils::STLKind ( const llvm::StringRef  type)

Converts STL container name to number. vector -> 1, etc..

Definition at line 4760 of file TClingUtils.cxx.

◆ SysError()

void ROOT::TMetaUtils::SysError ( const char *  location,
const char *  va_fmt,
  ... 
)
inline

Definition at line 792 of file TClingUtils.h.

◆ TrueName()

std::string ROOT::TMetaUtils::TrueName ( const clang::FieldDecl &  m)

TrueName strips the typedefs and array dimensions.

Definition at line 2505 of file TClingUtils.cxx.

◆ Warning()

void ROOT::TMetaUtils::Warning ( const char *  location,
const char *  va_fmt,
  ... 
)
inline

Definition at line 812 of file TClingUtils.h.

◆ WriteAuxFunctions()

void ROOT::TMetaUtils::WriteAuxFunctions ( std::ostream &  finalString,
const AnnotatedRecordDecl cl,
const clang::CXXRecordDecl *  decl,
const cling::Interpreter &  interp,
const RConstructorTypes ctorTypes,
const TNormalizedCtxt normCtxt 
)

std::string NormalizedName; GetNormalizedName(NormalizedName, decl->getASTContext().getTypeDeclType(decl), interp, normCtxt);

Definition at line 2341 of file TClingUtils.cxx.

◆ WriteClassCode()

void ROOT::TMetaUtils::WriteClassCode ( CallWriteStreamer_t  WriteStreamerFunc,
const AnnotatedRecordDecl cl,
const cling::Interpreter &  interp,
const TNormalizedCtxt normCtxt,
std::ostream &  finalString,
const RConstructorTypes ctorTypes,
bool  isGenreflex = false 
)

Generate the code of the class If the requestor is genreflex, request the new streamer format.

Definition at line 2793 of file TClingUtils.cxx.

◆ WriteClassInit()

void ROOT::TMetaUtils::WriteClassInit ( std::ostream &  finalString,
const AnnotatedRecordDecl cl,
const clang::CXXRecordDecl *  decl,
const cling::Interpreter &  interp,
const TNormalizedCtxt normCtxt,
const RConstructorTypes ctorTypes,
bool needCollectionProxy 
)

FIXME: a function of ~300 lines!

Definition at line 1693 of file TClingUtils.cxx.

◆ WriteNamespaceHeader() [1/2]

int ROOT::TMetaUtils::WriteNamespaceHeader ( std::ostream &  out,
const clang::RecordDecl *  cl 
)

Definition at line 2219 of file TClingUtils.cxx.

◆ WriteNamespaceHeader() [2/2]

int ROOT::TMetaUtils::WriteNamespaceHeader ( std::ostream &  out,
const clang::DeclContext *  ctxt 
)

Write all the necessary opening part of the namespace and return the number of closing brackets needed For example for Space1::Space2 we write: namespace Space1 { namespace Space2 { and return 2.

Definition at line 2196 of file TClingUtils.cxx.

◆ WritePointersSTL()

void ROOT::TMetaUtils::WritePointersSTL ( const AnnotatedRecordDecl cl,
const cling::Interpreter &  interp,
const TNormalizedCtxt normCtxt 
)

Write interface function for STL members.

Definition at line 2448 of file TClingUtils.cxx.

Variable Documentation

◆ kError

const int ROOT::TMetaUtils::kError = 2000

Definition at line 126 of file TClingUtils.h.

◆ kFatal

const int ROOT::TMetaUtils::kFatal = 4000

Definition at line 128 of file TClingUtils.h.

◆ kInfo

const int ROOT::TMetaUtils::kInfo = 0

Definition at line 123 of file TClingUtils.h.

◆ kMaxLen

const int ROOT::TMetaUtils::kMaxLen = 1024

Definition at line 129 of file TClingUtils.h.

◆ kNote

const int ROOT::TMetaUtils::kNote = 500

Definition at line 124 of file TClingUtils.h.

◆ kSysError

const int ROOT::TMetaUtils::kSysError = 3000

Definition at line 127 of file TClingUtils.h.

◆ kWarning

const int ROOT::TMetaUtils::kWarning = 1000

Definition at line 125 of file TClingUtils.h.