mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 19:40:12 +01:00
generated sip and c++ files
git-svn-id: https://svn.wxwidgets.org/svn/wx/sandbox/trunk/Phoenix@66113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
285
sip/cpp/sip_corewxRefCounter.cpp
Normal file
285
sip/cpp/sip_corewxRefCounter.cpp
Normal file
@@ -0,0 +1,285 @@
|
||||
/*
|
||||
* 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 17 "sip/gen/object.sip"
|
||||
#include <wx/object.h>
|
||||
#line 15 "sip_corewxRefCounter.cpp"
|
||||
|
||||
|
||||
|
||||
class sipwxRefCounter : public wxRefCounter
|
||||
{
|
||||
public:
|
||||
sipwxRefCounter();
|
||||
sipwxRefCounter(const wxRefCounter&);
|
||||
~sipwxRefCounter();
|
||||
|
||||
public:
|
||||
sipSimpleWrapper *sipPySelf;
|
||||
|
||||
private:
|
||||
sipwxRefCounter(const sipwxRefCounter &);
|
||||
sipwxRefCounter &operator = (const sipwxRefCounter &);
|
||||
};
|
||||
|
||||
sipwxRefCounter::sipwxRefCounter(): wxRefCounter(), sipPySelf(0)
|
||||
{
|
||||
}
|
||||
|
||||
sipwxRefCounter::sipwxRefCounter(const wxRefCounter& a0): wxRefCounter(a0), sipPySelf(0)
|
||||
{
|
||||
}
|
||||
|
||||
sipwxRefCounter::~sipwxRefCounter()
|
||||
{
|
||||
sipCommonDtor(sipPySelf);
|
||||
}
|
||||
|
||||
|
||||
PyDoc_STRVAR(doc_wxRefCounter_DecRef, "RefCounter.DecRef()");
|
||||
|
||||
extern "C" {static PyObject *meth_wxRefCounter_DecRef(PyObject *, PyObject *);}
|
||||
static PyObject *meth_wxRefCounter_DecRef(PyObject *sipSelf, PyObject *sipArgs)
|
||||
{
|
||||
PyObject *sipParseErr = NULL;
|
||||
|
||||
{
|
||||
wxRefCounter *sipCpp;
|
||||
|
||||
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRefCounter, &sipCpp))
|
||||
{
|
||||
try
|
||||
{
|
||||
sipCpp->DecRef();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
sipRaiseUnknownException();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
}
|
||||
|
||||
/* Raise an exception if the arguments couldn't be parsed. */
|
||||
sipNoMethod(sipParseErr, sipName_RefCounter, sipName_DecRef, doc_wxRefCounter_DecRef);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
PyDoc_STRVAR(doc_wxRefCounter_GetRefCount, "RefCounter.GetRefCount() -> int");
|
||||
|
||||
extern "C" {static PyObject *meth_wxRefCounter_GetRefCount(PyObject *, PyObject *);}
|
||||
static PyObject *meth_wxRefCounter_GetRefCount(PyObject *sipSelf, PyObject *sipArgs)
|
||||
{
|
||||
PyObject *sipParseErr = NULL;
|
||||
|
||||
{
|
||||
wxRefCounter *sipCpp;
|
||||
|
||||
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRefCounter, &sipCpp))
|
||||
{
|
||||
int sipRes;
|
||||
|
||||
try
|
||||
{
|
||||
sipRes = sipCpp->GetRefCount();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
sipRaiseUnknownException();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return SIPLong_FromLong(sipRes);
|
||||
}
|
||||
}
|
||||
|
||||
/* Raise an exception if the arguments couldn't be parsed. */
|
||||
sipNoMethod(sipParseErr, sipName_RefCounter, sipName_GetRefCount, doc_wxRefCounter_GetRefCount);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
PyDoc_STRVAR(doc_wxRefCounter_IncRef, "RefCounter.IncRef()");
|
||||
|
||||
extern "C" {static PyObject *meth_wxRefCounter_IncRef(PyObject *, PyObject *);}
|
||||
static PyObject *meth_wxRefCounter_IncRef(PyObject *sipSelf, PyObject *sipArgs)
|
||||
{
|
||||
PyObject *sipParseErr = NULL;
|
||||
|
||||
{
|
||||
wxRefCounter *sipCpp;
|
||||
|
||||
if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxRefCounter, &sipCpp))
|
||||
{
|
||||
try
|
||||
{
|
||||
sipCpp->IncRef();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
sipRaiseUnknownException();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Py_INCREF(Py_None);
|
||||
return Py_None;
|
||||
}
|
||||
}
|
||||
|
||||
/* Raise an exception if the arguments couldn't be parsed. */
|
||||
sipNoMethod(sipParseErr, sipName_RefCounter, sipName_IncRef, doc_wxRefCounter_IncRef);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* Cast a pointer to a type somewhere in its superclass hierarchy. */
|
||||
extern "C" {static void *cast_wxRefCounter(void *, const sipTypeDef *);}
|
||||
static void *cast_wxRefCounter(void *ptr, const sipTypeDef *targetType)
|
||||
{
|
||||
if (targetType == sipType_wxRefCounter)
|
||||
return ptr;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* Call the instance's destructor. */
|
||||
extern "C" {static void release_wxRefCounter(void *, int);}
|
||||
static void release_wxRefCounter(void *sipCppV,int sipState)
|
||||
{
|
||||
if (sipState & SIP_DERIVED_CLASS)
|
||||
delete reinterpret_cast<sipwxRefCounter *>(sipCppV);
|
||||
}
|
||||
|
||||
|
||||
extern "C" {static void dealloc_wxRefCounter(sipSimpleWrapper *);}
|
||||
static void dealloc_wxRefCounter(sipSimpleWrapper *sipSelf)
|
||||
{
|
||||
if (sipIsDerived(sipSelf))
|
||||
reinterpret_cast<sipwxRefCounter *>(sipGetAddress(sipSelf))->sipPySelf = NULL;
|
||||
|
||||
if (sipIsPyOwned(sipSelf))
|
||||
{
|
||||
release_wxRefCounter(sipGetAddress(sipSelf),sipSelf->flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
extern "C" {static void *init_wxRefCounter(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
|
||||
static void *init_wxRefCounter(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
|
||||
{
|
||||
sipwxRefCounter *sipCpp = 0;
|
||||
|
||||
{
|
||||
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
|
||||
{
|
||||
try
|
||||
{
|
||||
sipCpp = new sipwxRefCounter();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
sipRaiseUnknownException();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sipCpp->sipPySelf = sipSelf;
|
||||
|
||||
return sipCpp;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
const wxRefCounter * a0;
|
||||
|
||||
if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxRefCounter, &a0))
|
||||
{
|
||||
try
|
||||
{
|
||||
sipCpp = new sipwxRefCounter(*a0);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
sipRaiseUnknownException();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sipCpp->sipPySelf = sipSelf;
|
||||
|
||||
return sipCpp;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyMethodDef methods_wxRefCounter[] = {
|
||||
{SIP_MLNAME_CAST(sipName_DecRef), meth_wxRefCounter_DecRef, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRefCounter_DecRef)},
|
||||
{SIP_MLNAME_CAST(sipName_GetRefCount), meth_wxRefCounter_GetRefCount, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRefCounter_GetRefCount)},
|
||||
{SIP_MLNAME_CAST(sipName_IncRef), meth_wxRefCounter_IncRef, METH_VARARGS, SIP_MLDOC_CAST(doc_wxRefCounter_IncRef)}
|
||||
};
|
||||
|
||||
PyDoc_STRVAR(doc_wxRefCounter, "\1RefCounter()\n"
|
||||
"RefCounter(RefCounter)");
|
||||
|
||||
|
||||
sipClassTypeDef sipTypeDef__core_wxRefCounter = {
|
||||
{
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
SIP_TYPE_CLASS,
|
||||
sipNameNr_wxRefCounter,
|
||||
{0}
|
||||
},
|
||||
{
|
||||
sipNameNr_RefCounter,
|
||||
{0, 0, 1},
|
||||
3, methods_wxRefCounter,
|
||||
0, 0,
|
||||
0, 0,
|
||||
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
},
|
||||
doc_wxRefCounter,
|
||||
-1,
|
||||
-1,
|
||||
0,
|
||||
0,
|
||||
init_wxRefCounter,
|
||||
0,
|
||||
0,
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
0,
|
||||
0,
|
||||
#else
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
#endif
|
||||
dealloc_wxRefCounter,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
release_wxRefCounter,
|
||||
cast_wxRefCounter,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
};
|
||||
Reference in New Issue
Block a user