21 fTemplated(nullptr), fLowPriority(nullptr), fDoc(nullptr)
37 for (
const auto&
c :
p.second) {
48 for (
auto pc :
mp->fMethodInfo->fMethods) {
62 cppol->AdoptMethod(pc);
68 fTI->fTemplated->AdoptMethod(pc);
76 std::string
proto =
"";
78#if PY_VERSION_HEX >= 0x03080000
160#if PY_VERSION_HEX >= 0x03080000
199 if (
resname.find(
"initializer_list") != std::string::npos) {
200 auto pos =
proto.find(
"initializer_list");
201 while (pos != std::string::npos) {
202 proto.replace(pos, 16,
"vector");
203 pos =
proto.find(
"initializer_list", pos + 6);
313 pytmpl->fTemplateArgs =
nullptr;
314 pytmpl->fWeakrefList =
nullptr;
316 pytmpl->fTI = std::make_shared<TemplateInfo>();
363 pytmpl->fTI.~TP_TInfo_t();
387 if (
pytmpl->fTI->fNonTemplated->HasMethods())
389 if (
pytmpl->fTI->fTemplated->HasMethods()) {
398 if (
pytmpl->fTI->fLowPriority->HasMethods()) {
426#define TPPCALL_RETURN \
459 if (
pymeth->HasMethods()) {
509#if PY_VERSION_HEX >= 0x03080000
544#if PY_VERSION_HEX < 0x03080000
555 if (!
pytmpl->fTemplateArgs) {
557 auto&
v =
pytmpl->fTI->fDispatchMap[
""];
558 for (
const auto&
p :
v) {
580 std::vector<Utility::PyError_t>
errors;
584 if (
pytmpl->fTemplateArgs) {
678 pytmpl->fTI->fCppName.c_str());
705#if PY_VERSION_HEX >= 0x03080000
740 if (!
self->fTemplateArgs) {
745 return self->fTemplateArgs;
762 (
char*)
"unused",
nullptr},
764 (
char*)
"the template arguments for this method",
nullptr},
765 {(
char*)
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
780 std::vector<PyCallable*> dummy;
785#if PY_VERSION_HEX >= 0x03080000
795 const char*
sigarg =
nullptr;
842 proto.push_back(
'<');
844 for (
int i = 0; i <
n; i++) {
852 proto.push_back(
',');
854 proto.push_back(
'>');
887 (
char*)
"select overload for dispatch" },
888 {(
char*)
nullptr,
nullptr, 0,
nullptr }
895 (
char*)
"cppyy.TemplateProxy",
926 (
char*)
"cppyy template proxy (internal)",
951#if PY_VERSION_HEX >= 0x02030000
954#if PY_VERSION_HEX >= 0x02060000
957#if PY_VERSION_HEX >= 0x03040000
960#if PY_VERSION_HEX >= 0x03080000
963#if PY_VERSION_HEX >= 0x030c0000
966#if PY_VERSION_HEX >= 0x030d0000
#define CPyCppyy_PyText_InternFromString
#define CPyCppyy_PyText_Append
#define CPyCppyy_PyText_AsString
static Py_ssize_t CPyCppyy_PyArgs_GET_SIZE(CPyCppyy_PyArgs_t args, size_t)
PyObject * CPyCppyy_PyArgs_t
#define CPyCppyy_PyText_AppendAndDel
void CPyCppyy_PyBuffer_Release(PyObject *, Py_buffer *view)
PyObject * CPyCppyy_PyObject_Call(PyObject *cb, PyObject *args, size_t, PyObject *kwds)
#define CPyCppyy_PyText_FromFormat
PyObject * CPyCppyy_tp_call(PyObject *cb, PyObject *args, size_t, PyObject *kwds)
#define CPyCppyy_PyText_FromString
static PyObject * CPyCppyy_PyArgs_GET_ITEM(CPyCppyy_PyArgs_t args, Py_ssize_t i)
#define CPyCppyy_PyText_Check
#define PyVarObject_HEAD_INIT(type, size)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 result
MethodInfo_t * fMethodInfo
virtual bool IsGreedy()=0
CPPOverload * fLowPriority
TP_DispatchMap_t fDispatchMap
CPPOverload * fNonTemplated
PyObject * Instantiate(const std::string &fname, CPyCppyy_PyArgs_t tmplArgs, size_t nargsf, Utility::ArgPreference, int *pcnt=nullptr)
void Set(const std::string &cppname, const std::string &pyname, PyObject *pyclass)
PyObject_HEAD PyObject * fSelf
void AdoptTemplate(PyCallable *pc)
void AdoptMethod(PyCallable *pc)
void MergeOverload(CPPOverload *mp)
PyObject * CT2CppName(PyObject *pytc, const char *cpd, bool allow_voidp)
void SetDetailedException(std::vector< PyError_t > &&errors, PyObject *topmsg, PyObject *defexc)
std::string ConstructTemplateArgs(PyObject *pyname, PyObject *tpArgs, PyObject *args=nullptr, ArgPreference=kNone, int argoff=0, int *pcnt=nullptr)
size_t FetchError(std::vector< PyError_t > &, bool is_cpp=false)
CPPOverload * CPPOverload_New(const std::string &name, std::vector< PyCallable * > &methods)
static PyObject * tpp_richcompare(TemplateProxy *self, PyObject *other, int op)
bool AdjustSelf(PyCallArgs &cargs)
static PyObject * tpp_doc(TemplateProxy *pytmpl, void *)
static PyMappingMethods tpp_as_mapping
bool CPPOverload_Check(T *object)
static int tpp_clear(TemplateProxy *pytmpl)
static PyObject * tpp_call(TemplateProxy *pytmpl, PyObject *args, PyObject *kwds)
static PyObject * tpp_getuseffi(CPPOverload *, void *)
bool TemplateProxy_CheckExact(T *object)
static void tpp_dealloc(TemplateProxy *pytmpl)
uint64_t HashSignature(CPyCppyy_PyArgs_t args, size_t nargsf)
static int tpp_traverse(TemplateProxy *pytmpl, visitproc visit, void *arg)
static PyObject * tpp_overload(TemplateProxy *pytmpl, PyObject *args)
static int tpp_setuseffi(CPPOverload *, PyObject *, void *)
static PyGetSetDef tpp_getset[]
PyTypeObject CPPOverload_Type
PyTypeObject TemplateProxy_Type
static PyObject * tpp_subscript(TemplateProxy *pytmpl, PyObject *args)
static PyObject * CallMethodImp(TemplateProxy *pytmpl, PyObject *&pymeth, CPyCppyy_PyArgs_t args, size_t nargsf, PyObject *kwds, bool impOK, uint64_t sighash)
static void UpdateDispatchMap(TemplateProxy *pytmpl, bool use_targs, uint64_t sighash, CPPOverload *pymeth)
static int tpp_settemplateargs(TemplateProxy *, PyObject *, void *)
static TemplateProxy * tpp_new(PyTypeObject *, PyObject *, PyObject *)
static PyMethodDef tpp_methods[]
static int tpp_doc_set(TemplateProxy *pytmpl, PyObject *val, void *)
static Py_hash_t tpp_hash(TemplateProxy *self)
static PyObject * SelectAndForward(TemplateProxy *pytmpl, CPPOverload *pymeth, CPyCppyy_PyArgs_t args, size_t nargsf, PyObject *kwds, bool implicitOkay, bool use_targs, uint64_t sighash, std::vector< Utility::PyError_t > &errors)
static std::string targs2str(TemplateProxy *pytmpl)
static TemplateProxy * tpp_descr_get(TemplateProxy *pytmpl, PyObject *pyobj, PyObject *)
static PyObject * tpp_gettemplateargs(TemplateProxy *self, void *)
bool TemplateProxy_Check(T *object)
std::shared_ptr< TemplateInfo > TP_TInfo_t
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 bool IsNamespace(TCppScope_t scope)
RPY_EXPORTED bool IsStaticMethod(TCppMethod_t method)
RPY_EXPORTED bool IsStaticTemplate(TCppScope_t scope, const std::string &name)
RPY_EXPORTED std::string GetMethodFullName(TCppMethod_t)