ROOT
6.06/09
Reference Guide
|
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) | |
TClingCallFunc & | operator= (const TClingCallFunc &rhs)=delete |
void * | ExecDefaultConstructor (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) |
TClingMethodInfo * | FactoryMethod () const |
void | IgnoreExtraArgs (bool ignore) |
void | Init () |
void | Init (const clang::FunctionDecl *) |
void | Init (TClingMethodInfo *) |
void | Invoke (cling::Value *result=0) const |
void * | InterfaceMethod () |
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 | |
void * | compile_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 > | |
T | ExecT (void *address) |
Private Attributes | |
cling::Interpreter * | fInterp |
Cling interpreter, we do not own. More... | |
const ROOT::TMetaUtils::TNormalizedCtxt & | fNormCtxt |
ROOT normalized context for that interpreter. More... | |
TClingMethodInfo * | fMethod |
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 |
|
inline |
Definition at line 128 of file TClingCallFunc.h.
|
inlineexplicit |
Definition at line 132 of file TClingCallFunc.h.
|
inlineexplicit |
Definition at line 138 of file TClingCallFunc.h.
|
inline |
Definition at line 146 of file TClingCallFunc.h.
|
private |
Definition at line 269 of file TClingCallFunc.cxx.
|
private |
Definition at line 262 of file TClingCallFunc.cxx.
|
private |
Definition at line 2122 of file TClingCallFunc.cxx.
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().
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 |
||
) |
Definition at line 2255 of file TClingCallFunc.cxx.
Referenced by TClingClassInfo::Delete(), TClingClassInfo::DeleteArray(), and TClingClassInfo::Destruct().
Definition at line 2191 of file TClingCallFunc.cxx.
Referenced by TCling::CallFunc_ExecDouble().
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().
|
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().
|
private |
Definition at line 1890 of file TClingCallFunc.cxx.
Definition at line 2208 of file TClingCallFunc.cxx.
Referenced by TCling::CallFunc_ExecWithReturn().
|
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().
|
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().
|
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 | ( | ) |
Definition at line 2304 of file TClingCallFunc.cxx.
Referenced by TCling::GetInterfaceMethod(), and TClingMethodInfo::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().
|
private |
Definition at line 1082 of file TClingCallFunc.cxx.
|
private |
Definition at line 1248 of file TClingCallFunc.cxx.
|
private |
Definition at line 386 of file TClingCallFunc.cxx.
|
private |
Definition at line 527 of file TClingCallFunc.cxx.
|
private |
Definition at line 342 of file TClingCallFunc.cxx.
|
private |
Definition at line 452 of file TClingCallFunc.cxx.
|
private |
Definition at line 640 of file TClingCallFunc.cxx.
|
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.
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 | ||
) |
Definition at line 2416 of file TClingCallFunc.cxx.
Referenced by TCling::CallFunc_SetFunc(), TCling::Execute(), TCling::GenerateTClass(), TCling::GetInterfaceMethod(), TCling::GetMangledName(), and TClingMethodInfo::InterfaceMethod().
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.
|
mutableprivate |
Stored function arguments, we own.
Definition at line 69 of file TClingCallFunc.h.
|
private |
If true, do not limit number of function arguments to declared number.
Definition at line 71 of file TClingCallFunc.h.
Referenced by IgnoreExtraArgs().
|
private |
Cling interpreter, we do not own.
Definition at line 61 of file TClingCallFunc.h.
|
private |
Current method, we own.
Definition at line 65 of file TClingCallFunc.h.
Referenced by TClingCallFunc(), and ~TClingCallFunc().
|
private |
ROOT normalized context for that interpreter.
Definition at line 63 of file TClingCallFunc.h.
|
private |
Definition at line 72 of file TClingCallFunc.h.
|
private |
Pointer to compiled wrapper, we do not own.
Definition at line 67 of file TClingCallFunc.h.