ROOT  6.06/09
Reference Guide
Public Member Functions | Private Member Functions | Private Attributes | List of all members
TClingCallFunc Class Reference

Emulation of the CINT CallFunc class.

The CINT C++ interpreter provides an interface for calling functions through the generated wrappers in dictionaries with the CallFunc class. This class provides the same functionality, using an interface as close as possible to CallFunc but the function metadata and calling service comes from the Cling C++ interpreter and the Clang C++ compiler, not CINT.

Definition at line 56 of file TClingCallFunc.h.

Public Member Functions

 ~TClingCallFunc ()
 
 TClingCallFunc (cling::Interpreter *interp, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt)
 
 TClingCallFunc (TClingMethodInfo &minfo, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt)
 
 TClingCallFunc (const TClingCallFunc &rhs)
 
TClingCallFuncoperator= (const TClingCallFunc &rhs)=delete
 
voidExecDefaultConstructor (const TClingClassInfo *info, void *address=0, unsigned long nary=0UL)
 
void ExecDestructor (const TClingClassInfo *info, void *address=0, unsigned long nary=0UL, bool withFree=true)
 
void ExecWithReturn (void *address, void *ret=0)
 
void ExecWithArgsAndReturn (void *address, const void *args[]=0, int nargs=0, void *ret=0)
 
void Exec (void *address, TInterpreterValue *interpVal=0)
 
long ExecInt (void *address)
 
long long ExecInt64 (void *address)
 
double ExecDouble (void *address)
 
TClingMethodInfoFactoryMethod () const
 
void IgnoreExtraArgs (bool ignore)
 
void Init ()
 
void Init (const clang::FunctionDecl *)
 
void Init (TClingMethodInfo *)
 
void Invoke (cling::Value *result=0) const
 
voidInterfaceMethod ()
 
bool IsValid () const
 
TInterpreter::CallFuncIFacePtr_t IFacePtr ()
 
const clang::FunctionDecl * GetDecl () const
 
void ResetArg ()
 
void SetArg (long arg)
 
void SetArg (unsigned long arg)
 
void SetArg (float arg)
 
void SetArg (double arg)
 
void SetArg (long long arg)
 
void SetArg (unsigned long long arg)
 
void SetArgArray (long *argArr, int narg)
 
void SetArgs (const char *args)
 
void SetFunc (const TClingClassInfo *info, const char *method, const char *arglist, long *poffset)
 
void SetFunc (const TClingClassInfo *info, const char *method, const char *arglist, bool objectIsConst, long *poffset)
 
void SetFunc (const TClingMethodInfo *info)
 
void SetFuncProto (const TClingClassInfo *info, const char *method, const char *proto, long *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
 
void SetFuncProto (const TClingClassInfo *info, const char *method, const char *proto, bool objectIsConst, long *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
 
void SetFuncProto (const TClingClassInfo *info, const char *method, const llvm::SmallVectorImpl< clang::QualType > &proto, long *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
 
void SetFuncProto (const TClingClassInfo *info, const char *method, const llvm::SmallVectorImpl< clang::QualType > &proto, bool objectIsConst, long *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
 

Private Member Functions

voidcompile_wrapper (const std::string &wrapper_name, const std::string &wrapper, bool withAccessControl=true)
 
void collect_type_info (clang::QualType &QT, std::ostringstream &typedefbuf, std::ostringstream &callbuf, std::string &type_name, bool &isReference, bool &isPointer, int indent_level, bool forArgument)
 
void make_narg_call (const unsigned N, std::ostringstream &typedefbuf, std::ostringstream &callbuf, const std::string &class_name, int indent_level)
 
void make_narg_ctor (const unsigned N, std::ostringstream &typedefbuf, std::ostringstream &callbuf, const std::string &class_name, int indent_level)
 
void make_narg_call_with_return (const unsigned N, const std::string &class_name, std::ostringstream &buf, int indent_level)
 
void make_narg_ctor_with_return (const unsigned N, const std::string &class_name, std::ostringstream &buf, int indent_level)
 
tcling_callfunc_Wrapper_t make_wrapper ()
 
tcling_callfunc_ctor_Wrapper_t make_ctor_wrapper (const TClingClassInfo *info)
 
tcling_callfunc_dtor_Wrapper_t make_dtor_wrapper (const TClingClassInfo *info)
 
template<typename T >
void execWithLL (void *address, clang::QualType QT, cling::Value *val) const
 
template<typename T >
void execWithULL (void *address, clang::QualType QT, cling::Value *val) const
 
void exec (void *address, void *ret) const
 
void exec_with_valref_return (void *address, cling::Value *ret) const
 
void EvaluateArgList (const std::string &ArgList)
 
template<typename T >
ExecT (void *address)
 

Private Attributes

cling::Interpreter * fInterp
 Cling interpreter, we do not own. More...
 
const ROOT::TMetaUtils::TNormalizedCtxtfNormCtxt
 ROOT normalized context for that interpreter. More...
 
TClingMethodInfofMethod
 Current method, we own. More...
 
tcling_callfunc_Wrapper_t fWrapper
 Pointer to compiled wrapper, we do not own. More...
 
llvm::SmallVector< cling::Value, 8 > fArgVals
 Stored function arguments, we own. More...
 
bool fIgnoreExtraArgs: 1
 If true, do not limit number of function arguments to declared number. More...
 
bool fReturnIsRecordType: 1
 

#include </mnt/vdb/lsf/workspace/root-makedoc-v606/rootspi/rdoc/src/v6-06-00-patches/core/meta/src/TClingCallFunc.h>

+ Collaboration diagram for TClingCallFunc:

Constructor & Destructor Documentation

TClingCallFunc::~TClingCallFunc ( )
inline

Definition at line 128 of file TClingCallFunc.h.

TClingCallFunc::TClingCallFunc ( cling::Interpreter *  interp,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt 
)
inlineexplicit

Definition at line 132 of file TClingCallFunc.h.

TClingCallFunc::TClingCallFunc ( TClingMethodInfo minfo,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt 
)
inlineexplicit

Definition at line 138 of file TClingCallFunc.h.

TClingCallFunc::TClingCallFunc ( const TClingCallFunc rhs)
inline

Definition at line 146 of file TClingCallFunc.h.

Member Function Documentation

void TClingCallFunc::collect_type_info ( clang::QualType &  QT,
std::ostringstream &  typedefbuf,
std::ostringstream &  callbuf,
std::string &  type_name,
bool &  isReference,
bool &  isPointer,
int  indent_level,
bool  forArgument 
)
private

Definition at line 269 of file TClingCallFunc.cxx.

void * TClingCallFunc::compile_wrapper ( const std::string &  wrapper_name,
const std::string &  wrapper,
bool  withAccessControl = true 
)
private

Definition at line 262 of file TClingCallFunc.cxx.

void TClingCallFunc::EvaluateArgList ( const std::string &  ArgList)
private

Definition at line 2122 of file TClingCallFunc.cxx.

void TClingCallFunc::exec ( void address,
void ret 
) const
private

Definition at line 1440 of file TClingCallFunc.cxx.

void TClingCallFunc::Exec ( void address,
TInterpreterValue interpVal = 0 
)

Definition at line 2144 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_Exec(), and TCling::Execute().

void TClingCallFunc::exec_with_valref_return ( void address,
cling::Value *  ret 
) const
private

Definition at line 1907 of file TClingCallFunc.cxx.

void * TClingCallFunc::ExecDefaultConstructor ( const TClingClassInfo info,
void address = 0,
unsigned long  nary = 0UL 
)

Definition at line 2219 of file TClingCallFunc.cxx.

Referenced by TClingClassInfo::New().

void TClingCallFunc::ExecDestructor ( const TClingClassInfo info,
void address = 0,
unsigned long  nary = 0UL,
bool  withFree = true 
)
double TClingCallFunc::ExecDouble ( void address)

Definition at line 2191 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_ExecDouble().

Long_t TClingCallFunc::ExecInt ( void address)

Definition at line 2181 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_ExecInt(), and TCling::GenerateTClass().

long long TClingCallFunc::ExecInt64 ( void address)

Definition at line 2186 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_ExecInt64().

template<typename T >
T TClingCallFunc::ExecT ( void address)
private

Definition at line 2161 of file TClingCallFunc.cxx.

void TClingCallFunc::ExecWithArgsAndReturn ( void address,
const void args[] = 0,
int  nargs = 0,
void ret = 0 
)

Definition at line 2196 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_ExecWithArgsAndReturn().

template<typename T >
void TClingCallFunc::execWithLL ( void address,
clang::QualType  QT,
cling::Value *  val 
) const
private

Definition at line 1890 of file TClingCallFunc.cxx.

void TClingCallFunc::ExecWithReturn ( void address,
void ret = 0 
)

Definition at line 2208 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_ExecWithReturn().

template<typename T >
void TClingCallFunc::execWithULL ( void address,
clang::QualType  QT,
cling::Value *  val 
) const
private

Definition at line 1899 of file TClingCallFunc.cxx.

TClingMethodInfo * TClingCallFunc::FactoryMethod ( ) const

Definition at line 2283 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_FactoryMethod(), and TCling::GetMangledName().

const clang::FunctionDecl* TClingCallFunc::GetDecl ( ) const
inline

Definition at line 177 of file TClingCallFunc.h.

TInterpreter::CallFuncIFacePtr_t TClingCallFunc::IFacePtr ( )

Definition at line 2331 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_IFacePtr().

void TClingCallFunc::IgnoreExtraArgs ( bool  ignore)
inline

Definition at line 169 of file TClingCallFunc.h.

Referenced by TCling::CallFunc_IgnoreExtraArgs().

void TClingCallFunc::Init ( )

Definition at line 2288 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_Init(), and TCling::Execute().

void TClingCallFunc::Init ( const clang::FunctionDecl *  )
void TClingCallFunc::Init ( TClingMethodInfo minfo)

Definition at line 2296 of file TClingCallFunc.cxx.

void * TClingCallFunc::InterfaceMethod ( )
void TClingCallFunc::Invoke ( cling::Value *  result = 0) const
bool TClingCallFunc::IsValid ( ) const

Definition at line 2323 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_IsValid().

tcling_callfunc_ctor_Wrapper_t TClingCallFunc::make_ctor_wrapper ( const TClingClassInfo info)
private

Definition at line 1082 of file TClingCallFunc.cxx.

tcling_callfunc_dtor_Wrapper_t TClingCallFunc::make_dtor_wrapper ( const TClingClassInfo info)
private

Definition at line 1248 of file TClingCallFunc.cxx.

void TClingCallFunc::make_narg_call ( const unsigned  N,
std::ostringstream &  typedefbuf,
std::ostringstream &  callbuf,
const std::string &  class_name,
int  indent_level 
)
private

Definition at line 386 of file TClingCallFunc.cxx.

void TClingCallFunc::make_narg_call_with_return ( const unsigned  N,
const std::string &  class_name,
std::ostringstream &  buf,
int  indent_level 
)
private

Definition at line 527 of file TClingCallFunc.cxx.

void TClingCallFunc::make_narg_ctor ( const unsigned  N,
std::ostringstream &  typedefbuf,
std::ostringstream &  callbuf,
const std::string &  class_name,
int  indent_level 
)
private

Definition at line 342 of file TClingCallFunc.cxx.

void TClingCallFunc::make_narg_ctor_with_return ( const unsigned  N,
const std::string &  class_name,
std::ostringstream &  buf,
int  indent_level 
)
private

Definition at line 452 of file TClingCallFunc.cxx.

tcling_callfunc_Wrapper_t TClingCallFunc::make_wrapper ( )
private

Definition at line 640 of file TClingCallFunc.cxx.

TClingCallFunc& TClingCallFunc::operator= ( const TClingCallFunc rhs)
delete
void TClingCallFunc::ResetArg ( )

Definition at line 2355 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_ResetArg().

void TClingCallFunc::SetArg ( long  arg)

Definition at line 2367 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_SetArg().

void TClingCallFunc::SetArg ( unsigned long  arg)

Definition at line 2360 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArg ( float  arg)

Definition at line 2374 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArg ( double  arg)

Definition at line 2381 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArg ( long long  arg)

Definition at line 2388 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArg ( unsigned long long  arg)

Definition at line 2395 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArgArray ( long *  argArr,
int  narg 
)

Definition at line 2402 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_SetArgArray().

void TClingCallFunc::SetArgs ( const char *  args)

Definition at line 2410 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_SetArgs(), and TCling::Execute().

void TClingCallFunc::SetFunc ( const TClingClassInfo info,
const char *  method,
const char *  arglist,
long *  poffset 
)
void TClingCallFunc::SetFunc ( const TClingClassInfo info,
const char *  method,
const char *  arglist,
bool  objectIsConst,
long *  poffset 
)

Definition at line 2422 of file TClingCallFunc.cxx.

void TClingCallFunc::SetFunc ( const TClingMethodInfo info)

Definition at line 2452 of file TClingCallFunc.cxx.

void TClingCallFunc::SetFuncProto ( const TClingClassInfo info,
const char *  method,
const char *  proto,
long *  poffset,
ROOT::EFunctionMatchMode  mode = ROOT::kConversionMatch 
)

Definition at line 2463 of file TClingCallFunc.cxx.

Referenced by TCling::CallFunc_SetFuncProto().

void TClingCallFunc::SetFuncProto ( const TClingClassInfo info,
const char *  method,
const char *  proto,
bool  objectIsConst,
long *  poffset,
ROOT::EFunctionMatchMode  mode = ROOT::kConversionMatch 
)

Definition at line 2470 of file TClingCallFunc.cxx.

void TClingCallFunc::SetFuncProto ( const TClingClassInfo info,
const char *  method,
const llvm::SmallVectorImpl< clang::QualType > &  proto,
long *  poffset,
ROOT::EFunctionMatchMode  mode = ROOT::kConversionMatch 
)

Definition at line 2493 of file TClingCallFunc.cxx.

void TClingCallFunc::SetFuncProto ( const TClingClassInfo info,
const char *  method,
const llvm::SmallVectorImpl< clang::QualType > &  proto,
bool  objectIsConst,
long *  poffset,
ROOT::EFunctionMatchMode  mode = ROOT::kConversionMatch 
)

Definition at line 2500 of file TClingCallFunc.cxx.

Member Data Documentation

llvm::SmallVector<cling::Value, 8> TClingCallFunc::fArgVals
mutableprivate

Stored function arguments, we own.

Definition at line 69 of file TClingCallFunc.h.

bool TClingCallFunc::fIgnoreExtraArgs
private

If true, do not limit number of function arguments to declared number.

Definition at line 71 of file TClingCallFunc.h.

Referenced by IgnoreExtraArgs().

cling::Interpreter* TClingCallFunc::fInterp
private

Cling interpreter, we do not own.

Definition at line 61 of file TClingCallFunc.h.

TClingMethodInfo* TClingCallFunc::fMethod
private

Current method, we own.

Definition at line 65 of file TClingCallFunc.h.

Referenced by TClingCallFunc(), and ~TClingCallFunc().

const ROOT::TMetaUtils::TNormalizedCtxt& TClingCallFunc::fNormCtxt
private

ROOT normalized context for that interpreter.

Definition at line 63 of file TClingCallFunc.h.

bool TClingCallFunc::fReturnIsRecordType
private

Definition at line 72 of file TClingCallFunc.h.

tcling_callfunc_Wrapper_t TClingCallFunc::fWrapper
private

Pointer to compiled wrapper, we do not own.

Definition at line 67 of file TClingCallFunc.h.


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