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

#include "sipAPI_xml.h"
        #include <wx/xml/xml.h>



class sipwxXmlAttribute : public ::wxXmlAttribute
{
public:
    sipwxXmlAttribute();
    sipwxXmlAttribute(const ::wxString&, const ::wxString&, ::wxXmlAttribute*);
    sipwxXmlAttribute(const ::wxXmlAttribute&);
    ~sipwxXmlAttribute();

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipwxXmlAttribute(const sipwxXmlAttribute &);
    sipwxXmlAttribute &operator = (const sipwxXmlAttribute &);
};

sipwxXmlAttribute::sipwxXmlAttribute(): ::wxXmlAttribute(), sipPySelf(SIP_NULLPTR)
{
}

sipwxXmlAttribute::sipwxXmlAttribute(const ::wxString& name, const ::wxString& value, ::wxXmlAttribute*next): ::wxXmlAttribute(name, value, next), sipPySelf(SIP_NULLPTR)
{
}

sipwxXmlAttribute::sipwxXmlAttribute(const ::wxXmlAttribute& a0): ::wxXmlAttribute(a0), sipPySelf(SIP_NULLPTR)
{
}

sipwxXmlAttribute::~sipwxXmlAttribute()
{
    sipInstanceDestroyedEx(&sipPySelf);
}


PyDoc_STRVAR(doc_wxXmlAttribute_GetName, "GetName() -> String\n"
"\n"
"Returns the name of this attribute.");

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

    {
        const ::wxXmlAttribute *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxString(sipCpp->GetName());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_XmlAttribute, sipName_GetName, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxXmlAttribute_GetNext, "GetNext() -> XmlAttribute\n"
"\n"
"Returns the sibling of this attribute or NULL if there are no\n"
"siblings.");

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

    {
        const ::wxXmlAttribute *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->GetNext();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_XmlAttribute, sipName_GetNext, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxXmlAttribute_GetValue, "GetValue() -> String\n"
"\n"
"Returns the value of this attribute.");

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

    {
        const ::wxXmlAttribute *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxString(sipCpp->GetValue());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_XmlAttribute, sipName_GetValue, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxXmlAttribute_SetName, "SetName(name)\n"
"\n"
"Sets the name of this attribute.");

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

    {
        const ::wxString* name;
        int nameState = 0;
        ::wxXmlAttribute *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxXmlAttribute, &sipCpp, sipType_wxString, &name, &nameState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetName(*name);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<::wxString *>(name), sipType_wxString, nameState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_XmlAttribute, sipName_SetName, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxXmlAttribute_SetNext, "SetNext(next)\n"
"\n"
"Sets the sibling of this attribute.");

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

    {
        ::wxXmlAttribute* next;
        ::wxXmlAttribute *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8", &sipSelf, sipType_wxXmlAttribute, &sipCpp, sipType_wxXmlAttribute, &next))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetNext(next);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_XmlAttribute, sipName_SetNext, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxXmlAttribute_SetValue, "SetValue(value)\n"
"\n"
"Sets the value of this attribute.");

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

    {
        const ::wxString* value;
        int valueState = 0;
        ::wxXmlAttribute *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxXmlAttribute, &sipCpp, sipType_wxString, &value, &valueState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp->SetValue(*value);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<::wxString *>(value), sipType_wxString, valueState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_XmlAttribute, sipName_SetValue, SIP_NULLPTR);

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxXmlAttribute *>(sipCppV);
    else
        delete reinterpret_cast<::wxXmlAttribute *>(sipCppV);

    Py_END_ALLOW_THREADS
}


extern "C" {static void *array_wxXmlAttribute(Py_ssize_t);}
static void *array_wxXmlAttribute(Py_ssize_t sipNrElem)
{
    return new ::wxXmlAttribute[sipNrElem];
}


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


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


extern "C" {static void dealloc_wxXmlAttribute(sipSimpleWrapper *);}
static void dealloc_wxXmlAttribute(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipwxXmlAttribute *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_wxXmlAttribute(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_wxXmlAttribute(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_wxXmlAttribute(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipwxXmlAttribute *sipCpp = SIP_NULLPTR;

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxXmlAttribute();
            Py_END_ALLOW_THREADS

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::wxString* name;
        int nameState = 0;
        const ::wxString* value;
        int valueState = 0;
        ::wxXmlAttribute* next = 0;

        static const char *sipKwdList[] = {
            sipName_name,
            sipName_value,
            sipName_next,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1J1|J8", sipType_wxString, &name, &nameState, sipType_wxString, &value, &valueState, sipType_wxXmlAttribute, &next))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxXmlAttribute(*name, *value, next);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast<::wxString *>(name), sipType_wxString, nameState);
            sipReleaseType(const_cast<::wxString *>(value), sipType_wxString, valueState);

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::wxXmlAttribute* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_wxXmlAttribute, &a0))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxXmlAttribute(*a0);
            Py_END_ALLOW_THREADS

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_wxXmlAttribute[] = {
    {sipName_GetName, meth_wxXmlAttribute_GetName, METH_VARARGS, doc_wxXmlAttribute_GetName},
    {sipName_GetNext, meth_wxXmlAttribute_GetNext, METH_VARARGS, doc_wxXmlAttribute_GetNext},
    {sipName_GetValue, meth_wxXmlAttribute_GetValue, METH_VARARGS, doc_wxXmlAttribute_GetValue},
    {sipName_SetName, SIP_MLMETH_CAST(meth_wxXmlAttribute_SetName), METH_VARARGS|METH_KEYWORDS, doc_wxXmlAttribute_SetName},
    {sipName_SetNext, SIP_MLMETH_CAST(meth_wxXmlAttribute_SetNext), METH_VARARGS|METH_KEYWORDS, doc_wxXmlAttribute_SetNext},
    {sipName_SetValue, SIP_MLMETH_CAST(meth_wxXmlAttribute_SetValue), METH_VARARGS|METH_KEYWORDS, doc_wxXmlAttribute_SetValue}
};

sipVariableDef variables_wxXmlAttribute[] = {
    {PropertyVariable, sipName_Value, &methods_wxXmlAttribute[2], &methods_wxXmlAttribute[5], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Next, &methods_wxXmlAttribute[1], &methods_wxXmlAttribute[4], SIP_NULLPTR, SIP_NULLPTR},
    {PropertyVariable, sipName_Name, &methods_wxXmlAttribute[0], &methods_wxXmlAttribute[3], SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxXmlAttribute, "XmlAttribute()\n"
"XmlAttribute(name, value, next=None)\n"
"\n"
"Represents a node attribute.");


sipClassTypeDef sipTypeDef__xml_wxXmlAttribute = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxXmlAttribute,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_XmlAttribute,
        {0, 0, 1},
        6, methods_wxXmlAttribute,
        0, SIP_NULLPTR,
        3, variables_wxXmlAttribute,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxXmlAttribute,
    -1,
    -1,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_wxXmlAttribute,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxXmlAttribute,
    assign_wxXmlAttribute,
    array_wxXmlAttribute,
    copy_wxXmlAttribute,
    release_wxXmlAttribute,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
};
