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

#include "sipAPI_grid.h"
        #include <wx/grid.h>
            #include <wx/grid.h>
        #include <wx/grid.h>


PyDoc_STRVAR(doc_wxGridBlocks_iterator__next, "_next(self) -> GridBlocks.iterator");

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

    {
        ::wxGridBlocks::iterator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridBlocks_iterator, &sipCpp))
        {
            ::wxGridBlocks::iterator*sipRes = 0;
                    PyErr_Clear();
                    Py_BEGIN_ALLOW_THREADS
                    sipRes = &sipCpp->operator++();
                    Py_END_ALLOW_THREADS
                    if (PyErr_Occurred()) return 0;

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

    sipNoMethod(sipParseErr, sipName_iterator, sipName__next, doc_wxGridBlocks_iterator__next);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxGridBlocks_iterator__get, "_get(self) -> GridBlockCoords");

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

    {
        const ::wxGridBlocks::iterator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxGridBlocks_iterator, &sipCpp))
        {
            ::wxGridBlockCoords*sipRes = 0;
                    PyErr_Clear();
                    Py_BEGIN_ALLOW_THREADS
                    sipRes =  new ::wxGridBlockCoords(sipCpp->operator*());
                    Py_END_ALLOW_THREADS
                    if (PyErr_Occurred()) return 0;

            return sipConvertFromNewType(sipRes, sipType_wxGridBlockCoords, SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_iterator, sipName__get, doc_wxGridBlocks_iterator__get);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_wxGridBlocks_iterator___ne__(PyObject *, PyObject *);}
static PyObject *slot_wxGridBlocks_iterator___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxGridBlocks::iterator *sipCpp = reinterpret_cast< ::wxGridBlocks::iterator *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxGridBlocks_iterator));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::wxGridBlocks::iterator* it;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxGridBlocks_iterator, &it))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->::wxGridBlocks::iterator::operator!=(*it);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__grid, ne_slot, sipType_wxGridBlocks_iterator, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_wxGridBlocks_iterator___eq__(PyObject *, PyObject *);}
static PyObject *slot_wxGridBlocks_iterator___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxGridBlocks::iterator *sipCpp = reinterpret_cast< ::wxGridBlocks::iterator *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxGridBlocks_iterator));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::wxGridBlocks::iterator* it;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxGridBlocks_iterator, &it))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->::wxGridBlocks::iterator::operator==(*it);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__grid, eq_slot, sipType_wxGridBlocks_iterator, sipSelf, sipArg);
}


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

    delete reinterpret_cast< ::wxGridBlocks::iterator *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void *array_wxGridBlocks_iterator(Py_ssize_t);}
static void *array_wxGridBlocks_iterator(Py_ssize_t sipNrElem)
{
    return new ::wxGridBlocks::iterator[sipNrElem];
}


extern "C" {static void array_delete_wxGridBlocks_iterator(void *);}
static void array_delete_wxGridBlocks_iterator(void *sipCpp)
{
    delete[] reinterpret_cast< ::wxGridBlocks::iterator *>(sipCpp);
}


extern "C" {static void assign_wxGridBlocks_iterator(void *, Py_ssize_t, void *);}
static void assign_wxGridBlocks_iterator(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::wxGridBlocks::iterator *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::wxGridBlocks::iterator *>(sipSrc);
}


extern "C" {static void *copy_wxGridBlocks_iterator(const void *, Py_ssize_t);}
static void *copy_wxGridBlocks_iterator(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new ::wxGridBlocks::iterator(reinterpret_cast<const ::wxGridBlocks::iterator *>(sipSrc)[sipSrcIdx]);
}


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


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

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxGridBlocks::iterator();
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    {
        const ::wxGridBlocks::iterator* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxGridBlocks_iterator, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new ::wxGridBlocks::iterator(*a0);
            Py_END_ALLOW_THREADS

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_wxGridBlocks_iterator[] = {
    {(void *)slot_wxGridBlocks_iterator___ne__, ne_slot},
    {(void *)slot_wxGridBlocks_iterator___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_wxGridBlocks_iterator[] = {
    {sipName__get, meth_wxGridBlocks_iterator__get, METH_VARARGS, doc_wxGridBlocks_iterator__get},
    {sipName__next, meth_wxGridBlocks_iterator__next, METH_VARARGS, doc_wxGridBlocks_iterator__next}
};

PyDoc_STRVAR(doc_wxGridBlocks_iterator, "Read-only forward iterator type.");


sipClassTypeDef sipTypeDef__grid_wxGridBlocks_iterator = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxGridBlocks__iterator,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_iterator,
        {9, 255, 0},
        2, methods_wxGridBlocks_iterator,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxGridBlocks_iterator,
    -1,
    -1,
    SIP_NULLPTR,
    slots_wxGridBlocks_iterator,
    init_type_wxGridBlocks_iterator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxGridBlocks_iterator,
    assign_wxGridBlocks_iterator,
    array_wxGridBlocks_iterator,
    copy_wxGridBlocks_iterator,
    release_wxGridBlocks_iterator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxGridBlocks_iterator,
    sizeof (::wxGridBlocks::iterator),
};
