Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TClingTypedefInfo Class Referencefinal

Emulation of the CINT TypedefInfo class.

The CINT C++ interpreter provides an interface to metadata about a typedef through the TypedefInfo class. This class provides the same functionality, using an interface as close as possible to TypedefInfo but the typedef metadata comes from the Clang C++ compiler, not CINT.

Definition at line 45 of file TClingTypedefInfo.h.

Public Member Functions

 TClingTypedefInfo (cling::Interpreter *, const char *)
 Lookup named typedef and initialize the iterator to point to it.
 TClingTypedefInfo (cling::Interpreter *, const clang::TypedefNameDecl *)
 TClingTypedefInfo (cling::Interpreter *interp)
clang::Decl * GetDecl ()
virtual const clang::Decl * GetDecl () const
void Init (const char *name)
 Lookup named typedef and reset the iterator to point to it.
int InternalNext ()
 Increment the iterator, return true if new position is valid.
virtual bool IsValid () const
const char * Name () const override
 Get the name of the current typedef.
int Next ()
 Increment the iterator.
long Property () const
 Return a bit mask of metadata about the current typedef.
int Size () const
 Return the size in bytes of the underlying type of the current typedef.
const char * Title ()
const char * TrueName (const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
 Get the name of the underlying type of the current typedef.

Protected Member Functions

long Property (long property, clang::QualType &qt) const

Protected Attributes

const clang::Decl * fDecl = nullptr
std::string fNameCache

Private Attributes

bool fDescend
bool fFirstTime
cling::Interpreter * fInterp
clang::DeclContext::decl_iterator fIter
std::vector< clang::DeclContext::decl_iterator > fIterStack
std::string fTitle

#include </home/stephan/code/root-2/core/metacling/src/TClingTypedefInfo.h>

Inheritance diagram for TClingTypedefInfo:
TClingDeclInfo

Constructor & Destructor Documentation

◆ TClingTypedefInfo() [1/3]

TClingTypedefInfo::TClingTypedefInfo ( cling::Interpreter * interp)
inlineexplicit

Definition at line 58 of file TClingTypedefInfo.h.

◆ TClingTypedefInfo() [2/3]

TClingTypedefInfo::TClingTypedefInfo ( cling::Interpreter * interp,
const char * name )
explicit

Lookup named typedef and initialize the iterator to point to it.

Yields a non-iterable TClingTypedefInfo (fIter is invalid).

Definition at line 40 of file TClingTypedefInfo.cxx.

◆ TClingTypedefInfo() [3/3]

TClingTypedefInfo::TClingTypedefInfo ( cling::Interpreter * interp,
const clang::TypedefNameDecl * TdefD )
explicit

Definition at line 47 of file TClingTypedefInfo.cxx.

Member Function Documentation

◆ GetDecl() [1/2]

clang::Decl * TClingDeclInfo::GetDecl ( )
inlineinherited

Definition at line 39 of file TClingDeclInfo.h.

◆ GetDecl() [2/2]

virtual const clang::Decl * TClingDeclInfo::GetDecl ( ) const
inlinevirtualinherited

Reimplemented in TClingDataMemberInfo, TClingMethodArgInfo, and TClingMethodInfo.

Definition at line 38 of file TClingDeclInfo.h.

◆ Init()

void TClingTypedefInfo::Init ( const char * name)

Lookup named typedef and reset the iterator to point to it.

Definition at line 58 of file TClingTypedefInfo.cxx.

◆ InternalNext()

int TClingTypedefInfo::InternalNext ( )

Increment the iterator, return true if new position is valid.

Definition at line 102 of file TClingTypedefInfo.cxx.

◆ IsValid()

virtual bool TClingDeclInfo::IsValid ( ) const
inlinevirtualinherited

Reimplemented in TClingMethodArgInfo, and TClingTypeInfo.

Definition at line 42 of file TClingDeclInfo.h.

◆ Name()

const char * TClingTypedefInfo::Name ( ) const
overridevirtual

Get the name of the current typedef.

Reimplemented from TClingDeclInfo.

Definition at line 255 of file TClingTypedefInfo.cxx.

◆ Next()

int TClingTypedefInfo::Next ( )

Increment the iterator.

Definition at line 173 of file TClingTypedefInfo.cxx.

◆ Property() [1/2]

long TClingDeclInfo::Property ( long property,
clang::QualType & qt ) const
protectedinherited

Definition at line 49 of file TClingDeclInfo.cxx.

◆ Property() [2/2]

long TClingTypedefInfo::Property ( ) const

Return a bit mask of metadata about the current typedef.

Definition at line 181 of file TClingTypedefInfo.cxx.

◆ Size()

int TClingTypedefInfo::Size ( ) const

Return the size in bytes of the underlying type of the current typedef.

Definition at line 196 of file TClingTypedefInfo.cxx.

◆ Title()

const char * TClingTypedefInfo::Title ( )

Definition at line 271 of file TClingTypedefInfo.cxx.

◆ TrueName()

const char * TClingTypedefInfo::TrueName ( const ROOT::TMetaUtils::TNormalizedCtxt & normCtxt) const

Get the name of the underlying type of the current typedef.

Definition at line 231 of file TClingTypedefInfo.cxx.

Member Data Documentation

◆ fDecl

const clang::Decl* TClingDeclInfo::fDecl = nullptr
protectedinherited

Definition at line 30 of file TClingDeclInfo.h.

◆ fDescend

bool TClingTypedefInfo::fDescend
private

Definition at line 51 of file TClingTypedefInfo.h.

◆ fFirstTime

bool TClingTypedefInfo::fFirstTime
private

Definition at line 50 of file TClingTypedefInfo.h.

◆ fInterp

cling::Interpreter* TClingTypedefInfo::fInterp
private

Definition at line 49 of file TClingTypedefInfo.h.

◆ fIter

clang::DeclContext::decl_iterator TClingTypedefInfo::fIter
private

Definition at line 52 of file TClingTypedefInfo.h.

◆ fIterStack

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

Definition at line 53 of file TClingTypedefInfo.h.

◆ fNameCache

std::string TClingDeclInfo::fNameCache
mutableprotectedinherited

Definition at line 31 of file TClingDeclInfo.h.

◆ fTitle

std::string TClingTypedefInfo::fTitle
private

Definition at line 54 of file TClingTypedefInfo.h.


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