57#define DIRECT_CALL ((size_t)1 << (8 * sizeof(size_t) - 1))
59 return nargs & ~DIRECT_CALL;
83 typedef const void* DeclId_t;
86 CallWrapper(
TFunction*
f) : fDecl(
f->GetDeclId()), fName(
f->GetName()), fTF(
nullptr) {}
87 CallWrapper(DeclId_t fid,
const std::string&
n) : fDecl(fid), fName(
n), fTF(
nullptr) {}
89 if (fTF && fDecl == fTF->GetDeclId())
105 CallWrapper* wrap =
new CallWrapper(
f);
112 CallWrapper* wrap =
new CallWrapper(fid,
n);
129 {
"bool",
"char",
"signed char",
"unsigned char",
"wchar_t",
"short",
"unsigned short",
130 "int",
"unsigned int",
"long",
"unsigned long",
"long long",
"unsigned long long",
131 "float",
"double",
"long double",
"void",
132 "allocator",
"array",
"basic_string",
"complex",
"initializer_list",
"less",
"list",
133 "map",
"pair",
"set",
"vector"};
137 {
"auto_ptr",
"std::auto_ptr",
"shared_ptr",
"std::shared_ptr",
138 "unique_ptr",
"std::unique_ptr",
"weak_ptr",
"std::weak_ptr"};
155const int SIGPIPE = 0;
156const int SIGQUIT = 0;
157const int SIGWINCH = 0;
158const int SIGALRM = 0;
159const int SIGCHLD = 0;
161const int SIGUSR1 = 0;
162const int SIGUSR2 = 0;
169 { SIGBUS,
"bus error" },
170 { SIGSEGV,
"segmentation violation" },
171 { SIGSYS,
"bad argument to system call" },
172 { SIGPIPE,
"write on a pipe with no one to read it" },
173 { SIGILL,
"illegal instruction" },
174 { SIGABRT,
"abort" },
176 { SIGINT,
"interrupt" },
177 { SIGWINCH,
"window size change" },
178 { SIGALRM,
"alarm clock" },
179 { SIGCHLD,
"death of a child" },
180 { SIGURG,
"urgent data arrived on an I/O channel" },
181 { SIGFPE,
"floating point exception" },
182 { SIGTERM,
"termination signal" },
183 { SIGUSR1,
"user-defined signal 1" },
184 { SIGUSR2,
"user-defined signal 2" }
187static void inline do_trace(
int sig) {
201 if (!getenv(
"CPPYY_CRASH_QUIET"))
213class ApplicationStarter {
215 ApplicationStarter() {
237 const char* stl_names[] = {
"allocator",
"auto_ptr",
"bad_alloc",
"bad_cast",
238 "bad_exception",
"bad_typeid",
"basic_filebuf",
"basic_fstream",
"basic_ifstream",
239 "basic_ios",
"basic_iostream",
"basic_istream",
"basic_istringstream",
240 "basic_ofstream",
"basic_ostream",
"basic_ostringstream",
"basic_streambuf",
241 "basic_string",
"basic_stringbuf",
"basic_stringstream",
"binary_function",
242 "binary_negate",
"bitset",
"byte",
"char_traits",
"codecvt_byname",
"codecvt",
"collate",
243 "collate_byname",
"compare",
"complex",
"ctype_byname",
"ctype",
"default_delete",
244 "deque",
"divides",
"domain_error",
"equal_to",
"exception",
"forward_list",
"fpos",
245 "function",
"greater_equal",
"greater",
"gslice_array",
"gslice",
"hash",
"indirect_array",
246 "integer_sequence",
"invalid_argument",
"ios_base",
"istream_iterator",
"istreambuf_iterator",
247 "istrstream",
"iterator_traits",
"iterator",
"length_error",
"less_equal",
"less",
248 "list",
"locale",
"localedef utility",
"locale utility",
"logic_error",
"logical_and",
249 "logical_not",
"logical_or",
"map",
"mask_array",
"mem_fun",
"mem_fun_ref",
"messages",
250 "messages_byname",
"minus",
"modulus",
"money_get",
"money_put",
"moneypunct",
251 "moneypunct_byname",
"multimap",
"multiplies",
"multiset",
"negate",
"not_equal_to",
252 "num_get",
"num_put",
"numeric_limits",
"numpunct",
"numpunct_byname",
253 "ostream_iterator",
"ostreambuf_iterator",
"ostrstream",
"out_of_range",
254 "overflow_error",
"pair",
"plus",
"pointer_to_binary_function",
255 "pointer_to_unary_function",
"priority_queue",
"queue",
"range_error",
256 "raw_storage_iterator",
"reverse_iterator",
"runtime_error",
"set",
"shared_ptr",
257 "slice_array",
"slice",
"stack",
"string",
"strstream",
"strstreambuf",
258 "time_get_byname",
"time_get",
"time_put_byname",
"time_put",
"unary_function",
259 "unary_negate",
"unique_ptr",
"underflow_error",
"unordered_map",
"unordered_multimap",
260 "unordered_multiset",
"unordered_set",
"valarray",
"vector",
"weak_ptr",
"wstring"};
261 for (
auto&
name : stl_names)
266 if (getenv(
"CPPYY_OPT_LEVEL")) optLevel = atoi(getenv(
"CPPYY_OPT_LEVEL"));
268 std::ostringstream s;
269 s <<
"#pragma cling optimize " << optLevel;
275 "#include <iostream>\n"
276 "#include <string>\n"
277 "#include <DllImport.h>\n"
278 "#include <vector>\n"
279 "#include <utility>";
284 "namespace __cppyy_internal { template<class C1, class C2>"
285 " bool is_equal(const C1& c1, const C2& c2) { return (bool)(c1 == c2); } }");
287 "namespace __cppyy_internal { template<class C1, class C2>"
288 " bool is_not_equal(const C1& c1, const C2& c2) { return (bool)(c1 != c2); } }");
291 if (!getenv(
"CPPYY_NO_ROOT_FILTER")) {
292 gROOT->GetListOfGlobals(
true);
293 gROOT->GetListOfGlobalFunctions(
true);
294 std::set<std::string> initial;
307 gRootSOs.insert(
"libMathCore.dll ");
318 ~ApplicationStarter() {
323} _applicationStarter;
332 assert((ClassRefs_t::size_type)scope <
g_classrefs.size());
338 CallWrapper* wrap = ((CallWrapper*)method);
339 if (!wrap->fTF || wrap->fTF->GetDeclId() != wrap->fDecl) {
340 MethodInfo_t* mi =
gInterpreter->MethodInfo_Factory(wrap->fDecl);
348 CallWrapper* wrap = ((CallWrapper*)method);
349 if (!wrap->fTF || wrap->fTF->GetDeclId() != wrap->fDecl) {
350 MethodInfo_t* mi =
gInterpreter->MethodInfo_Factory(wrap->fDecl);
359 char* cstr = (
char*)
malloc(cppstr.size()+1);
360 memcpy(cstr, cppstr.c_str(), cppstr.size()+1);
365bool match_name(
const std::string& tname,
const std::string fname)
368 if (fname.rfind(tname, 0) == 0) {
369 if ((tname.size() == fname.size()) ||
370 (tname.size() < fname.size() && fname[tname.size()] ==
'<'))
379 std::string::size_type pos =
name.find(
'<');
380 if (pos != std::string::npos)
406 TCppType_t klass = find_memoized(cppitem_name);
410 std::string tclean = cppitem_name.compare(0, 2,
"::") == 0 ?
411 cppitem_name.substr(2, std::string::npos) : cppitem_name;
415 if (tclean.empty() )
return cppitem_name;
418 if (tclean[tclean.size()-1] ==
']')
419 tclean = tclean.substr(0, tclean.rfind(
'[')) +
"[]";
421 if (tclean.rfind(
"byte", 0) == 0 || tclean.rfind(
"std::byte", 0) == 0)
434 if (cppitem_name.rfind(
"__type_pack_element", 0) != std::string::npos) {
438 const char* str = cppitem_name.c_str();
439 char* endptr =
nullptr;
440 unsigned long index = strtoul(str+20, &endptr, 0);
442 std::string tmplvars{endptr};
443 auto start = tmplvars.find(
',') + 1;
444 auto end = tmplvars.find(
',', start);
447 end = tmplvars.find(
',', start);
448 if (end == std::string::npos) end = tmplvars.rfind(
'>');
452 std::string resolved = tmplvars.substr(start, end-start);
453 auto cpd = tmplvars.rfind(
'>');
454 if (cpd != std::string::npos && cpd+1 != tmplvars.size())
455 return resolved + tmplvars.substr(cpd+1, std::string::npos);
475 if (et_short.find(
"(unnamed") == std::string::npos) {
476 std::ostringstream decl;
478 for (
auto& itype : {
"unsigned int"}) {
479 decl <<
"std::is_same<"
481 <<
", std::underlying_type<"
483 <<
">::type>::value;";
487 std::string resugared;
488 if (et_short.size() != enum_type.size()) {
489 auto pos = enum_type.find(et_short);
490 if (pos != std::string::npos) {
491 resugared = enum_type.substr(0, pos) + itype;
492 if (pos+et_short.size() < enum_type.size())
493 resugared += enum_type.substr(pos+et_short.size(), std::string::npos);
496 if (resugared.empty()) resugared = itype;
504 int ipos = (
int)enum_type.size()-1;
505 for (; 0 <= ipos; --ipos) {
506 char c = enum_type[ipos];
507 if (isspace(
c))
continue;
508 if (isalnum(
c) ||
c ==
'_' ||
c ==
'>' ||
c ==
')')
break;
510 bool isConst = enum_type.find(
"const ", 6) != std::string::npos;
511 std::string restype = isConst ?
"const " :
"";
512 restype +=
"internal_enum_type_t"+enum_type.substr((std::string::size_type)ipos+1, std::string::npos);
531 bool bHasAlias = sname != scope_name;
533 result = find_memoized(scope_name);
539 if (b_scope_name_missclassified) {
540 result = find_memoized(
"std::"+scope_name);
544 if (b_sname_missclassified) {
565 if (b_scope_name_missclassified)
567 if (b_sname_missclassified)
575 return (
bool)
gInterpreter->CheckClassTemplate(template_name.c_str());
581 virtual ~AutoCastRTTI() {}
588 if (!cr.
GetClass() || !obj)
return klass;
595 volatile const char* raw =
nullptr;
598 AutoCastRTTI* pcst = (AutoCastRTTI*)obj;
599 raw =
typeid(*pcst).raw_name();
602 void* vfptr = *(
void**)((intptr_t)obj);
603 void* meta = (
void*)((intptr_t)*((
void**)((intptr_t)vfptr-
sizeof(
void*))));
604 if (*(intptr_t*)meta == 2) {
606 void* ptdescr = (
void*)((intptr_t)meta + 4*
sizeof(
unsigned long)+
sizeof(
void*));
607 if (ptdescr && *(
void**)ptdescr) {
608 auto rtti = *(std::type_info**)ptdescr;
609 raw = rtti->raw_name();
610 if (raw && raw[0] !=
'\0')
622 }
catch (std::bad_typeid) {
650 if (dt)
return dt->
Size();
672 ClassInfo_t* ci =
gInterpreter->ClassInfo_Factory(type_name.c_str());
727 CallWrapper* wrap = (CallWrapper*)method;
730 MethodInfo_t* meth =
gInterpreter->MethodInfo_Factory(wrap->fDecl);
734 if (!(callf &&
gInterpreter->CallFunc_IsValid(callf))) {
740 std::cerr <<
"TODO: report unresolved function error to Python\n";
750 wrap->fFaceptr =
gInterpreter->CallFunc_IFacePtr(callf);
754 return wrap->fFaceptr;
760 bool runRelease =
false;
761 for (
size_t i = 0; i < nargs; ++i) {
762 switch (args[i].fTypeCode) {
769 vargs[i] = args[i].
fRef;
772 vargs[i] = (
void*)&args[i].fValue.fVoidp;
781 for (
size_t i = 0; i < nargs; ++i) {
782 if (args[i].fTypeCode ==
'X')
783 free(args[i].fValue.fVoidp);
793 CallWrapper* wrap = (CallWrapper*)method;
799 bool runRelease =
false;
802 if (nargs) runRelease =
copy_args(args, nargs, smallbuf);
805 std::vector<void*> buf(nargs);
806 runRelease =
copy_args(args, nargs, buf.data());
814 bool runRelease =
false;
817 if (nargs) runRelease =
copy_args(args, nargs, (
void**)smallbuf);
818 faceptr.
fCtor((
void**)smallbuf,
result, (
unsigned long)nargs);
820 std::vector<void*> buf(nargs);
821 runRelease =
copy_args(args, nargs, buf.data());
822 faceptr.
fCtor(buf.data(),
result, (
unsigned long)nargs);
829 std::cerr <<
" DESTRUCTOR NOT IMPLEMENTED YET! " << std::endl;
841 if (
WrapperCall(method, nargs, args, (
void*)self, &t))
846#define CPPYY_IMP_CALL(typecode, rtype) \
847rtype Cppyy::Call##typecode(TCppMethod_t method, TCppObject_t self, size_t nargs, void* args)\
849 return CallT<rtype>(method, self, nargs, args); \
854 if (!
WrapperCall(method, nargs, args, (
void*)self,
nullptr))
879 char* cstr =
nullptr;
881 std::string* cppresult = (std::string*)
malloc(
sizeof(std::string));
882 if (
WrapperCall(method, nargs, args, self, (
void*)cppresult)) {
884 *
length = cppresult->size();
885 cppresult->std::string::~basic_string();
888 free((
void*)cppresult);
896 if (
WrapperCall(method, nargs, args,
nullptr, &obj))
914 ::operator
delete(obj);
932 if (strstr(
f->GetName(),
"<")) {
934 std::ostringstream sig;
935 sig <<
"template " << fn <<
";";
940 addrstr.reserve(128);
941 addrstr.push_back(
'(');
943 addrstr.append(
" (");
946 std::string::size_type colon = sfn.rfind(
"::");
947 if (colon != std::string::npos) addrstr.append(sfn.substr(0, colon+2));
950 addrstr.append(
"*)");
952 addrstr.append(
") &");
954 addrstr.append(sfn.substr(0, sfn.find(
'(')));
1008 if (type_name.empty())
return false;
1010 if (tn_short.empty())
return false;
1011 return gInterpreter->ClassInfo_IsEnum(tn_short.c_str());
1038 for (std::string::size_type pos = 0; pos <
name.size(); ++pos) {
1039 std::string::value_type
c =
name[pos];
1048 else if (tpl_open == 0 && \
1049 c ==
':' && pos+1 <
name.size() &&
name[pos+1] ==
':') {
1051 return name.substr(0, pos-1);
1063 std::string::size_type first_scope =
name.find(
':');
1064 if (first_scope == std::string::npos)
1065 return name.substr(0,
name.find(
'<'));
1066 std::string::size_type first_templ =
name.find(
'<');
1067 if (first_templ == std::string::npos)
1068 return name.substr(0, first_scope);
1069 return name.substr(0, std::min(first_templ, first_scope));
1072#define FILL_COLL(type, filter) { \
1074 type* obj = nullptr; \
1075 while ((obj = (type*)itr.Next())) { \
1076 const char* nm = obj->GetName(); \
1077 if (nm && nm[0] != '_' && !(obj->Property() & (filter))) { \
1078 if (gInitialNames.find(nm) == gInitialNames.end()) \
1079 cppnames.insert(nm); \
1084 std::set<std::string>& cppnames,
const char*
name,
bool nofilter =
false)
1086 if (!
name ||
name[0] ==
'_' || strstr(
name,
".h") != 0 || strncmp(
name,
"operator", 8) == 0)
1094 if (strncmp(
name,
"std::", 5) == 0) {
1097 if (strncmp(
name,
"__1::", 5) == 0)
name += 5;
1103 if (strncmp(
name, ns_scope.c_str(), ns_scope.size()) == 0)
1125 while ((ev = (
TEnvRec*)itr.Next())) {
1142 coll =
gROOT->GetListOfTypes();
1159 while ((obj = (
TFunction*)itr.Next())) {
1160 const char* nm = obj->
GetName();
1162 if (nm && nm[0] !=
'_' && strstr(nm,
"<") == 0 && strncmp(nm,
"operator", 8) != 0) {
1164 cppnames.insert(nm);
1176 coll =
gROOT->GetListOfGlobals();
1202 std::vector<Cppyy::TCppScope_t> res;
1218 res.reserve(
v.size());
1219 for (
const auto& uid :
v) {
1221 if (uscope) res.push_back(uscope);
1234 std::string clName = cr->
GetName();
1236 std::string::size_type pos = clName.substr(0, clName.find(
'<')).rfind(
"::");
1237 if (pos != std::string::npos)
1238 return clName.substr(pos+2, std::string::npos);
1250 return std::string(
"std::")+cr->
GetName();
1280 else if (nbases == 0)
1331 auto ndirectbases = directbases->
GetSize();
1332 if (ndirectbases == 0) {
1337 std::vector<Cppyy::TCppIndex_t> nbases_branches;
1338 nbases_branches.reserve(ndirectbases);
1345 if (
auto baseclass_tclass = baseclass->GetClassPointer()) {
1351 auto longestbranch = std::max_element(std::begin(nbases_branches), std::end(nbases_branches));
1354 return 1 + *longestbranch;
1371 if (
auto klass_tclass = cr.GetClass()) {
1387 if (derived == base)
1397 const std::string& tn = cr->
GetName();
1408 if (!raw && !deref)
return true;
1421 return (!deref || *deref) && (!raw || *raw);
1447 if (derived == base || !(base && derived))
1448 return (ptrdiff_t)0;
1454 return (ptrdiff_t)0;
1463 std::ostringstream msg;
1464 msg <<
"failed offset calculation between " << cb->
GetName() <<
" and " << cd->
GetName();
1467 std::cerr <<
"Warning: " << msg.str() <<
'\n';
1471 return rerror ? (ptrdiff_t)
offset : 0;
1477 return rerror ? (ptrdiff_t)
offset : 0;
1490 return gROOT->GetListOfGlobalFunctions(
true)->GetSize();
1497 if (clName.find(
'<') != std::string::npos) {
1500 std::ostringstream stmt;
1501 stmt <<
"template class " << clName <<
";";
1517 std::vector<TCppIndex_t> indices;
1565 const std::string&
name = ((CallWrapper*)method)->fName;
1567 if (
name.compare(0, 8,
"operator") != 0)
1569 return name.substr(0,
name.find(
'<'));
1578 std::string
name = ((CallWrapper*)method)->fName;
1597 return "constructor";
1598 std::string restype =
f->GetReturnTypeName();
1602 if (restype.find(
"int8_t") != std::string::npos)
1604 restype =
f->GetReturnTypeNormalizedName();
1605 if (restype ==
"(lambda)") {
1606 std::ostringstream s;
1608 s <<
"__cling_internal::FT<decltype("
1611 if (i != 0) s <<
", ";
1668 void *reqqtp =
gInterpreter->TypeInfo_QualTypePtr(reqti);
1707 std::ostringstream sig;
1709 int nArgs =
f->GetNargs();
1710 if (maxargs != (
TCppIndex_t)-1) nArgs = std::min(nArgs, (
int)maxargs);
1711 for (
int iarg = 0; iarg < nArgs; ++iarg) {
1714 if (show_formalargs) {
1715 const char* argname = arg->
GetName();
1716 if (argname && argname[0] !=
'\0') sig <<
" " << argname;
1718 if (defvalue && defvalue[0] !=
'\0') sig <<
" = " << defvalue;
1720 if (iarg != nArgs-1) sig << (show_formalargs ?
", " :
",");
1733 std::ostringstream sig;
1734 sig <<
f->GetReturnTypeName() <<
" "
1735 << scName <<
"::" <<
f->GetName();
1774 return ((
THashList*)
gROOT->GetListOfFunctionTemplates())->At((
int)imeth)->GetName();
1782 assert(!
"should not be called unless GetNumTemplatedMethods() succeeded");
1803 return (
bool)
gROOT->GetFunctionTemplate(
name.c_str());
1819 if (
f && strstr(
f->GetName(),
"<"))
return true;
1824 if (((CallWrapper*)idx)->fName.find(
'<') != std::string::npos)
return true;
1845 TFunction* func =
nullptr; ClassInfo_t* cl =
nullptr;
1847 func =
gROOT->GetGlobalFunctionWithPrototype(
name.c_str(),
proto.c_str());
1893 if (
name.back() ==
'>') {
1894 auto pos =
name.find(
'<');
1895 if (pos != std::string::npos) {
1900 if (
name.size() < alt.size() && alt.find(
'<') == pos) {
1901 const std::string& partial =
name.substr(pos,
name.size()-1-pos);
1902 if (strncmp(partial.c_str(), alt.substr(pos, alt.size()-1-pos).c_str(), partial.size()) == 0)
1914std::string
type_remap(
const std::string& n1,
const std::string& n2)
1921 if (n2 ==
"std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >")
1923 return "std::string";
1924 }
else if (n1 ==
"float")
1930 TCppType_t scope,
const std::string& lc,
const std::string& rc,
const std::string& opname)
1936 const std::string& lcname =
type_remap(lcname1, rcname);
1938 std::string
proto = lcname +
"&" + (rc.empty() ? rc : (
", " + rcname +
"&"));
1942 proto = lcname + (rc.empty() ? rc : (
", " + rcname));
1943 func =
gROOT->GetGlobalFunctionWithPrototype(opname.c_str(),
proto.c_str());
1950 proto = lcname + (rc.empty() ? rc : (
", " + rcname));
2013 return gROOT->GetListOfGlobals(
true)->GetSize();
2028 if ((
int)idata < numDMs)
2052 std::ostringstream s;
2055 fullType.append(s.str());
2067 std::string fullType =
m->GetFullTypeName();
2068 if (fullType !=
m->GetTrueTypeName()) {
2069 const std::string& trueName =
m->GetTrueTypeName();
2070 if (fullType.find(
"::") == std::string::npos && trueName.find(
"::") != std::string::npos)
2071 fullType = trueName;
2074 if ((
int)
m->GetArrayDim()) {
2075 std::ostringstream s;
2076 for (
int i = 0; i < (
int)
m->GetArrayDim(); ++i)
2077 s <<
'[' <<
m->GetMaxIndex(i) <<
']';
2078 fullType.append(s.str());
2092 intptr_t addr = (intptr_t)
gInterpreter->ProcessLine((std::string(
"&")+gbl->
GetName()+
";").c_str());
2107 if (strchr(cr->
GetName(),
'<'))
2109 if ((intptr_t)
m->GetOffsetCint() == (intptr_t)-1)
2112 return (intptr_t)
m->GetOffsetCint();
2116 return (intptr_t)-1;
2129 DataMemberInfo_t* t =
gInterpreter->DataMemberInfo_Factory(did,
nullptr);
2140 std::ostringstream s;
2141 s <<
"auto __cppyy_internal_wrap_" <<
name <<
" = "
2142 "new __cling_internal::FT<decltype(" <<
name <<
")>::F"
2143 "{" <<
name <<
"};";
2146 (
"__cppyy_internal_wrap_"+
name).c_str());
2147 if (wrap && wrap->GetAddress()) gb = wrap;
2240 std::string ti =
m->GetTypeName();
2243 if (ti.rfind(
"(unnamed)") != std::string::npos)
2248 if (ti.rfind(cr->
GetName(), 0) != std::string::npos) {
2249 std::string::size_type s = strlen(cr->
GetName())+2;
2250 if (s < ti.size()) {
2271 return m->GetMaxIndex(dimension);
2303 return (
long long)ecst->
GetValue();
2365#define CPPYY_HANDLE_EXCEPTION \
2366 catch (std::exception& e) { \
2367 cppyy_exctype_t* etype = (cppyy_exctype_t*)((Parameter*)args+nargs); \
2368 *etype = (cppyy_exctype_t)2; \
2369 *((char**)(etype+1)) = cppstring_to_cstring(e.what()); \
2372 cppyy_exctype_t* etype = (cppyy_exctype_t*)((Parameter*)args+nargs); \
2373 *etype = (cppyy_exctype_t)1; \
2374 *((char**)(etype+1)) = \
2375 cppstring_to_cstring("unhandled, unknown C++ exception"); \
2386 return (
unsigned char)
Cppyy::CallB(method, (
void*)self, nargs, args);
2388 return (
unsigned char)-1;
2393 return (
char)
Cppyy::CallC(method, (
void*)self, nargs, args);
2400 return (
short)
Cppyy::CallH(method, (
void*)self, nargs, args);
2407 return (
int)
Cppyy::CallI(method, (
void*)self, nargs, args);
2414 return (
long)
Cppyy::CallL(method, (
void*)self, nargs, args);
2421 return (
long long)
Cppyy::CallLL(method, (
void*)self, nargs, args);
2423 return (
long long)-1;
2428 return (
float)
Cppyy::CallF(method, (
void*)self, nargs, args);
2435 return (
double)
Cppyy::CallD(method, (
void*)self, nargs, args);
2442 return (
long double)
Cppyy::CallLD(method, (
void*)self, nargs, args);
2444 return (
long double)-1;
2453 return (
void*)
Cppyy::CallR(method, (
void*)self, nargs, args);
2455 return (
void*)
nullptr;
2461 return Cppyy::CallS(method, (
void*)self, nargs, args, lsz);
2463 return (
char*)
nullptr;
2532 std::set<std::string> cppnames;
2534 const char** c_cppnames = (
const char**)
malloc(cppnames.size()*
sizeof(
const char*));
2536 for (
const auto&
name : cppnames) {
2540 *count = cppnames.size();
2553 for (
int i = 0; i < (
int)uv.size(); ++i) llresult[i] = uv[i];
2625 llresult[
result.size()] = -1;
2793#if defined(_MSC_VER)
2795 return _strtoi64(str, NULL, 0);
2800 return _strtoui64(str, NULL, 0);
2805 return strtoll(str, NULL, 0);
2810 return strtoull(str, NULL, 0);
2824 *lsz = ((std::string*)ptr)->size();
2825 return ((std::string*)ptr)->
data();
2833 return (
double)*(
long double*)
p;
2837 *(
long double*)
p =
d;
2841 return (
int)(*(std::vector<bool>*)ptr)[idx];
2845 (*(std::vector<bool>*)ptr)[idx] = (
bool)
value;
static Roo_reg_AGKInteg1D instance
Int_t gErrorIgnoreLevel
Error handling routines.
R__EXTERN TExceptionHandler * gExceptionHandler
R__EXTERN ExceptionContext_t * gException
R__EXTERN void Throw(int code)
If an exception context has been set (using the TRY and RETRY macros) jump back to where it was set.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h req_type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void funcs
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TSystem * gSystem
static struct Signalmap_t gSignalMap[kMAXSIGNALS]
cppyy_scope_t cppyy_type_t
unsigned long cppyy_exctype_t
Each class (see TClass) has a linked list of its base class(es).
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
TClassRef is used to implement a permanent reference to a TClass object.
TClass * GetClass() const
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetListOfUsingDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of using declarations of a class.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
TMethod * GetMethod(const char *method, const char *params, Bool_t objectIsConst=kFALSE)
Find the best method (if there is one) matching the parameters.
TMethod * GetMethodWithPrototype(const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
const TList * GetListOfAllPublicMethods(Bool_t load=kTRUE)
Returns a list of all public methods of this class and its base classes.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
TList * GetListOfFunctionTemplates(Bool_t load=kTRUE)
Return TListOfFunctionTemplates for a class.
TList * GetListOfEnums(Bool_t load=kTRUE)
Return a list containing the TEnums of a class.
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
TClass * GetBaseClass(const char *classname)
Return pointer to the base class "classname".
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
ClassInfo_t * GetClassInfo() const
Long_t ClassProperty() const
Return the C++ property of this class, eg.
Long_t Property() const override
Returns the properties of the TClass as a bit field stored as a Long_t value.
Bool_t HasDefaultConstructor(Bool_t testio=kFALSE) const
Return true if we have access to a constructor usable for I/O.
ROOT::DelFunc_t GetDelete() const
Return the wrapper around delete ThiObject.
TClass * GetActualClass(const void *object) const
Return a pointer to the real class of the object.
TFunctionTemplate * GetFunctionTemplate(const char *name)
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
Collection abstract base class.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
All ROOT classes may have RTTI (run time type identification) support added.
Basic data type descriptor (datatype information is obtained from CINT).
const char * GetFullTypeName() const
Get full type description of typedef, e,g.: "class TDirectory*".
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
Int_t Size() const
Get size of basic typedef'ed type.
The TEnumConstant class implements the constants of the enum type.
Long64_t GetValue() const
The TEnum class implements the enum type.
const TEnumConstant * GetConstant(const char *name) const
const char * GetValue() const
const char * GetName() const override
Returns name of object.
virtual void HandleException(int sig)=0
Dictionary for function template This class describes one single function template.
Global functions class (global functions are obtained from CINT).
virtual const char * GetMangledName() const
Returns the mangled name as defined by CINT, or 0 in case of error.
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
Int_t GetNargs() const
Number of function arguments.
Long_t ExtraProperty() const
Get property description word. For meaning of bits see EProperty.
std::string GetReturnTypeNormalizedName() const
Get the normalized name of the return type.
Global variables class (global variables are obtained from CINT).
virtual Int_t GetArrayDim() const
Return number of array dimensions.
virtual Int_t GetMaxIndex(Int_t dim) const
Return maximum index for array dimension "dim".
Long_t Property() const override
Get property description word. For meaning of bits see EProperty.
virtual void * GetAddress() const
Return address of global.
virtual const char * GetFullTypeName() const
Get full type description of global variable, e,g.: "class TDirectory*".
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
A collection of TDataMember objects designed for fast access given a DeclId_t and for keep track of T...
A collection of TEnum objects designed for fast access given a DeclId_t and for keep track of TEnum t...
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
Each ROOT method (see TMethod) has a linked list of its arguments.
const char * GetFullTypeName() const
Get full type description of method argument, e.g.: "class TDirectory*".
TypeInfo_t * GetTypeInfo() const
Get the TypeInfo of the method argument.
const char * GetDefault() const
Get default value of method argument.
std::string GetTypeNormalizedName() const
Get the normalized name of the return type.
const char * GetName() const override
Returns name of object.
virtual const char * GetName() const
Returns name of object.
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
static Bool_t Initialized()
Return kTRUE if the TROOT object has been initialized.
virtual Int_t IndexOf(const TObject *obj) const
Return index of object in collection.
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
virtual void Exit(int code, Bool_t mode=kTRUE)
Exit the application.
virtual void StackTrace()
Print a stack trace.
char * cppyy_method_mangled_name(cppyy_method_t method)
int cppyy_is_staticdata(cppyy_type_t type, cppyy_index_t datamember_index)
int cppyy_vectorbool_getitem(cppyy_object_t ptr, int idx)
int cppyy_has_virtual_destructor(cppyy_type_t type)
int cppyy_is_publicmethod(cppyy_method_t method)
void * cppyy_call_r(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
cppyy_object_t cppyy_constructor(cppyy_method_t method, cppyy_type_t klass, int nargs, void *args)
void * cppyy_load_dictionary(const char *lib_name)
static void cond_add(Cppyy::TCppScope_t scope, const std::string &ns_scope, std::set< std::string > &cppnames, const char *name, bool nofilter=false)
size_t cppyy_function_arg_typeoffset()
int cppyy_exists_method_template(cppyy_scope_t scope, const char *name)
int cppyy_get_num_templated_methods(cppyy_scope_t scope)
char * cppyy_call_s(cppyy_method_t method, cppyy_object_t self, int nargs, void *args, size_t *lsz)
char * cppyy_resolve_enum(const char *enum_type)
cppyy_object_t cppyy_charp2stdstring(const char *str, size_t sz)
static Name2ClassRefIndex_t g_name2classrefidx
int cppyy_is_constructor(cppyy_method_t method)
int cppyy_is_enum_data(cppyy_scope_t scope, cppyy_index_t idata)
#define FILL_COLL(type, filter)
char * cppyy_scoped_final_name(cppyy_type_t type)
int cppyy_num_bases(cppyy_type_t type)
static std::string outer_with_template(const std::string &name)
cppyy_method_t cppyy_get_method_template(cppyy_scope_t scope, const char *name, const char *proto)
static std::string outer_no_template(const std::string &name)
int cppyy_is_smartptr(cppyy_type_t type)
static std::string type_remap(const std::string &n1, const std::string &n2)
static std::map< Cppyy::TCppType_t, bool > sHasOperatorDelete
long long cppyy_strtoll(const char *str)
static std::set< std::string > gRootSOs
int cppyy_is_subtype(cppyy_type_t derived, cppyy_type_t base)
static TClassRef & type_from_handle(Cppyy::TCppScope_t scope)
double cppyy_call_nld(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
void cppyy_free(void *ptr)
int cppyy_smartptr_info(const char *name, cppyy_type_t *raw, cppyy_method_t *deref)
unsigned long long cppyy_strtoull(const char *str)
char * cppyy_method_arg_type(cppyy_method_t method, int arg_index)
cppyy_object_t cppyy_stdstring2stdstring(cppyy_object_t ptr)
char * cppyy_base_name(cppyy_type_t type, int base_index)
cppyy_scope_t * cppyy_get_using_namespaces(cppyy_scope_t scope)
static bool copy_args(Parameter *args, size_t nargs, void **vargs)
int cppyy_num_bases_longest_branch(cppyy_type_t type)
static TInterpreter::CallFuncIFacePtr_t GetCallFunc(Cppyy::TCppMethod_t method)
int cppyy_is_publicdata(cppyy_type_t type, cppyy_index_t datamember_index)
CPyCppyy::Parameter Parameter
intptr_t cppyy_datamember_offset(cppyy_scope_t scope, int datamember_index)
char * cppyy_datamember_type(cppyy_scope_t scope, int datamember_index)
static bool is_missclassified_stl(const std::string &name)
std::map< std::string, ClassRefs_t::size_type > Name2ClassRefIndex_t
void cppyy_destructor(cppyy_type_t klass, cppyy_object_t self)
static const ClassRefs_t::size_type STD_HANDLE
char cppyy_call_c(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
ptrdiff_t cppyy_base_offset(cppyy_type_t derived, cppyy_type_t base, cppyy_object_t address, int direction)
long double cppyy_call_ld(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
int cppyy_is_const_data(cppyy_scope_t scope, cppyy_index_t idata)
const char ** cppyy_get_all_cpp_names(cppyy_scope_t scope, size_t *count)
void cppyy_call_v(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
static std::set< std::string > gSmartPtrTypes
double cppyy_longdouble2double(void *p)
int cppyy_method_req_args(cppyy_method_t method)
int cppyy_is_staticmethod(cppyy_method_t method)
static GlobalVars_t g_globalvars
cppyy_index_t * cppyy_method_indices_from_name(cppyy_scope_t scope, const char *name)
static char * cppstring_to_cstring(const std::string &cppstr)
char * cppyy_method_signature(cppyy_method_t method, int show_formalargs)
int cppyy_is_abstract(cppyy_type_t type)
static void release_args(Parameter *args, size_t nargs)
int cppyy_call_i(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
static std::set< std::string > g_builtins
unsigned char cppyy_call_b(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
int cppyy_is_template(const char *template_name)
char * cppyy_method_result_type(cppyy_method_t method)
cppyy_type_t cppyy_actual_class(cppyy_type_t klass, cppyy_object_t obj)
int cppyy_is_templated_constructor(cppyy_scope_t scope, cppyy_index_t imeth)
char * cppyy_method_name(cppyy_method_t method)
int cppyy_is_protectedmethod(cppyy_method_t method)
char * cppyy_final_name(cppyy_type_t type)
char * cppyy_get_templated_method_name(cppyy_scope_t scope, cppyy_index_t imeth)
char * cppyy_method_full_name(cppyy_method_t method)
long cppyy_call_l(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
void cppyy_double2longdouble(double d, void *p)
void cppyy_deallocate_function_args(void *args)
int cppyy_method_is_template(cppyy_scope_t scope, cppyy_index_t idx)
static std::vector< CallWrapper * > gWrapperHolder
static bool gEnableFastPath
void cppyy_destruct(cppyy_type_t type, cppyy_object_t self)
int cppyy_is_enum(const char *type_name)
size_t cppyy_size_of_type(const char *type_name)
int cppyy_is_destructor(cppyy_method_t method)
cppyy_object_t cppyy_allocate(cppyy_type_t type)
char * cppyy_datamember_name(cppyy_scope_t scope, int datamember_index)
cppyy_object_t cppyy_construct(cppyy_type_t type)
static ClassRefs_t g_classrefs(1)
static bool WrapperCall(Cppyy::TCppMethod_t method, size_t nargs, void *args_, void *self, void *result)
static std::map< std::string, std::string > resolved_enum_types
int cppyy_is_namespace(cppyy_scope_t scope)
cppyy_object_t cppyy_call_o(cppyy_method_t method, cppyy_object_t self, int nargs, void *args, cppyy_type_t result_type)
long long cppyy_call_ll(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
cppyy_scope_t cppyy_get_scope(const char *scope_name)
void cppyy_vectorbool_setitem(cppyy_object_t ptr, int idx, int value)
static size_t CALL_NARGS(size_t nargs)
static CallWrapper * new_CallWrapper(TFunction *f)
void cppyy_add_smartptr_type(const char *type_name)
void * cppyy_allocate_function_args(int nargs)
float cppyy_call_f(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
short cppyy_call_h(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
int cppyy_is_protecteddata(cppyy_type_t type, cppyy_index_t datamember_index)
static std::set< std::string > gSTLNames
static const ClassRefs_t::size_type GLOBAL_HANDLE
int cppyy_get_dimension_size(cppyy_scope_t scope, cppyy_index_t idata, int dimension)
char * cppyy_method_signature_max(cppyy_method_t method, int show_formalargs, int maxargs)
double cppyy_call_d(cppyy_method_t method, cppyy_object_t self, int nargs, void *args)
int cppyy_num_methods(cppyy_scope_t scope)
char * cppyy_method_prototype(cppyy_scope_t scope, cppyy_method_t method, int show_formalargs)
std::vector< TGlobal * > GlobalVars_t
char * cppyy_resolve_name(const char *cppitem_name)
cppyy_method_t cppyy_get_method(cppyy_scope_t scope, cppyy_index_t idx)
std::vector< TClassRef > ClassRefs_t
size_t cppyy_function_arg_sizeof()
int cppyy_is_const_method(cppyy_method_t method)
static std::map< TDictionary::DeclId_t, CallWrapper * > gMethodTemplates
int cppyy_num_datamembers(cppyy_scope_t scope)
#define CPPYY_HANDLE_EXCEPTION
size_t cppyy_size_of_klass(cppyy_type_t klass)
static bool match_name(const std::string &tname, const std::string fname)
int cppyy_datamember_index(cppyy_scope_t scope, const char *name)
cppyy_index_t cppyy_get_global_operator(cppyy_scope_t scope, cppyy_scope_t lc, cppyy_scope_t rc, const char *op)
static TFunction * m2f(Cppyy::TCppMethod_t method)
void cppyy_deallocate(cppyy_type_t type, cppyy_object_t self)
const char * cppyy_stdstring2charp(cppyy_object_t ptr, size_t *lsz)
int cppyy_compile(const char *code)
static CallWrapper::DeclId_t m2d(Cppyy::TCppMethod_t method)
int cppyy_is_aggregate(cppyy_type_t type)
static TDataMember * GetDataMemberByIndex(TClassRef cr, int idata)
#define CPPYY_IMP_CALL(typecode, rtype)
int cppyy_method_num_args(cppyy_method_t method)
static std::set< std::string > gInitialNames
char * cppyy_method_arg_default(cppyy_method_t method, int arg_index)
static T CallT(Cppyy::TCppMethod_t method, Cppyy::TCppObject_t self, size_t nargs, void *args)
cppyy_funcaddr_t cppyy_function_address(cppyy_method_t method)
int cppyy_has_complex_hierarchy(cppyy_type_t type)
Cppyy::TCppIndex_t GetLongestInheritancePath(TClass *klass)
Retrieve number of base classes in the longest branch of the inheritance tree of the input class.
char * cppyy_method_arg_name(cppyy_method_t method, int arg_index)
RPY_EXPORTED TCppIndex_t GetNumTemplatedMethods(TCppScope_t scope, bool accept_namespace=false)
RPY_EXPORTED std::string GetMethodMangledName(TCppMethod_t)
RPY_EXPORTED TCppObject_t CallO(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args, TCppType_t result_type)
RPY_EXPORTED int CallI(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args)
RPY_EXPORTED TCppIndex_t CompareMethodArgType(TCppMethod_t, TCppIndex_t iarg, const std::string &req_type)
RPY_EXPORTED ptrdiff_t GetBaseOffset(TCppType_t derived, TCppType_t base, TCppObject_t address, int direction, bool rerror=false)
RPY_EXPORTED void DeallocateFunctionArgs(void *args)
RPY_EXPORTED bool IsEnumData(TCppScope_t scope, TCppIndex_t idata)
RPY_EXPORTED unsigned char CallB(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args)
RPY_EXPORTED Long64_t CallLL(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args)
RPY_EXPORTED bool IsAbstract(TCppType_t type)
RPY_EXPORTED size_t SizeOf(TCppType_t klass)
RPY_EXPORTED TCppObject_t CallConstructor(TCppMethod_t method, TCppType_t type, size_t nargs, void *args)
RPY_EXPORTED void * AllocateFunctionArgs(size_t nargs)
RPY_EXPORTED bool IsDefaultConstructable(TCppType_t type)
RPY_EXPORTED bool IsTemplate(const std::string &template_name)
RPY_EXPORTED TCppIndex_t GetMethodReqArgs(TCppMethod_t)
RPY_EXPORTED bool IsEnum(const std::string &type_name)
RPY_EXPORTED std::vector< TCppIndex_t > GetMethodIndicesFromName(TCppScope_t scope, const std::string &name)
RPY_EXPORTED bool ExistsMethodTemplate(TCppScope_t scope, const std::string &name)
RPY_EXPORTED TCppIndex_t GetNumDatamembers(TCppScope_t scope, bool accept_namespace=false)
RPY_EXPORTED std::string ToString(TCppType_t klass, TCppObject_t obj)
RPY_EXPORTED std::string GetMethodName(TCppMethod_t)
RPY_EXPORTED bool IsConstData(TCppScope_t scope, TCppIndex_t idata)
RPY_EXPORTED void AddSmartPtrType(const std::string &)
RPY_EXPORTED bool Compile(const std::string &code, bool silent=false)
RPY_EXPORTED void CallDestructor(TCppType_t type, TCppObject_t self)
RPY_EXPORTED TCppScope_t gGlobalScope
RPY_EXPORTED bool IsProtectedData(TCppScope_t scope, TCppIndex_t idata)
RPY_EXPORTED std::string GetMethodSignature(TCppMethod_t, bool show_formalargs, TCppIndex_t maxargs=(TCppIndex_t) -1)
RPY_EXPORTED int GetDimensionSize(TCppScope_t scope, TCppIndex_t idata, int dimension)
RPY_EXPORTED bool IsSubtype(TCppType_t derived, TCppType_t base)
RPY_EXPORTED TCppMethod_t GetMethodTemplate(TCppScope_t scope, const std::string &name, const std::string &proto)
RPY_EXPORTED bool IsConstructor(TCppMethod_t method)
RPY_EXPORTED TCppIndex_t GetNumMethods(TCppScope_t scope, bool accept_namespace=false)
RPY_EXPORTED TCppObject_t Construct(TCppType_t type, void *arena=nullptr)
RPY_EXPORTED bool GetSmartPtrInfo(const std::string &, TCppType_t *raw, TCppMethod_t *deref)
RPY_EXPORTED char CallC(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args)
RPY_EXPORTED std::string GetMethodArgName(TCppMethod_t, TCppIndex_t iarg)
RPY_EXPORTED double CallD(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args)
RPY_EXPORTED size_t GetFunctionArgTypeoffset()
RPY_EXPORTED TCppObject_t Allocate(TCppType_t type)
RPY_EXPORTED void Destruct(TCppType_t type, TCppObject_t instance)
RPY_EXPORTED std::string ResolveName(const std::string &cppitem_name)
RPY_EXPORTED void AddTypeReducer(const std::string &reducable, const std::string &reduced)
RPY_EXPORTED std::string ResolveEnum(const std::string &enum_type)
RPY_EXPORTED long long GetEnumDataValue(TCppEnum_t, TCppIndex_t idata)
RPY_EXPORTED bool IsAggregate(TCppType_t type)
RPY_EXPORTED TCppIndex_t GetMethodNumArgs(TCppMethod_t)
RPY_EXPORTED TCppType_t GetActualClass(TCppType_t klass, TCppObject_t obj)
RPY_EXPORTED std::string GetBaseName(TCppType_t type, TCppIndex_t ibase)
RPY_EXPORTED bool IsNamespace(TCppScope_t scope)
RPY_EXPORTED float CallF(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args)
RPY_EXPORTED std::string GetScopedFinalName(TCppType_t type)
RPY_EXPORTED void Deallocate(TCppType_t type, TCppObject_t instance)
RPY_EXPORTED bool IsPublicData(TCppScope_t scope, TCppIndex_t idata)
RPY_EXPORTED std::string GetMethodArgType(TCppMethod_t, TCppIndex_t iarg)
RPY_EXPORTED long CallL(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args)
RPY_EXPORTED void * CallR(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args)
RPY_EXPORTED std::string GetEnumDataName(TCppEnum_t, TCppIndex_t idata)
RPY_EXPORTED void GetAllCppNames(TCppScope_t scope, std::set< std::string > &cppnames)
RPY_EXPORTED bool IsComplete(const std::string &type_name)
RPY_EXPORTED bool IsBuiltin(const std::string &type_name)
RPY_EXPORTED bool IsStaticMethod(TCppMethod_t method)
RPY_EXPORTED TCppIndex_t GetDatamemberIndex(TCppScope_t scope, const std::string &name)
RPY_EXPORTED void CallV(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args)
RPY_EXPORTED LongDouble_t CallLD(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args)
RPY_EXPORTED bool IsStaticData(TCppScope_t scope, TCppIndex_t idata)
RPY_EXPORTED std::string GetDatamemberType(TCppScope_t scope, TCppIndex_t idata)
RPY_EXPORTED TCppMethod_t GetMethod(TCppScope_t scope, TCppIndex_t imeth)
RPY_EXPORTED bool IsDestructor(TCppMethod_t method)
RPY_EXPORTED bool IsSmartPtr(TCppType_t type)
RPY_EXPORTED std::string GetTemplatedMethodName(TCppScope_t scope, TCppIndex_t imeth)
RPY_EXPORTED size_t GetFunctionArgSizeof()
RPY_EXPORTED TCppScope_t GetScope(const std::string &scope_name)
RPY_EXPORTED bool HasVirtualDestructor(TCppType_t type)
RPY_EXPORTED bool IsConstMethod(TCppMethod_t)
RPY_EXPORTED bool HasComplexHierarchy(TCppType_t type)
RPY_EXPORTED std::vector< TCppScope_t > GetUsingNamespaces(TCppScope_t)
RPY_EXPORTED bool IsTemplatedConstructor(TCppScope_t scope, TCppIndex_t imeth)
RPY_EXPORTED TCppIndex_t GetGlobalOperator(TCppType_t scope, const std::string &lc, const std::string &rc, const std::string &op)
RPY_EXPORTED TCppFuncAddr_t GetFunctionAddress(TCppMethod_t method, bool check_enabled=true)
RPY_EXPORTED TCppIndex_t GetNumEnumData(TCppEnum_t)
RPY_EXPORTED TCppIndex_t GetNumBases(TCppType_t type)
RPY_EXPORTED TCppIndex_t GetNumBasesLongestBranch(TCppType_t type)
Retrieve number of base classes in the longest branch of the inheritance tree.
RPY_EXPORTED std::string GetMethodPrototype(TCppScope_t scope, TCppMethod_t, bool show_formalargs)
RPY_EXPORTED std::string GetMethodResultType(TCppMethod_t)
RPY_EXPORTED std::string GetFinalName(TCppType_t type)
RPY_EXPORTED char * CallS(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args, size_t *length)
RPY_EXPORTED std::string GetMethodArgDefault(TCppMethod_t, TCppIndex_t iarg)
RPY_EXPORTED bool IsMethodTemplate(TCppScope_t scope, TCppIndex_t imeth)
RPY_EXPORTED std::string GetDatamemberName(TCppScope_t scope, TCppIndex_t idata)
RPY_EXPORTED bool IsPublicMethod(TCppMethod_t method)
RPY_EXPORTED intptr_t GetDatamemberOffset(TCppScope_t scope, TCppIndex_t idata)
RPY_EXPORTED std::string GetMethodFullName(TCppMethod_t)
RPY_EXPORTED short CallH(TCppMethod_t method, TCppObject_t self, size_t nargs, void *args)
RPY_EXPORTED bool IsProtectedMethod(TCppMethod_t method)
RPY_EXPORTED TCppEnum_t GetEnum(TCppScope_t scope, const std::string &enum_name)
void(* DelFunc_t)(void *)
std::string ResolveTypedef(const char *tname, bool resolveAll=false)
std::string CleanType(const char *typeDesc, int mode=0, const char **tail=nullptr)
Cleanup type description, redundant blanks removed and redundant tail ignored return *tail = pointer ...
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc.
char * DemangleName(const char *mangled_name, int &errorCode)
union CPyCppyy::Parameter::Value fValue