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
206 if (
resname.find(
"initializer_list") != std::string::npos) {
207 auto pos =
proto.find(
"initializer_list");
208 while (pos != std::string::npos) {
209 proto.replace(pos, 16,
"vector");
210 pos =
proto.find(
"initializer_list", pos + 6);
321 pytmpl->fTemplateArgs =
nullptr;
322 pytmpl->fWeakrefList =
nullptr;
324 pytmpl->fTI = std::make_shared<TemplateInfo>();
371 pytmpl->fTI.~TP_TInfo_t();
395 if (
pytmpl->fTI->fNonTemplated->HasMethods())
397 if (
pytmpl->fTI->fTemplated->HasMethods()) {
406 if (
pytmpl->fTI->fLowPriority->HasMethods()) {
434#define TPPCALL_RETURN \
467 if (
pymeth->HasMethods()) {
517#if PY_VERSION_HEX >= 0x03080000
552#if PY_VERSION_HEX < 0x03080000
563 if (!
pytmpl->fTemplateArgs) {
565 auto&
v =
pytmpl->fTI->fDispatchMap[
""];
566 for (
const auto&
p :
v) {
588 std::vector<Utility::PyError_t>
errors;
592 if (
pytmpl->fTemplateArgs) {
686 pytmpl->fTI->fCppName.c_str());
713#if PY_VERSION_HEX >= 0x03080000
753 if (!
self->fTemplateArgs) {
758 return self->fTemplateArgs;
775 (
char*)
"unused",
nullptr},
777 (
char*)
"the template arguments for this method",
nullptr},
778 {(
char*)
nullptr,
nullptr,
nullptr,
nullptr,
nullptr},
793 std::vector<PyCallable*> dummy;
798#if PY_VERSION_HEX >= 0x03080000
808 const char*
sigarg =
nullptr;
860 proto.push_back(
'<');
862 for (
int i = 0; i <
n; i++) {
870 proto.push_back(
',');
872 proto.push_back(
'>');
905 (
char*)
"select overload for dispatch" },
906 {(
char*)
nullptr,
nullptr, 0,
nullptr }
913 (
char*)
"cppyy.TemplateProxy",
944 (
char*)
"cppyy template proxy (internal)",
969#if PY_VERSION_HEX >= 0x02030000
972#if PY_VERSION_HEX >= 0x02060000
975#if PY_VERSION_HEX >= 0x03040000
978#if PY_VERSION_HEX >= 0x03080000
981#if PY_VERSION_HEX >= 0x030c0000
984#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)