/* * Interface wrapper code. * * Generated by SIP 4.12-snapshot-93040d2c716c * * Copyright: (c) 2010 by Total Control Software * License: wxWindows License */ #include "sipAPI_core.h" #line 84 "sip/gen/object.sip" #include #line 15 "sip_corewxClassInfo.cpp" #line 40 "sip/gen/object.sip" #include #line 19 "sip_corewxClassInfo.cpp" PyDoc_STRVAR(doc_wxClassInfo_CreateObject, "ClassInfo.CreateObject() -> Object"); extern "C" {static PyObject *meth_wxClassInfo_CreateObject(PyObject *, PyObject *);} static PyObject *meth_wxClassInfo_CreateObject(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxClassInfo *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxClassInfo, &sipCpp)) { wxObject *sipRes; try { sipRes = sipCpp->CreateObject(); } catch (...) { sipRaiseUnknownException(); return NULL; } return sipConvertFromType(sipRes,sipType_wxObject,NULL); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_ClassInfo, sipName_CreateObject, doc_wxClassInfo_CreateObject); return NULL; } PyDoc_STRVAR(doc_wxClassInfo_GetBaseClassName1, "ClassInfo.GetBaseClassName1() -> str"); extern "C" {static PyObject *meth_wxClassInfo_GetBaseClassName1(PyObject *, PyObject *);} static PyObject *meth_wxClassInfo_GetBaseClassName1(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxClassInfo *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxClassInfo, &sipCpp)) { const wxChar *sipRes; try { sipRes = sipCpp->GetBaseClassName1(); } catch (...) { sipRaiseUnknownException(); return NULL; } if (sipRes == NULL) { Py_INCREF(Py_None); return Py_None; } return PyUnicode_FromWideChar(sipRes,(SIP_SSIZE_T)wcslen(sipRes)); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_ClassInfo, sipName_GetBaseClassName1, doc_wxClassInfo_GetBaseClassName1); return NULL; } PyDoc_STRVAR(doc_wxClassInfo_GetBaseClassName2, "ClassInfo.GetBaseClassName2() -> str"); extern "C" {static PyObject *meth_wxClassInfo_GetBaseClassName2(PyObject *, PyObject *);} static PyObject *meth_wxClassInfo_GetBaseClassName2(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxClassInfo *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxClassInfo, &sipCpp)) { const wxChar *sipRes; try { sipRes = sipCpp->GetBaseClassName2(); } catch (...) { sipRaiseUnknownException(); return NULL; } if (sipRes == NULL) { Py_INCREF(Py_None); return Py_None; } return PyUnicode_FromWideChar(sipRes,(SIP_SSIZE_T)wcslen(sipRes)); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_ClassInfo, sipName_GetBaseClassName2, doc_wxClassInfo_GetBaseClassName2); return NULL; } PyDoc_STRVAR(doc_wxClassInfo_GetClassName, "ClassInfo.GetClassName() -> str"); extern "C" {static PyObject *meth_wxClassInfo_GetClassName(PyObject *, PyObject *);} static PyObject *meth_wxClassInfo_GetClassName(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxClassInfo *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxClassInfo, &sipCpp)) { const wxChar *sipRes; try { sipRes = sipCpp->GetClassName(); } catch (...) { sipRaiseUnknownException(); return NULL; } if (sipRes == NULL) { Py_INCREF(Py_None); return Py_None; } return PyUnicode_FromWideChar(sipRes,(SIP_SSIZE_T)wcslen(sipRes)); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_ClassInfo, sipName_GetClassName, doc_wxClassInfo_GetClassName); return NULL; } PyDoc_STRVAR(doc_wxClassInfo_GetSize, "ClassInfo.GetSize() -> int"); extern "C" {static PyObject *meth_wxClassInfo_GetSize(PyObject *, PyObject *);} static PyObject *meth_wxClassInfo_GetSize(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxClassInfo *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxClassInfo, &sipCpp)) { int sipRes; try { sipRes = sipCpp->GetSize(); } catch (...) { sipRaiseUnknownException(); return NULL; } return SIPLong_FromLong(sipRes); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_ClassInfo, sipName_GetSize, doc_wxClassInfo_GetSize); return NULL; } PyDoc_STRVAR(doc_wxClassInfo_IsDynamic, "ClassInfo.IsDynamic() -> bool"); extern "C" {static PyObject *meth_wxClassInfo_IsDynamic(PyObject *, PyObject *);} static PyObject *meth_wxClassInfo_IsDynamic(PyObject *sipSelf, PyObject *sipArgs) { PyObject *sipParseErr = NULL; { wxClassInfo *sipCpp; if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxClassInfo, &sipCpp)) { bool sipRes; try { sipRes = sipCpp->IsDynamic(); } catch (...) { sipRaiseUnknownException(); return NULL; } return PyBool_FromLong(sipRes); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_ClassInfo, sipName_IsDynamic, doc_wxClassInfo_IsDynamic); return NULL; } PyDoc_STRVAR(doc_wxClassInfo_IsKindOf, "ClassInfo.IsKindOf(ClassInfo) -> bool"); extern "C" {static PyObject *meth_wxClassInfo_IsKindOf(PyObject *, PyObject *, PyObject *);} static PyObject *meth_wxClassInfo_IsKindOf(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds) { PyObject *sipParseErr = NULL; { const wxClassInfo * info; wxClassInfo *sipCpp; static const char *sipKwdList[] = { sipName_info, }; if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "BJ8", &sipSelf, sipType_wxClassInfo, &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_ClassInfo, sipName_IsKindOf, doc_wxClassInfo_IsKindOf); return NULL; } PyDoc_STRVAR(doc_wxClassInfo_FindClass, "ClassInfo.FindClass(String) -> ClassInfo"); extern "C" {static PyObject *meth_wxClassInfo_FindClass(PyObject *, PyObject *, PyObject *);} static PyObject *meth_wxClassInfo_FindClass(PyObject *, PyObject *sipArgs, PyObject *sipKwds) { PyObject *sipParseErr = NULL; { const wxString * className; int classNameState = 0; static const char *sipKwdList[] = { sipName_className, }; if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, NULL, "J1", sipType_wxString,&className, &classNameState)) { wxClassInfo *sipRes; try { sipRes = wxClassInfo::FindClass(*className); } catch (...) { sipReleaseType(const_cast(className),sipType_wxString,classNameState); sipRaiseUnknownException(); return NULL; } sipReleaseType(const_cast(className),sipType_wxString,classNameState); return sipConvertFromType(sipRes,sipType_wxClassInfo,NULL); } } /* Raise an exception if the arguments couldn't be parsed. */ sipNoMethod(sipParseErr, sipName_ClassInfo, sipName_FindClass, doc_wxClassInfo_FindClass); return NULL; } /* Cast a pointer to a type somewhere in its superclass hierarchy. */ extern "C" {static void *cast_wxClassInfo(void *, const sipTypeDef *);} static void *cast_wxClassInfo(void *ptr, const sipTypeDef *targetType) { if (targetType == sipType_wxClassInfo) return ptr; return NULL; } /* Call the instance's destructor. */ extern "C" {static void release_wxClassInfo(void *, int);} static void release_wxClassInfo(void *sipCppV,int) { delete reinterpret_cast(sipCppV); } extern "C" {static void dealloc_wxClassInfo(sipSimpleWrapper *);} static void dealloc_wxClassInfo(sipSimpleWrapper *sipSelf) { if (sipIsPyOwned(sipSelf)) { release_wxClassInfo(sipGetAddress(sipSelf),0); } } static PyMethodDef methods_wxClassInfo[] = { {SIP_MLNAME_CAST(sipName_CreateObject), meth_wxClassInfo_CreateObject, METH_VARARGS, SIP_MLDOC_CAST(doc_wxClassInfo_CreateObject)}, {SIP_MLNAME_CAST(sipName_FindClass), (PyCFunction)meth_wxClassInfo_FindClass, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxClassInfo_FindClass)}, {SIP_MLNAME_CAST(sipName_GetBaseClassName1), meth_wxClassInfo_GetBaseClassName1, METH_VARARGS, SIP_MLDOC_CAST(doc_wxClassInfo_GetBaseClassName1)}, {SIP_MLNAME_CAST(sipName_GetBaseClassName2), meth_wxClassInfo_GetBaseClassName2, METH_VARARGS, SIP_MLDOC_CAST(doc_wxClassInfo_GetBaseClassName2)}, {SIP_MLNAME_CAST(sipName_GetClassName), meth_wxClassInfo_GetClassName, METH_VARARGS, SIP_MLDOC_CAST(doc_wxClassInfo_GetClassName)}, {SIP_MLNAME_CAST(sipName_GetSize), meth_wxClassInfo_GetSize, METH_VARARGS, SIP_MLDOC_CAST(doc_wxClassInfo_GetSize)}, {SIP_MLNAME_CAST(sipName_IsDynamic), meth_wxClassInfo_IsDynamic, METH_VARARGS, SIP_MLDOC_CAST(doc_wxClassInfo_IsDynamic)}, {SIP_MLNAME_CAST(sipName_IsKindOf), (PyCFunction)meth_wxClassInfo_IsKindOf, METH_VARARGS|METH_KEYWORDS, SIP_MLDOC_CAST(doc_wxClassInfo_IsKindOf)} }; sipClassTypeDef sipTypeDef__core_wxClassInfo = { { -1, 0, 0, SIP_TYPE_ABSTRACT|SIP_TYPE_CLASS, sipNameNr_wxClassInfo, {0} }, { sipNameNr_ClassInfo, {0, 0, 1}, 8, methods_wxClassInfo, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }, 0, -1, -1, 0, 0, 0, 0, 0, #if PY_MAJOR_VERSION >= 3 0, 0, #else 0, 0, 0, 0, #endif dealloc_wxClassInfo, 0, 0, 0, release_wxClassInfo, cast_wxClassInfo, 0, 0, 0 };