Logo ROOT  
Reference Guide
TClingClassInfo Class Referencefinal

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 ()
  More...
 
 TClingClassInfo (cling::Interpreter *, Bool_t all=kTRUE)
  More...
 
 TClingClassInfo (cling::Interpreter *, const char *classname, bool intantiateTemplate=kTRUE)
  More...
 
 TClingClassInfo (cling::Interpreter *, const clang::Decl *)
  More...
 
 TClingClassInfo (cling::Interpreter *, const clang::Type &)
  More...
 
 TClingClassInfo (const TClingClassInfo &rhs)
  More...
 
void AddBaseOffsetFunction (const clang::Decl *decl, OffsetPtrFunc_t func)
  More...
 
void AddBaseOffsetValue (const clang::Decl *decl, ptrdiff_t offset)
  More...
 
long ClassProperty () const
  More...
 
void Delete (void *arena, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
  More...
 
void DeleteArray (void *arena, bool dtorOnly, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
  More...
 
void Destruct (void *arena, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
  More...
 
const char * FileName ()
  More...
 
void FullName (std::string &output, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
  More...
 
ptrdiff_t GetBaseOffset (TClingClassInfo *toBase, void *address, bool isDerivedObject)
  More...
 
const clang::ValueDecl * GetDataMember (const char *name) const
  More...
 
TDictionary::DeclId_t GetDeclId () const
  More...
 
const clang::FunctionTemplateDecl * GetFunctionTemplate (const char *fname) const
  More...
 
TClingMethodInfo GetMethod (const char *fname) const
  More...
 
TClingMethodInfo GetMethod (const char *fname, const char *proto, bool objectIsConst, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const
  More...
 
TClingMethodInfo GetMethod (const char *fname, const char *proto, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const
  More...
 
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
  More...
 
TClingMethodInfo GetMethod (const char *fname, const llvm::SmallVectorImpl< clang::QualType > &proto, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const
  More...
 
int GetMethodNArg (const char *method, const char *proto, Bool_t objectIsConst, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const
  More...
 
TClingMethodInfo GetMethodWithArgs (const char *fname, const char *arglist, bool objectIsConst, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const
  More...
 
TClingMethodInfo GetMethodWithArgs (const char *fname, const char *arglist, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const
  More...
 
Longptr_t GetOffset (const clang::CXXMethodDecl *md) const
  More...
 
const clang::Type * GetType () const
  More...
 
EDataType GetUnderlyingType () const
  More...
 
std::vector< std::string > GetUsingNamespaces ()
  More...
 
ROOT::TMetaUtils::EIOCtorCategory HasDefaultConstructor (bool checkio=false, std::string *type_name=nullptr) const
  More...
 
bool HasMethod (const char *name) const
  More...
 
void Init (const char *name)
  More...
 
void Init (const clang::Decl *)
  More...
 
void Init (const clang::Type &)
  More...
 
void Init (int tagnum)
  More...
 
int InternalNext ()
  More...
 
bool IsBase (const char *name) const
  More...
 
bool IsLoaded () const
  More...
 
bool IsScopedEnum () const
  More...
 
bool IsValidMethod (const char *method, const char *proto, Bool_t objectIsConst, Longptr_t *offset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const
  More...
 
voidNew (const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
  More...
 
voidNew (int n, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
  More...
 
voidNew (int n, void *arena, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
  More...
 
voidNew (void *arena, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
  More...
 
int Next ()
  More...
 
TClingClassInfooperator= (const TClingClassInfo &rhs)
  More...
 
long Property () const
  More...
 
int RootFlag () const
  More...
 
void SetDecl (const clang::Decl *D)
  More...
 
int Size () const
  More...
 
Longptr_t Tagnum () const
  More...
 
const char * Title ()
  More...
 
const char * TmpltName () const
  More...
 
- Public Member Functions inherited from TClingDeclInfo
 TClingDeclInfo ()=default
  More...
 
 TClingDeclInfo (const clang::Decl *D)
  More...
 
virtual ~TClingDeclInfo ()
  More...
 
clang::Decl * GetDecl ()
  More...
 
virtual const clang::Decl * GetDecl () const
  More...
 
virtual bool IsValid () const
  More...
 
virtual const char * Name () const
  More...
 

Static Public Member Functions

static bool IsEnum (cling::Interpreter *interp, const char *name)
  More...
 

Private Attributes

std::string fDeclFileName
  More...
 
bool fDescend: 1
  More...
 
bool fFirstTime: 1
  More...
 
cling::Interpreter * fInterp = nullptr
  More...
 
bool fIsIter: 1
  More...
 
clang::DeclContext::decl_iterator fIter
  More...
 
bool fIterAll: 1
  More...
 
std::vector< clang::DeclContext::decl_iterator > fIterStack
  More...
 
llvm::DenseMap< const clang::Decl *, std::pair< ptrdiff_t, OffsetPtrFunc_t > > fOffsetCache
  More...
 
std::mutex fOffsetCacheMutex
  More...
 
std::string fTitle
  More...
 
const clang::Type * fType = nullptr
  More...
 

Additional Inherited Members

- Protected Member Functions inherited from TClingDeclInfo
long Property (long property, clang::QualType &qt) const
  More...
 
- Protected Attributes inherited from TClingDeclInfo
const clang::Decl * fDecl = nullptr
  More...
 
std::string fNameCache
  More...
 

#include </home/sftnight/build/workspace/root-makedoc-master/rootspi/rdoc/src/master/core/metacling/src/TClingClassInfo.h>

Inheritance diagram for TClingClassInfo:
[legend]

Member Enumeration Documentation

◆ EInheritanceMode

Enumerator
kInThisScope 
kWithInheritance 

Definition at line 79 of file TClingClassInfo.h.

Constructor & Destructor Documentation

◆ TClingClassInfo() [1/6]

TClingClassInfo::TClingClassInfo ( )
inlineexplicit

Definition at line 85 of file TClingClassInfo.h.

◆ TClingClassInfo() [2/6]

TClingClassInfo::TClingClassInfo ( const TClingClassInfo rhs)
inline

Definition at line 89 of file TClingClassInfo.h.

◆ TClingClassInfo() [3/6]

TClingClassInfo::TClingClassInfo ( cling::Interpreter *  interp,
Bool_t  all = kTRUE 
)
explicit

Definition at line 71 of file TClingClassInfo.cxx.

◆ TClingClassInfo() [4/6]

TClingClassInfo::TClingClassInfo ( cling::Interpreter *  interp,
const char *  classname,
bool  intantiateTemplate = kTRUE 
)
explicit

Definition at line 82 of file TClingClassInfo.cxx.

◆ TClingClassInfo() [5/6]

TClingClassInfo::TClingClassInfo ( cling::Interpreter *  ,
const clang::Type &   
)
explicit

◆ TClingClassInfo() [6/6]

TClingClassInfo::TClingClassInfo ( cling::Interpreter *  ,
const clang::Decl *   
)
explicit

Member Function Documentation

◆ AddBaseOffsetFunction()

void TClingClassInfo::AddBaseOffsetFunction ( const clang::Decl *  decl,
OffsetPtrFunc_t  func 
)
inline

Definition at line 118 of file TClingClassInfo.h.

◆ AddBaseOffsetValue()

void TClingClassInfo::AddBaseOffsetValue ( const clang::Decl *  decl,
ptrdiff_t  offset 
)

Definition at line 132 of file TClingClassInfo.cxx.

◆ ClassProperty()

long TClingClassInfo::ClassProperty ( ) const

Definition at line 142 of file TClingClassInfo.cxx.

◆ Delete()

void TClingClassInfo::Delete ( void arena,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt 
) const

Definition at line 201 of file TClingClassInfo.cxx.

◆ DeleteArray()

void TClingClassInfo::DeleteArray ( void arena,
bool  dtorOnly,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt 
) const

Definition at line 218 of file TClingClassInfo.cxx.

◆ Destruct()

void TClingClassInfo::Destruct ( void arena,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt 
) const

Definition at line 238 of file TClingClassInfo.cxx.

◆ FileName()

const char * TClingClassInfo::FileName ( )

Definition at line 1360 of file TClingClassInfo.cxx.

◆ FullName()

void TClingClassInfo::FullName ( std::string &  output,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt 
) const

Definition at line 1370 of file TClingClassInfo.cxx.

◆ GetBaseOffset()

ptrdiff_t TClingClassInfo::GetBaseOffset ( TClingClassInfo toBase,
void address,
bool  isDerivedObject 
)

Definition at line 613 of file TClingClassInfo.cxx.

◆ GetDataMember()

const clang::ValueDecl * TClingClassInfo::GetDataMember ( const char *  name) const

Definition at line 279 of file TClingClassInfo.cxx.

◆ GetDeclId()

TDictionary::DeclId_t TClingClassInfo::GetDeclId ( ) const
inline

Definition at line 133 of file TClingClassInfo.h.

◆ GetFunctionTemplate()

const FunctionTemplateDecl * TClingClassInfo::GetFunctionTemplate ( const char *  fname) const

Definition at line 249 of file TClingClassInfo.cxx.

◆ GetMethod() [1/5]

TClingMethodInfo TClingClassInfo::GetMethod ( const char *  fname) const

Definition at line 293 of file TClingClassInfo.cxx.

◆ GetMethod() [2/5]

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 340 of file TClingClassInfo.cxx.

◆ GetMethod() [3/5]

TClingMethodInfo TClingClassInfo::GetMethod ( const char *  fname,
const char *  proto,
Longptr_t poffset,
ROOT::EFunctionMatchMode  mode = ROOT::kConversionMatch,
EInheritanceMode  imode = kWithInheritance 
) const

Definition at line 333 of file TClingClassInfo.cxx.

◆ GetMethod() [4/5]

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 434 of file TClingClassInfo.cxx.

◆ GetMethod() [5/5]

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 426 of file TClingClassInfo.cxx.

◆ GetMethodNArg()

int TClingClassInfo::GetMethodNArg ( const char *  method,
const char *  proto,
Bool_t  objectIsConst,
ROOT::EFunctionMatchMode  mode = ROOT::kConversionMatch 
) const

Definition at line 566 of file TClingClassInfo.cxx.

◆ GetMethodWithArgs() [1/2]

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 507 of file TClingClassInfo.cxx.

◆ GetMethodWithArgs() [2/2]

TClingMethodInfo TClingClassInfo::GetMethodWithArgs ( const char *  fname,
const char *  arglist,
Longptr_t poffset,
ROOT::EFunctionMatchMode  mode = ROOT::kConversionMatch,
EInheritanceMode  imode = kWithInheritance 
) const

Definition at line 500 of file TClingClassInfo.cxx.

◆ GetOffset()

Longptr_t TClingClassInfo::GetOffset ( const clang::CXXMethodDecl *  md) const

Definition at line 586 of file TClingClassInfo.cxx.

◆ GetType()

const clang::Type* TClingClassInfo::GetType ( ) const
inline

Definition at line 161 of file TClingClassInfo.h.

◆ GetUnderlyingType()

EDataType TClingClassInfo::GetUnderlyingType ( ) const

Definition at line 833 of file TClingClassInfo.cxx.

◆ GetUsingNamespaces()

std::vector< std::string > TClingClassInfo::GetUsingNamespaces ( )

Definition at line 644 of file TClingClassInfo.cxx.

◆ HasDefaultConstructor()

ROOT::TMetaUtils::EIOCtorCategory TClingClassInfo::HasDefaultConstructor ( bool  checkio = false,
std::string *  type_name = nullptr 
) const

Definition at line 673 of file TClingClassInfo.cxx.

◆ HasMethod()

bool TClingClassInfo::HasMethod ( const char *  name) const

Definition at line 711 of file TClingClassInfo.cxx.

◆ Init() [1/4]

void TClingClassInfo::Init ( const char *  name)

Definition at line 723 of file TClingClassInfo.cxx.

◆ Init() [2/4]

void TClingClassInfo::Init ( const clang::Decl *  )

◆ Init() [3/4]

void TClingClassInfo::Init ( const clang::Type &  )

◆ Init() [4/4]

void TClingClassInfo::Init ( int  tagnum)

Definition at line 763 of file TClingClassInfo.cxx.

◆ InternalNext()

int TClingClassInfo::InternalNext ( )

Definition at line 927 of file TClingClassInfo.cxx.

◆ IsBase()

bool TClingClassInfo::IsBase ( const char *  name) const

Definition at line 792 of file TClingClassInfo.cxx.

◆ IsEnum()

bool TClingClassInfo::IsEnum ( cling::Interpreter *  interp,
const char *  name 
)
static

Definition at line 816 of file TClingClassInfo.cxx.

◆ IsLoaded()

bool TClingClassInfo::IsLoaded ( ) const

Definition at line 881 of file TClingClassInfo.cxx.

◆ IsScopedEnum()

bool TClingClassInfo::IsScopedEnum ( ) const

Definition at line 826 of file TClingClassInfo.cxx.

◆ IsValidMethod()

bool TClingClassInfo::IsValidMethod ( const char *  method,
const char *  proto,
Bool_t  objectIsConst,
Longptr_t offset,
ROOT::EFunctionMatchMode  mode = ROOT::kConversionMatch 
) const

Definition at line 911 of file TClingClassInfo.cxx.

◆ New() [1/4]

void * TClingClassInfo::New ( const ROOT::TMetaUtils::TNormalizedCtxt normCtxt) const

Definition at line 1060 of file TClingClassInfo.cxx.

◆ New() [2/4]

void * TClingClassInfo::New ( int  n,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt 
) const

Definition at line 1108 of file TClingClassInfo.cxx.

◆ New() [3/4]

void * TClingClassInfo::New ( int  n,
void arena,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt 
) const

Definition at line 1158 of file TClingClassInfo.cxx.

◆ New() [4/4]

void * TClingClassInfo::New ( void arena,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt 
) const

Definition at line 1204 of file TClingClassInfo.cxx.

◆ Next()

int TClingClassInfo::Next ( )

Definition at line 1055 of file TClingClassInfo.cxx.

◆ operator=()

TClingClassInfo& TClingClassInfo::operator= ( const TClingClassInfo rhs)
inline

Definition at line 100 of file TClingClassInfo.h.

◆ Property()

long TClingClassInfo::Property ( ) const

Definition at line 1249 of file TClingClassInfo.cxx.

◆ RootFlag()

int TClingClassInfo::RootFlag ( ) const

Definition at line 1305 of file TClingClassInfo.cxx.

◆ SetDecl()

void TClingClassInfo::SetDecl ( const clang::Decl *  D)
inline

Definition at line 128 of file TClingClassInfo.h.

◆ Size()

int TClingClassInfo::Size ( ) const

Definition at line 1314 of file TClingClassInfo.cxx.

◆ Tagnum()

Longptr_t TClingClassInfo::Tagnum ( ) const

Definition at line 1352 of file TClingClassInfo.cxx.

◆ Title()

const char * TClingClassInfo::Title ( )

Definition at line 1392 of file TClingClassInfo.cxx.

◆ TmpltName()

const char * TClingClassInfo::TmpltName ( ) const

Definition at line 1432 of file TClingClassInfo.cxx.

Member Data Documentation

◆ fDeclFileName

std::string TClingClassInfo::fDeclFileName
private

Definition at line 72 of file TClingClassInfo.h.

◆ fDescend

bool TClingClassInfo::fDescend
private

Definition at line 65 of file TClingClassInfo.h.

◆ fFirstTime

bool TClingClassInfo::fFirstTime
private

Definition at line 64 of file TClingClassInfo.h.

◆ fInterp

cling::Interpreter* TClingClassInfo::fInterp = nullptr
private

Definition at line 63 of file TClingClassInfo.h.

◆ fIsIter

bool TClingClassInfo::fIsIter
private

Definition at line 67 of file TClingClassInfo.h.

◆ fIter

clang::DeclContext::decl_iterator TClingClassInfo::fIter
private

Definition at line 68 of file TClingClassInfo.h.

◆ fIterAll

bool TClingClassInfo::fIterAll
private

Definition at line 66 of file TClingClassInfo.h.

◆ fIterStack

std::vector<clang::DeclContext::decl_iterator> TClingClassInfo::fIterStack
private

Definition at line 70 of file TClingClassInfo.h.

◆ fOffsetCache

llvm::DenseMap<const clang::Decl*, std::pair<ptrdiff_t, OffsetPtrFunc_t> > TClingClassInfo::fOffsetCache
private

Definition at line 75 of file TClingClassInfo.h.

◆ fOffsetCacheMutex

std::mutex TClingClassInfo::fOffsetCacheMutex
private

Definition at line 74 of file TClingClassInfo.h.

◆ fTitle

std::string TClingClassInfo::fTitle
private

Definition at line 71 of file TClingClassInfo.h.

◆ fType

const clang::Type* TClingClassInfo::fType = nullptr
private

Definition at line 69 of file TClingClassInfo.h.


The documentation for this class was generated from the following files: