ROOT 6.08/07 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 (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) |
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) |
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) |
TClingMethodInfo * | FactoryMethod () const |
const clang::FunctionDecl * | GetDecl () const |
TInterpreter::CallFuncIFacePtr_t | IFacePtr () |
void | IgnoreExtraArgs (bool ignore) |
void | Init () |
void | Init (const clang::FunctionDecl *) |
void | Init (TClingMethodInfo *) |
void * | InterfaceMethod () |
void | Invoke (cling::Value *result=0) const |
bool | IsValid () const |
TClingCallFunc & | operator= (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) |
void * | compile_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 > | |
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... | |
TClingMethodInfo * | fMethod |
Current method, we own. More... | |
const ROOT::TMetaUtils::TNormalizedCtxt & | fNormCtxt |
ROOT normalized context for that interpreter. More... | |
bool | fReturnIsRecordType: 1 |
tcling_callfunc_Wrapper_t | fWrapper |
Pointer to compiled wrapper, we do not own. More... | |
|
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 1987 of file TClingCallFunc.cxx.
Definition at line 1440 of file TClingCallFunc.cxx.
void TClingCallFunc::Exec | ( | void * | address, |
TInterpreterValue * | interpVal = 0 |
||
) |
Definition at line 2009 of file TClingCallFunc.cxx.
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.
Definition at line 2046 of file TClingCallFunc.cxx.
long long TClingCallFunc::ExecInt64 | ( | void * | address | ) |
Definition at line 2051 of file TClingCallFunc.cxx.
|
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.
|
private |
Definition at line 1755 of file TClingCallFunc.cxx.
Definition at line 2073 of file TClingCallFunc.cxx.
|
private |
Definition at line 1764 of file TClingCallFunc.cxx.
TClingMethodInfo * TClingCallFunc::FactoryMethod | ( | ) | const |
Definition at line 2148 of file TClingCallFunc.cxx.
|
inline |
Definition at line 177 of file TClingCallFunc.h.
TInterpreter::CallFuncIFacePtr_t TClingCallFunc::IFacePtr | ( | ) |
Definition at line 2196 of file TClingCallFunc.cxx.
|
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.
|
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 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.
|
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.
|
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.
|
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.