/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.16
 *
 *     Copyright: (c) 2018 by Total Control Software
 *     License:   wxWindows License
 */

#include "sipAPI_propgrid.h"

        #include <wx/propgrid/propgridpagestate.h>

        #include <wx/propgrid/property.h>


PyDoc_STRVAR(doc_wxPGVIterator_UnRef, "UnRef()");

extern "C" {static PyObject *meth_wxPGVIterator_UnRef(PyObject *, PyObject *);}
static PyObject *meth_wxPGVIterator_UnRef(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::wxPGVIterator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxPGVIterator, &sipCpp))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->UnRef();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_PGVIterator, sipName_UnRef, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGVIterator_Next, "Next()");

extern "C" {static PyObject *meth_wxPGVIterator_Next(PyObject *, PyObject *);}
static PyObject *meth_wxPGVIterator_Next(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::wxPGVIterator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxPGVIterator, &sipCpp))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->Next();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_PGVIterator, sipName_Next, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGVIterator_AtEnd, "AtEnd() -> bool");

extern "C" {static PyObject *meth_wxPGVIterator_AtEnd(PyObject *, PyObject *);}
static PyObject *meth_wxPGVIterator_AtEnd(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::wxPGVIterator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxPGVIterator, &sipCpp))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->AtEnd();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_PGVIterator, sipName_AtEnd, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxPGVIterator_GetProperty, "GetProperty() -> PGProperty");

extern "C" {static PyObject *meth_wxPGVIterator_GetProperty(PyObject *, PyObject *);}
static PyObject *meth_wxPGVIterator_GetProperty(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::wxPGVIterator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxPGVIterator, &sipCpp))
        {
             ::wxPGProperty*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetProperty();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return sipConvertFromType(sipRes,sipType_wxPGProperty,SIP_NULLPTR);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_PGVIterator, sipName_GetProperty, SIP_NULLPTR);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_wxPGVIterator(void *, int);}
static void release_wxPGVIterator(void *sipCppV, int)
{
    Py_BEGIN_ALLOW_THREADS

    delete reinterpret_cast< ::wxPGVIterator *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void assign_wxPGVIterator(void *, SIP_SSIZE_T, void *);}
static void assign_wxPGVIterator(void *sipDst, SIP_SSIZE_T sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::wxPGVIterator *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxPGVIterator *>(sipSrc);
}


extern "C" {static void *array_wxPGVIterator(SIP_SSIZE_T);}
static void *array_wxPGVIterator(SIP_SSIZE_T sipNrElem)
{
    return new  ::wxPGVIterator[sipNrElem];
}


extern "C" {static void *copy_wxPGVIterator(const void *, SIP_SSIZE_T);}
static void *copy_wxPGVIterator(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new  ::wxPGVIterator(reinterpret_cast<const  ::wxPGVIterator *>(sipSrc)[sipSrcIdx]);
}


extern "C" {static void dealloc_wxPGVIterator(sipSimpleWrapper *);}
static void dealloc_wxPGVIterator(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_wxPGVIterator(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_wxPGVIterator(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_wxPGVIterator(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::wxPGVIterator *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxPGVIterator();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
            {
                delete sipCpp;
                return SIP_NULLPTR;
            }

            return sipCpp;
        }
    }

    {
        const  ::wxPGVIterator* it;

        static const char *sipKwdList[] = {
            sipName_it,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9", sipType_wxPGVIterator, &it))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new  ::wxPGVIterator(*it);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
            {
                delete sipCpp;
                return SIP_NULLPTR;
            }

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxPGVIterator[] = {
    {SIP_MLNAME_CAST(sipName_AtEnd), meth_wxPGVIterator_AtEnd, METH_VARARGS, SIP_MLDOC_CAST(doc_wxPGVIterator_AtEnd)},
    {SIP_MLNAME_CAST(sipName_GetProperty), meth_wxPGVIterator_GetProperty, METH_VARARGS, SIP_MLDOC_CAST(doc_wxPGVIterator_GetProperty)},
    {SIP_MLNAME_CAST(sipName_Next), meth_wxPGVIterator_Next, METH_VARARGS, SIP_MLDOC_CAST(doc_wxPGVIterator_Next)},
    {SIP_MLNAME_CAST(sipName_UnRef), meth_wxPGVIterator_UnRef, METH_VARARGS, SIP_MLDOC_CAST(doc_wxPGVIterator_UnRef)}
};

sipVariableDef variables_wxPGVIterator[] = {
    {PropertyVariable, sipName_Property, &methods_wxPGVIterator[1], SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxPGVIterator, "PGVIterator()\n"
"PGVIterator(it)");


sipClassTypeDef sipTypeDef__propgrid_wxPGVIterator = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxPGVIterator,
        {SIP_NULLPTR},
        SIP_NULLPTR
    },
    {
        sipNameNr_PGVIterator,
        {0, 0, 1},
        4, methods_wxPGVIterator,
        0, SIP_NULLPTR,
        1, variables_wxPGVIterator,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxPGVIterator,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxPGVIterator,
    SIP_NULLPTR,
    SIP_NULLPTR,
#if PY_MAJOR_VERSION >= 3
    SIP_NULLPTR,
    SIP_NULLPTR,
#else
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
#endif
    dealloc_wxPGVIterator,
    assign_wxPGVIterator,
    array_wxPGVIterator,
    copy_wxPGVIterator,
    release_wxPGVIterator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR
};
