Emulation of the CINT ClassInfo class.
The CINT C++ interpreter provides an interface to metadata about a class through the ClassInfo class. This class provides the same functionality, using an interface as close as possible to ClassInfo but the class metadata comes from the Clang C++ compiler, not CINT.
Definition at line 59 of file TClingClassInfo.h.
Public Types | |
| enum | EInheritanceMode { kInThisScope = 0 , kWithInheritance = 1 } |
Public Member Functions | |
| TClingClassInfo () | |
| TClingClassInfo (cling::Interpreter *, Bool_t all=kTRUE) | |
| TClingClassInfo (cling::Interpreter *, const char *classname, bool intantiateTemplate=kTRUE) | |
| TClingClassInfo (cling::Interpreter *interp, const clang::Decl *D) | |
| TClingClassInfo (cling::Interpreter *interp, const clang::Type &tag) | |
| TClingClassInfo (const TClingClassInfo &rhs) | |
| void | AddBaseOffsetFunction (const clang::Decl *decl, OffsetPtrFunc_t func) |
| void | AddBaseOffsetValue (const clang::Decl *decl, ptrdiff_t offset) |
| long | ClassProperty () const |
| void | Delete (void *arena, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const |
| void | DeleteArray (void *arena, bool dtorOnly, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const |
| void | Destruct (void *arena, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const |
| const char * | FileName () |
| void | FullName (std::string &output, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const |
| size_t | GetAlignOf () const |
| Return the alignment of the class in bytes as reported by clang. | |
| ptrdiff_t | GetBaseOffset (TClingClassInfo *toBase, void *address, bool isDerivedObject) |
| const clang::ValueDecl * | GetDataMember (const char *name) const |
| clang::Decl * | GetDecl () |
| virtual const clang::Decl * | GetDecl () const |
| TDictionary::DeclId_t | GetDeclId () const |
| const clang::FunctionTemplateDecl * | GetFunctionTemplate (const char *fname) const |
| TClingMethodInfo | GetMethod (const char *fname) const |
| TClingMethodInfo | GetMethod (const char *fname, const char *proto, bool objectIsConst, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const |
| TClingMethodInfo | GetMethod (const char *fname, const char *proto, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const |
| TClingMethodInfo | GetMethod (const char *fname, const llvm::SmallVectorImpl< clang::QualType > &proto, bool objectIsConst, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const |
| TClingMethodInfo | GetMethod (const char *fname, const llvm::SmallVectorImpl< clang::QualType > &proto, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const |
| int | GetMethodNArg (const char *method, const char *proto, Bool_t objectIsConst, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const |
| TClingMethodInfo | GetMethodWithArgs (const char *fname, const char *arglist, bool objectIsConst, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const |
| TClingMethodInfo | GetMethodWithArgs (const char *fname, const char *arglist, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const |
| Longptr_t | GetOffset (const clang::CXXMethodDecl *md) const |
| const clang::Type * | GetType () const |
| EDataType | GetUnderlyingType () const |
| std::vector< std::string > | GetUsingNamespaces () |
| ROOT::TMetaUtils::EIOCtorCategory | HasDefaultConstructor (bool checkio=false, std::string *type_name=nullptr) const |
| bool | HasMethod (const char *name) const |
| void | Init (const char *name) |
| void | Init (const clang::Decl *decl) |
| void | Init (const clang::Type &tag) |
| void | Init (int tagnum) |
| int | InternalNext () |
| bool | IsBase (const char *name) const |
| bool | IsLoaded () const |
| bool | IsScopedEnum () const |
| virtual bool | IsValid () const |
| bool | IsValidMethod (const char *method, const char *proto, Bool_t objectIsConst, Longptr_t *offset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const |
| virtual const char * | Name () const |
| void * | New (const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const |
| void * | New (int n, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const |
| void * | New (int n, void *arena, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const |
| void * | New (void *arena, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const |
| int | Next () |
| TClingClassInfo & | operator= (const TClingClassInfo &rhs) |
| long | Property () const |
| int | RootFlag () const |
| void | SetDecl (const clang::Decl *D) |
| int | Size () const |
| Return the size of the class in bytes as reported by clang. | |
| Longptr_t | Tagnum () const |
| const char * | Title () |
| const char * | TmpltName () const |
Static Public Member Functions | |
| static bool | IsEnum (cling::Interpreter *interp, const char *name) |
Protected Member Functions | |
| long | Property (long property, clang::QualType &qt) const |
Protected Attributes | |
| const clang::Decl * | fDecl = nullptr |
| std::string | fNameCache |
Private Attributes | |
| std::string | fDeclFileName |
| bool | fDescend: 1 |
| bool | fFirstTime: 1 |
| cling::Interpreter * | fInterp = nullptr |
| bool | fIsIter: 1 |
| clang::DeclContext::decl_iterator | fIter |
| bool | fIterAll: 1 |
| std::vector< clang::DeclContext::decl_iterator > | fIterStack |
| llvm::DenseMap< const clang::Decl *, std::pair< ptrdiff_t, OffsetPtrFunc_t > > | fOffsetCache |
| std::mutex | fOffsetCacheMutex |
| std::string | fTitle |
| const clang::Type * | fType = nullptr |
#include </home/stephan/code/root-2/core/metacling/src/TClingClassInfo.h>
| Enumerator | |
|---|---|
| kInThisScope | |
| kWithInheritance | |
Definition at line 79 of file TClingClassInfo.h.
|
inlineexplicit |
Definition at line 85 of file TClingClassInfo.h.
|
inline |
Definition at line 89 of file TClingClassInfo.h.
Definition at line 73 of file TClingClassInfo.cxx.
|
explicit |
Definition at line 83 of file TClingClassInfo.cxx.
|
explicit |
|
explicit |
|
inline |
Definition at line 118 of file TClingClassInfo.h.
| void TClingClassInfo::AddBaseOffsetValue | ( | const clang::Decl * | decl, |
| ptrdiff_t | offset ) |
Definition at line 133 of file TClingClassInfo.cxx.
| long TClingClassInfo::ClassProperty | ( | ) | const |
Definition at line 143 of file TClingClassInfo.cxx.
| void TClingClassInfo::Delete | ( | void * | arena, |
| const ROOT::TMetaUtils::TNormalizedCtxt & | normCtxt ) const |
Definition at line 206 of file TClingClassInfo.cxx.
| void TClingClassInfo::DeleteArray | ( | void * | arena, |
| bool | dtorOnly, | ||
| const ROOT::TMetaUtils::TNormalizedCtxt & | normCtxt ) const |
Definition at line 223 of file TClingClassInfo.cxx.
| void TClingClassInfo::Destruct | ( | void * | arena, |
| const ROOT::TMetaUtils::TNormalizedCtxt & | normCtxt ) const |
Definition at line 243 of file TClingClassInfo.cxx.
| const char * TClingClassInfo::FileName | ( | ) |
Definition at line 1414 of file TClingClassInfo.cxx.
| void TClingClassInfo::FullName | ( | std::string & | output, |
| const ROOT::TMetaUtils::TNormalizedCtxt & | normCtxt ) const |
Definition at line 1424 of file TClingClassInfo.cxx.
| size_t TClingClassInfo::GetAlignOf | ( | ) | const |
Return the alignment of the class in bytes as reported by clang.
Returns (size_t)-1 if the class info is invalid, 0 for a forward-declared class, an enum, a namespace or or a class with no definition. For all other cases the actual alignment obtained from the clang ASTRecordLayout is returned.
Definition at line 1372 of file TClingClassInfo.cxx.
| ptrdiff_t TClingClassInfo::GetBaseOffset | ( | TClingClassInfo * | toBase, |
| void * | address, | ||
| bool | isDerivedObject ) |
Definition at line 618 of file TClingClassInfo.cxx.
| const clang::ValueDecl * TClingClassInfo::GetDataMember | ( | const char * | name | ) | const |
Definition at line 284 of file TClingClassInfo.cxx.
|
inlineinherited |
Definition at line 39 of file TClingDeclInfo.h.
|
inlinevirtualinherited |
Reimplemented in TClingDataMemberInfo, TClingMethodArgInfo, and TClingMethodInfo.
Definition at line 38 of file TClingDeclInfo.h.
|
inline |
Definition at line 133 of file TClingClassInfo.h.
| const FunctionTemplateDecl * TClingClassInfo::GetFunctionTemplate | ( | const char * | fname | ) | const |
Definition at line 254 of file TClingClassInfo.cxx.
| TClingMethodInfo TClingClassInfo::GetMethod | ( | const char * | fname | ) | const |
Definition at line 298 of file TClingClassInfo.cxx.
| TClingMethodInfo TClingClassInfo::GetMethod | ( | const char * | fname, |
| const char * | proto, | ||
| bool | objectIsConst, | ||
| Longptr_t * | poffset, | ||
| ROOT::EFunctionMatchMode | mode = ROOT::kConversionMatch, | ||
| EInheritanceMode | imode = kWithInheritance ) const |
Definition at line 345 of file TClingClassInfo.cxx.
| TClingMethodInfo TClingClassInfo::GetMethod | ( | const char * | fname, |
| const char * | proto, | ||
| Longptr_t * | poffset, | ||
| ROOT::EFunctionMatchMode | mode = ROOT::kConversionMatch, | ||
| EInheritanceMode | imode = kWithInheritance ) const |
Definition at line 338 of file TClingClassInfo.cxx.
| TClingMethodInfo TClingClassInfo::GetMethod | ( | const char * | fname, |
| const llvm::SmallVectorImpl< clang::QualType > & | proto, | ||
| bool | objectIsConst, | ||
| Longptr_t * | poffset, | ||
| ROOT::EFunctionMatchMode | mode = ROOT::kConversionMatch, | ||
| EInheritanceMode | imode = kWithInheritance ) const |
Definition at line 439 of file TClingClassInfo.cxx.
| TClingMethodInfo TClingClassInfo::GetMethod | ( | const char * | fname, |
| const llvm::SmallVectorImpl< clang::QualType > & | proto, | ||
| Longptr_t * | poffset, | ||
| ROOT::EFunctionMatchMode | mode = ROOT::kConversionMatch, | ||
| EInheritanceMode | imode = kWithInheritance ) const |
Definition at line 431 of file TClingClassInfo.cxx.
| int TClingClassInfo::GetMethodNArg | ( | const char * | method, |
| const char * | proto, | ||
| Bool_t | objectIsConst, | ||
| ROOT::EFunctionMatchMode | mode = ROOT::kConversionMatch ) const |
Definition at line 571 of file TClingClassInfo.cxx.
| TClingMethodInfo TClingClassInfo::GetMethodWithArgs | ( | const char * | fname, |
| const char * | arglist, | ||
| bool | objectIsConst, | ||
| Longptr_t * | poffset, | ||
| ROOT::EFunctionMatchMode | mode = ROOT::kConversionMatch, | ||
| EInheritanceMode | imode = kWithInheritance ) const |
Definition at line 512 of file TClingClassInfo.cxx.
| TClingMethodInfo TClingClassInfo::GetMethodWithArgs | ( | const char * | fname, |
| const char * | arglist, | ||
| Longptr_t * | poffset, | ||
| ROOT::EFunctionMatchMode | mode = ROOT::kConversionMatch, | ||
| EInheritanceMode | imode = kWithInheritance ) const |
Definition at line 505 of file TClingClassInfo.cxx.
| Longptr_t TClingClassInfo::GetOffset | ( | const clang::CXXMethodDecl * | md | ) | const |
Definition at line 591 of file TClingClassInfo.cxx.
|
inline |
Definition at line 161 of file TClingClassInfo.h.
| EDataType TClingClassInfo::GetUnderlyingType | ( | ) | const |
Definition at line 839 of file TClingClassInfo.cxx.
| std::vector< std::string > TClingClassInfo::GetUsingNamespaces | ( | ) |
Definition at line 649 of file TClingClassInfo.cxx.
| ROOT::TMetaUtils::EIOCtorCategory TClingClassInfo::HasDefaultConstructor | ( | bool | checkio = false, |
| std::string * | type_name = nullptr ) const |
Definition at line 678 of file TClingClassInfo.cxx.
| bool TClingClassInfo::HasMethod | ( | const char * | name | ) | const |
Definition at line 716 of file TClingClassInfo.cxx.
| void TClingClassInfo::Init | ( | const char * | name | ) |
Definition at line 728 of file TClingClassInfo.cxx.
| void TClingClassInfo::Init | ( | const clang::Decl * | decl | ) |
| void TClingClassInfo::Init | ( | const clang::Type & | tag | ) |
| void TClingClassInfo::Init | ( | int | tagnum | ) |
Definition at line 768 of file TClingClassInfo.cxx.
| int TClingClassInfo::InternalNext | ( | ) |
Definition at line 935 of file TClingClassInfo.cxx.
| bool TClingClassInfo::IsBase | ( | const char * | name | ) | const |
Definition at line 797 of file TClingClassInfo.cxx.
|
static |
Definition at line 821 of file TClingClassInfo.cxx.
| bool TClingClassInfo::IsLoaded | ( | ) | const |
Definition at line 889 of file TClingClassInfo.cxx.
| bool TClingClassInfo::IsScopedEnum | ( | ) | const |
Definition at line 832 of file TClingClassInfo.cxx.
|
inlinevirtualinherited |
Reimplemented in TClingMethodArgInfo, and TClingTypeInfo.
Definition at line 42 of file TClingDeclInfo.h.
| bool TClingClassInfo::IsValidMethod | ( | const char * | method, |
| const char * | proto, | ||
| Bool_t | objectIsConst, | ||
| Longptr_t * | offset, | ||
| ROOT::EFunctionMatchMode | mode = ROOT::kConversionMatch ) const |
Definition at line 919 of file TClingClassInfo.cxx.
|
virtualinherited |
Reimplemented in TClingDataMemberInfo, TClingMethodInfo, TClingTypedefInfo, and TClingTypeInfo.
Definition at line 29 of file TClingDeclInfo.cxx.
| void * TClingClassInfo::New | ( | const ROOT::TMetaUtils::TNormalizedCtxt & | normCtxt | ) | const |
Definition at line 1068 of file TClingClassInfo.cxx.
| void * TClingClassInfo::New | ( | int | n, |
| const ROOT::TMetaUtils::TNormalizedCtxt & | normCtxt ) const |
Definition at line 1116 of file TClingClassInfo.cxx.
| void * TClingClassInfo::New | ( | int | n, |
| void * | arena, | ||
| const ROOT::TMetaUtils::TNormalizedCtxt & | normCtxt ) const |
Definition at line 1166 of file TClingClassInfo.cxx.
| void * TClingClassInfo::New | ( | void * | arena, |
| const ROOT::TMetaUtils::TNormalizedCtxt & | normCtxt ) const |
Definition at line 1212 of file TClingClassInfo.cxx.
| int TClingClassInfo::Next | ( | ) |
Definition at line 1063 of file TClingClassInfo.cxx.
|
inline |
Definition at line 100 of file TClingClassInfo.h.
| long TClingClassInfo::Property | ( | ) | const |
Definition at line 1257 of file TClingClassInfo.cxx.
|
protectedinherited |
Definition at line 49 of file TClingDeclInfo.cxx.
| int TClingClassInfo::RootFlag | ( | ) | const |
Definition at line 1313 of file TClingClassInfo.cxx.
|
inline |
Definition at line 128 of file TClingClassInfo.h.
| int TClingClassInfo::Size | ( | ) | const |
Return the size of the class in bytes as reported by clang.
Returns -1 if the class info is invalid, 0 for a forward-declared class, an enum, or a class with no definition, and 1 for a namespace (a special value inherited from CINT). For all other cases the actual byte size obtained from the clang ASTRecordLayout is returned.
Definition at line 1328 of file TClingClassInfo.cxx.
| Longptr_t TClingClassInfo::Tagnum | ( | ) | const |
Definition at line 1406 of file TClingClassInfo.cxx.
| const char * TClingClassInfo::Title | ( | ) |
Definition at line 1446 of file TClingClassInfo.cxx.
| const char * TClingClassInfo::TmpltName | ( | ) | const |
Definition at line 1486 of file TClingClassInfo.cxx.
|
protectedinherited |
Definition at line 30 of file TClingDeclInfo.h.
|
private |
Definition at line 72 of file TClingClassInfo.h.
|
private |
Definition at line 65 of file TClingClassInfo.h.
|
private |
Definition at line 64 of file TClingClassInfo.h.
|
private |
Definition at line 63 of file TClingClassInfo.h.
|
private |
Definition at line 67 of file TClingClassInfo.h.
|
private |
Definition at line 68 of file TClingClassInfo.h.
|
private |
Definition at line 66 of file TClingClassInfo.h.
|
private |
Definition at line 70 of file TClingClassInfo.h.
|
mutableprotectedinherited |
Definition at line 31 of file TClingDeclInfo.h.
|
private |
Definition at line 75 of file TClingClassInfo.h.
|
private |
Definition at line 74 of file TClingClassInfo.h.
|
private |
Definition at line 71 of file TClingClassInfo.h.
|
private |
Definition at line 69 of file TClingClassInfo.h.