Logo ROOT   6.07/09
Reference Guide
List of all members | 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 (cling::Interpreter *interp, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt)
 
 TClingCallFunc (TClingMethodInfo &minfo, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt)
 
 TClingCallFunc (const TClingCallFunc &rhs)
 
 ~TClingCallFunc ()
 
void Exec (void *address, TInterpreterValue *interpVal=0)
 
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)
 
double ExecDouble (void *address)
 
long ExecInt (void *address)
 
long long ExecInt64 (void *address)
 
void ExecWithArgsAndReturn (void *address, const void *args[]=0, int nargs=0, void *ret=0)
 
void ExecWithReturn (void *address, void *ret=0)
 
TClingMethodInfoFactoryMethod () const
 
const clang::FunctionDecl * GetDecl () const
 
TInterpreter::CallFuncIFacePtr_t IFacePtr ()
 
void IgnoreExtraArgs (bool ignore)
 
void Init ()
 
void Init (const clang::FunctionDecl *)
 
void Init (TClingMethodInfo *)
 
voidInterfaceMethod ()
 
void Invoke (cling::Value *result=0) const
 
bool IsValid () const
 
TClingCallFuncoperator= (const TClingCallFunc &rhs)=delete
 
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

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)
 
voidcompile_wrapper (const std::string &wrapper_name, const std::string &wrapper, bool withAccessControl=true)
 
void EvaluateArgList (const std::string &ArgList)
 
void exec (void *address, void *ret) const
 
void exec_with_valref_return (void *address, cling::Value *ret) const
 
template<typename T >
ExecT (void *address)
 
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
 
tcling_callfunc_ctor_Wrapper_t make_ctor_wrapper (const TClingClassInfo *info)
 
tcling_callfunc_dtor_Wrapper_t make_dtor_wrapper (const TClingClassInfo *info)
 
void make_narg_call (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 (const unsigned N, std::ostringstream &typedefbuf, std::ostringstream &callbuf, const std::string &class_name, 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 ()
 

Private Attributes

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...
 
cling::Interpreter * fInterp
 Cling interpreter, we do not own. More...
 
TClingMethodInfofMethod
 Current method, we own. More...
 
const ROOT::TMetaUtils::TNormalizedCtxtfNormCtxt
 ROOT normalized context for that interpreter. More...
 
bool fReturnIsRecordType: 1
 
tcling_callfunc_Wrapper_t fWrapper
 Pointer to compiled wrapper, we do not own. More...
 

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

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 1987 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 2009 of file TClingCallFunc.cxx.

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

Definition at line 1772 of file TClingCallFunc.cxx.

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

Definition at line 2084 of file TClingCallFunc.cxx.

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

Definition at line 2120 of file TClingCallFunc.cxx.

double TClingCallFunc::ExecDouble ( void address)

Definition at line 2056 of file TClingCallFunc.cxx.

Long_t TClingCallFunc::ExecInt ( void address)

Definition at line 2046 of file TClingCallFunc.cxx.

long long TClingCallFunc::ExecInt64 ( void address)

Definition at line 2051 of file TClingCallFunc.cxx.

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

Definition at line 2026 of file TClingCallFunc.cxx.

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

Definition at line 2061 of file TClingCallFunc.cxx.

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

Definition at line 1755 of file TClingCallFunc.cxx.

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

Definition at line 2073 of file TClingCallFunc.cxx.

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

Definition at line 1764 of file TClingCallFunc.cxx.

TClingMethodInfo * TClingCallFunc::FactoryMethod ( ) const

Definition at line 2148 of file TClingCallFunc.cxx.

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

Definition at line 177 of file TClingCallFunc.h.

TInterpreter::CallFuncIFacePtr_t TClingCallFunc::IFacePtr ( )

Definition at line 2196 of file TClingCallFunc.cxx.

void TClingCallFunc::IgnoreExtraArgs ( bool  ignore)
inline

Definition at line 169 of file TClingCallFunc.h.

void TClingCallFunc::Init ( )

Definition at line 2153 of file TClingCallFunc.cxx.

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

Definition at line 2161 of file TClingCallFunc.cxx.

void * TClingCallFunc::InterfaceMethod ( )

Definition at line 2169 of file TClingCallFunc.cxx.

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

Definition at line 2188 of file TClingCallFunc.cxx.

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 2220 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArg ( long  arg)

Definition at line 2232 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArg ( unsigned long  arg)

Definition at line 2225 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArg ( float  arg)

Definition at line 2239 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArg ( double  arg)

Definition at line 2246 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArg ( long long  arg)

Definition at line 2253 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArg ( unsigned long long  arg)

Definition at line 2260 of file TClingCallFunc.cxx.

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

Definition at line 2267 of file TClingCallFunc.cxx.

void TClingCallFunc::SetArgs ( const char *  args)

Definition at line 2275 of file TClingCallFunc.cxx.

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

Definition at line 2281 of file TClingCallFunc.cxx.

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

Definition at line 2287 of file TClingCallFunc.cxx.

void TClingCallFunc::SetFunc ( const TClingMethodInfo info)

Definition at line 2317 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 2328 of file TClingCallFunc.cxx.

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

Definition at line 2335 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 2358 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 2365 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.

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.

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: