/* * Interface wrapper code. * * Generated by SIP 4.12-snapshot-eac351f5cca7 on Wed Nov 10 15:32:07 2010 * * Copyright: (c) 2010 by Total Control Software * Licence: wxWindows license */ #include "sipAPI_core.h" #line 40 "sip/gen/object.sip" #include #line 15 "sip_corewxObject.cpp" #line 17 "sip/gen/object.sip" #include #line 19 "sip_corewxObject.cpp" #line 84 "sip/gen/object.sip" #include #line 22 "sip_corewxObject.cpp" class sipwxObject : public wxObject { public: sipwxObject(); sipwxObject(const wxObject&); virtual ~sipwxObject(); /* * There is a protected method for every virtual method visible from * this class. */ protected: wxClassInfo * GetClassInfo(); public: sipSimpleWrapper *sipPySelf; private: sipwxObject(const sipwxObject &); sipwxObject &operator = (const sipwxObject &); char sipPyMethods[1]; }; sipwxObject::sipwxObject(): wxObject(), sipPySelf(0) { memset(sipPyMethods, 0, sizeof (sipPyMethods)); } sipwxObject::sipwxObject(const wxObject& other): wxObject(other), sipPySelf(0) { memset(sipPyMethods, 0, sizeof (sipPyMethods)); } sipwxObject::~sipwxObject() { sipCommonDtor(sipPySelf); } wxClassInfo * sipwxObject::GetClassInfo() { sip_gilstate_t sipGILState; PyObject *sipMeth; sipMeth = sipIsPyMethod(&sipGILState,&sipPyMethods[0],sipPySelf,NULL,sipName_GetClassInfo); if (!sipMeth) return wxObject::GetClassInfo(); extern wxClassInfo * sipVH__core_0(sip_gilstate_t,PyObject *); return sipVH__core_0(sipGILState,sipMeth); } PyDoc_STRVAR(doc_wxObject_GetClassInfo, "Object.GetClassInfo() -> ClassInfo"); extern "C" {static PyObject *meth_wxObject_GetClassInfo(PyObject *, PyObject *);} static PyObject *meth_wxObject_GetClassInfo(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; bool sipSelfWasArg = (!sipSelf || sipIsDerived((sipSimpleWrapper *)sipSelf)); { wxObject *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxObject, &sipCpp)) { wxClassInfo *sipRes; try { sipRes = (sipSelfWasArg ? sipCpp->wxObject::GetClassInfo() : sipCpp->GetClassInfo()); } catch (...) { sipRaiseUnknownException(); return NULL; } return sipConvertFromType(sipRes,sipType_wxClassInfo,NULL); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_Object, sipName_GetClassInfo, doc_wxObject_GetClassInfo); return NULL; } PyDoc_STRVAR(doc_wxObject_GetRefData, "Object.GetRefData() -> RefCounter"); extern "C" {static PyObject *meth_wxObject_GetRefData(PyObject *, PyObject *);} static PyObject *meth_wxObject_GetRefData(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxObject *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxObject, &sipCpp)) { wxObjectRefData *sipRes; try { sipRes = sipCpp->GetRefData(); } catch (...) { sipRaiseUnknownException(); return NULL; } return sipConvertFromType(sipRes,sipType_wxRefCounter,NULL); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_Object, sipName_GetRefData, doc_wxObject_GetRefData); return NULL; } PyDoc_STRVAR(doc_wxObject_IsKindOf, "Object.IsKindOf(ClassInfo) -> bool"); extern "C" {static PyObject *meth_wxObject_IsKindOf(PyObject *, PyObject *, PyObject *);} static PyObject *meth_wxObject_IsKindOf(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds) { PyObject *sipParseErr = NULL; { const wxClassInfo * info; wxObject *sipCpp; static const char *sipKwdList[] = { sipName_info, }; if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ8", &sipSelf, sipType_wxObject, &sipCpp, sipType_wxClassInfo, &info)) { bool sipRes; try { sipRes = sipCpp->IsKindOf(info); } catch (...) { sipRaiseUnknownException(); return NULL; } return PyBool_FromLong(sipRes); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_Object, sipName_IsKindOf, doc_wxObject_IsKindOf); return NULL; } PyDoc_STRVAR(doc_wxObject_IsSameAs, "Object.IsSameAs(Object) -> bool"); extern "C" {static PyObject *meth_wxObject_IsSameAs(PyObject *, PyObject *, PyObject *);} static PyObject *meth_wxObject_IsSameAs(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds) { PyObject *sipParseErr = NULL; { const wxObject * obj; wxObject *sipCpp; static const char *sipKwdList[] = { sipName_obj, }; if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ9", &sipSelf, sipType_wxObject, &sipCpp, sipType_wxObject, &obj)) { bool sipRes; try { sipRes = sipCpp->IsSameAs(*obj); } catch (...) { sipRaiseUnknownException(); return NULL; } return PyBool_FromLong(sipRes); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_Object, sipName_IsSameAs, doc_wxObject_IsSameAs); return NULL; } PyDoc_STRVAR(doc_wxObject_Ref, "Object.Ref(Object)"); extern "C" {static PyObject *meth_wxObject_Ref(PyObject *, PyObject *, PyObject *);} static PyObject *meth_wxObject_Ref(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds) { PyObject *sipParseErr = NULL; { const wxObject * clone; wxObject *sipCpp; static const char *sipKwdList[] = { sipName_clone, }; if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ9", &sipSelf, sipType_wxObject, &sipCpp, sipType_wxObject, &clone)) { try { sipCpp->Ref(*clone); } catch (...) { sipRaiseUnknownException(); return NULL; } Py_INCREF(Py_None); return Py_None; } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_Object, sipName_Ref, doc_wxObject_Ref); return NULL; } PyDoc_STRVAR(doc_wxObject_SetRefData, "Object.SetRefData(RefCounter)"); extern "C" {static PyObject *meth_wxObject_SetRefData(PyObject *, PyObject *, PyObject *);} static PyObject *meth_wxObject_SetRefData(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds) { PyObject *sipParseErr = NULL; { wxObjectRefData * data; wxObject *sipCpp; static const char *sipKwdList[] = { sipName_data, }; if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ8", &sipSelf, sipType_wxObject, &sipCpp, sipType_wxRefCounter, &data)) { try { sipCpp->SetRefData(data); } catch (...) { sipRaiseUnknownException(); return NULL; } Py_INCREF(Py_None); return Py_None; } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_Object, sipName_SetRefData, doc_wxObject_SetRefData); return NULL; } PyDoc_STRVAR(doc_wxObject_UnRef, "Object.UnRef()"); extern "C" {static PyObject *meth_wxObject_UnRef(PyObject *, PyObject *);} static PyObject *meth_wxObject_UnRef(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxObject *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxObject, &sipCpp)) { try { sipCpp->UnRef(); } catch (...) { sipRaiseUnknownException(); return NULL; } Py_INCREF(Py_None); return Py_None; } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_Object, sipName_UnRef, doc_wxObject_UnRef); return NULL; } PyDoc_STRVAR(doc_wxObject_UnShare, "Object.UnShare()"); extern "C" {static PyObject *meth_wxObject_UnShare(PyObject *, PyObject *);} static PyObject *meth_wxObject_UnShare(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxObject *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxObject, &sipCpp)) { try { sipCpp->UnShare(); } catch (...) { sipRaiseUnknownException(); return NULL; } Py_INCREF(Py_None); return Py_None; } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_Object, sipName_UnShare, doc_wxObject_UnShare); return NULL; } /* Cast a pointer to a type somewhere in its superclass hierarchy. */ extern "C" {static void *cast_wxObject(void *, const sipTypeDef *);} static void *cast_wxObject(void *ptr, const sipTypeDef *targetType) { if (targetType == sipType_wxObject) return ptr; return NULL; } /* Call the instance's destructor. */ extern "C" {static void release_wxObject(void *, int);} static void release_wxObject(void *sipCppV,int sipState) { if (sipState & SIP_DERIVED_CLASS) delete reinterpret_cast(sipCppV); else delete reinterpret_cast(sipCppV); } extern "C" {static void assign_wxObject(void *, SIP_SSIZE_T, const void *);} static void assign_wxObject(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc) { reinterpret_cast(sipDst)[sipDstIdx] = *reinterpret_cast(sipSrc); } extern "C" {static void *array_wxObject(SIP_SSIZE_T);} static void *array_wxObject(SIP_SSIZE_T sipNrElem) { return new wxObject[sipNrElem]; } extern "C" {static void *copy_wxObject(const void *, SIP_SSIZE_T);} static void *copy_wxObject(const void *sipSrc, SIP_SSIZE_T sipSrcIdx) { return new wxObject(reinterpret_cast(sipSrc)[sipSrcIdx]); } extern "C" {static void dealloc_wxObject(sipSimpleWrapper *);} static void dealloc_wxObject(sipSimpleWrapper *sipSelf) { if (sipIsDerived(sipSelf)) reinterpret_cast(sipGetAddress(sipSelf))->sipPySelf = NULL; if (sipIsPyOwned(sipSelf)) { release_wxObject(sipGetAddress(sipSelf),sipSelf->flags); } } extern "C" {static void *init_wxObject(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);} static void *init_wxObject(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr) { sipwxObject *sipCpp = 0; { if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "")) { try { sipCpp = new sipwxObject(); } catch (...) { sipRaiseUnknownException(); return NULL; } sipCpp->sipPySelf = sipSelf; return sipCpp; } } { const wxObject * other; static const char *sipKwdList[] = { sipName_other, }; if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9", sipType_wxObject, &other)) { try { sipCpp = new sipwxObject(*other); } catch (...) { sipRaiseUnknownException(); return NULL; } sipCpp->sipPySelf = sipSelf; return sipCpp; } } return NULL; } static PyMethodDef methods_wxObject[] = { {SIP_MLNAME_CAST(sipName_GetClassInfo), meth_wxObject_GetClassInfo, METH_VARARGS, SIP_MLDOC_CAST(doc_wxObject_GetClassInfo)}, {SIP_MLNAME_CAST(sipName_GetRefData), meth_wxObject_GetRefData, METH_VARARGS, SIP_MLDOC_CAST(doc_wxObject_GetRefData)}, {SIP_MLNAME_CAST(sipName_IsKindOf), (PyCFunction)meth_wxObject_IsKindOf, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxObject_IsKindOf)}, {SIP_MLNAME_CAST(sipName_IsSameAs), (PyCFunction)meth_wxObject_IsSameAs, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxObject_IsSameAs)}, {SIP_MLNAME_CAST(sipName_Ref), (PyCFunction)meth_wxObject_Ref, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxObject_Ref)}, {SIP_MLNAME_CAST(sipName_SetRefData), (PyCFunction)meth_wxObject_SetRefData, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxObject_SetRefData)}, {SIP_MLNAME_CAST(sipName_UnRef), meth_wxObject_UnRef, METH_VARARGS, SIP_MLDOC_CAST(doc_wxObject_UnRef)}, {SIP_MLNAME_CAST(sipName_UnShare), meth_wxObject_UnShare, METH_VARARGS, SIP_MLDOC_CAST(doc_wxObject_UnShare)} }; PyDoc_STRVAR(doc_wxObject, "\1Object()\n" "Object(Object)"); sipClassTypeDef sipTypeDef__core_wxObject = { { -1, 0, 0, SIP_TYPE_CLASS, sipNameNr_wxObject, {0} }, { sipNameNr_Object, {0, 0, 1}, 8, methods_wxObject, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }, doc_wxObject, -1, -1, 0, 0, init_wxObject, 0, 0, #if PY_MAJOR_VERSION >= 3 0, 0, #else 0, 0, 0, 0, #endif dealloc_wxObject, assign_wxObject, array_wxObject, copy_wxObject, release_wxObject, cast_wxObject, 0, 0, 0 };