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

#include "sipAPI_richtext.h"
        #include <wx/richtext/richtextxml.h>
        #include <wx/richtext/richtextbuffer.h>
        #include <wx/stream.h>
        #include <wx/stream.h>
        #include <wx/richtext/richtextbuffer.h>
        #include <wx/xml/xml.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>


class sipwxRichTextXMLHandler : public ::wxRichTextXMLHandler
{
public:
    sipwxRichTextXMLHandler(const ::wxString&, const ::wxString&, int);
    sipwxRichTextXMLHandler(const ::wxRichTextXMLHandler&);
    virtual ~sipwxRichTextXMLHandler();

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    bool sipProtectVirt_DoLoadFile(bool, ::wxRichTextBuffer*, ::wxInputStream&);
    bool sipProtectVirt_DoSaveFile(bool, ::wxRichTextBuffer*, ::wxOutputStream&);

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool LoadFile(::wxRichTextBuffer*, const ::wxString&) SIP_OVERRIDE;
    bool SaveFile(::wxRichTextBuffer*, const ::wxString&) SIP_OVERRIDE;
    bool CanHandle(const ::wxString&) const SIP_OVERRIDE;
    bool CanSave() const SIP_OVERRIDE;
    bool CanLoad() const SIP_OVERRIDE;
    bool IsVisible() const SIP_OVERRIDE;
    void SetVisible(bool) SIP_OVERRIDE;
    bool DoLoadFile(::wxRichTextBuffer*, ::wxInputStream&) SIP_OVERRIDE;
    bool DoSaveFile(::wxRichTextBuffer*, ::wxOutputStream&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipwxRichTextXMLHandler(const sipwxRichTextXMLHandler &);
    sipwxRichTextXMLHandler &operator = (const sipwxRichTextXMLHandler &);

    char sipPyMethods[9];
};

sipwxRichTextXMLHandler::sipwxRichTextXMLHandler(const ::wxString& name, const ::wxString& ext, int type): ::wxRichTextXMLHandler(name, ext, type), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipwxRichTextXMLHandler::sipwxRichTextXMLHandler(const ::wxRichTextXMLHandler& a0): ::wxRichTextXMLHandler(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

bool sipwxRichTextXMLHandler::LoadFile(::wxRichTextBuffer*buffer, const ::wxString& filename)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_LoadFile);

    if (!sipMeth)
        return ::wxRichTextXMLHandler::LoadFile(buffer, filename);

    extern bool sipVH__richtext_108(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxRichTextBuffer*, const ::wxString&);

    return sipVH__richtext_108(sipGILState, 0, sipPySelf, sipMeth, buffer, filename);
}

bool sipwxRichTextXMLHandler::SaveFile(::wxRichTextBuffer*buffer, const ::wxString& filename)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_SaveFile);

    if (!sipMeth)
        return ::wxRichTextXMLHandler::SaveFile(buffer, filename);

    extern bool sipVH__richtext_108(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxRichTextBuffer*, const ::wxString&);

    return sipVH__richtext_108(sipGILState, 0, sipPySelf, sipMeth, buffer, filename);
}

bool sipwxRichTextXMLHandler::CanHandle(const ::wxString& filename) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[2]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_CanHandle);

    if (!sipMeth)
        return ::wxRichTextXMLHandler::CanHandle(filename);

    extern bool sipVH__richtext_96(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&);

    return sipVH__richtext_96(sipGILState, 0, sipPySelf, sipMeth, filename);
}

bool sipwxRichTextXMLHandler::CanSave() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[3]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_CanSave);

    if (!sipMeth)
        return ::wxRichTextXMLHandler::CanSave();

    extern bool sipVH__richtext_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH__richtext_9(sipGILState, 0, sipPySelf, sipMeth);
}

bool sipwxRichTextXMLHandler::CanLoad() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[4]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_CanLoad);

    if (!sipMeth)
        return ::wxRichTextXMLHandler::CanLoad();

    extern bool sipVH__richtext_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH__richtext_9(sipGILState, 0, sipPySelf, sipMeth);
}

bool sipwxRichTextXMLHandler::IsVisible() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[5]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_IsVisible);

    if (!sipMeth)
        return ::wxRichTextXMLHandler::IsVisible();

    extern bool sipVH__richtext_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH__richtext_9(sipGILState, 0, sipPySelf, sipMeth);
}

void sipwxRichTextXMLHandler::SetVisible(bool visible)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_SetVisible);

    if (!sipMeth)
    {
        ::wxRichTextXMLHandler::SetVisible(visible);
        return;
    }

    extern void sipVH__richtext_33(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, bool);

    sipVH__richtext_33(sipGILState, 0, sipPySelf, sipMeth, visible);
}

bool sipwxRichTextXMLHandler::DoLoadFile(::wxRichTextBuffer*buffer, ::wxInputStream& stream)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[7], &sipPySelf, SIP_NULLPTR, sipName_DoLoadFile);

    if (!sipMeth)
        return ::wxRichTextXMLHandler::DoLoadFile(buffer, stream);

    extern bool sipVH__richtext_109(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxRichTextBuffer*, ::wxInputStream&);

    return sipVH__richtext_109(sipGILState, 0, sipPySelf, sipMeth, buffer, stream);
}

bool sipwxRichTextXMLHandler::DoSaveFile(::wxRichTextBuffer*buffer, ::wxOutputStream& stream)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[8], &sipPySelf, SIP_NULLPTR, sipName_DoSaveFile);

    if (!sipMeth)
        return ::wxRichTextXMLHandler::DoSaveFile(buffer, stream);

    extern bool sipVH__richtext_110(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxRichTextBuffer*, ::wxOutputStream&);

    return sipVH__richtext_110(sipGILState, 0, sipPySelf, sipMeth, buffer, stream);
}

bool sipwxRichTextXMLHandler::sipProtectVirt_DoLoadFile(bool sipSelfWasArg, ::wxRichTextBuffer*buffer, ::wxInputStream& stream)
{
    return (sipSelfWasArg ? ::wxRichTextXMLHandler::DoLoadFile(buffer, stream) : DoLoadFile(buffer, stream));
}

bool sipwxRichTextXMLHandler::sipProtectVirt_DoSaveFile(bool sipSelfWasArg, ::wxRichTextBuffer*buffer, ::wxOutputStream& stream)
{
    return (sipSelfWasArg ? ::wxRichTextXMLHandler::DoSaveFile(buffer, stream) : DoSaveFile(buffer, stream));
}


PyDoc_STRVAR(doc_wxRichTextXMLHandler_CanLoad, "CanLoad() -> bool\n"
"\n"
"Returns true.");

extern "C" {static PyObject *meth_wxRichTextXMLHandler_CanLoad(PyObject *, PyObject *);}
static PyObject *meth_wxRichTextXMLHandler_CanLoad(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::wxRichTextXMLHandler *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxRichTextXMLHandler::CanLoad() : sipCpp->CanLoad());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextXMLHandler, sipName_CanLoad, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextXMLHandler_CanSave, "CanSave() -> bool\n"
"\n"
"Returns true.");

extern "C" {static PyObject *meth_wxRichTextXMLHandler_CanSave(PyObject *, PyObject *);}
static PyObject *meth_wxRichTextXMLHandler_CanSave(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const ::wxRichTextXMLHandler *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxRichTextXMLHandler::CanSave() : sipCpp->CanSave());
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextXMLHandler, sipName_CanSave, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextXMLHandler_ExportXML, "ExportXML(stream, obj, level) -> bool\n"
"\n"
"Recursively exports an object to the stream.");

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

    {
        ::wxOutputStream* stream;
        int streamState = 0;
        ::wxRichTextObject* obj;
        int level;
        ::wxRichTextXMLHandler *sipCpp;

        static const char *sipKwdList[] = {
            sipName_stream,
            sipName_obj,
            sipName_level,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1J9i", &sipSelf, sipType_wxRichTextXMLHandler, &sipCpp, sipType_wxOutputStream, &stream, &streamState, sipType_wxRichTextObject, &obj, &level))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->ExportXML(*stream, *obj, level);
            Py_END_ALLOW_THREADS
            sipReleaseType(stream, sipType_wxOutputStream, streamState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextXMLHandler, sipName_ExportXML, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextXMLHandler_ImportXML, "ImportXML(buffer, obj, node) -> bool\n"
"\n"
"Recursively imports an object.");

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

    {
        ::wxRichTextBuffer* buffer;
        ::wxRichTextObject* obj;
        ::wxXmlNode* node;
        ::wxRichTextXMLHandler *sipCpp;

        static const char *sipKwdList[] = {
            sipName_buffer,
            sipName_obj,
            sipName_node,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J8J8", &sipSelf, sipType_wxRichTextXMLHandler, &sipCpp, sipType_wxRichTextBuffer, &buffer, sipType_wxRichTextObject, &obj, sipType_wxXmlNode, &node))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->ImportXML(buffer, obj, node);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextXMLHandler, sipName_ImportXML, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextXMLHandler_RegisterNodeName, "RegisterNodeName(nodeName, className) -> None\n"
"\n"
"Call with XML node name, C++ class name so that wxRTC can read in the\n"
"node.");

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

    {
        const ::wxString* nodeName;
        int nodeNameState = 0;
        const ::wxString* className;
        int classNameState = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1J1", sipType_wxString, &nodeName, &nodeNameState, sipType_wxString, &className, &classNameState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            ::wxRichTextXMLHandler::RegisterNodeName(*nodeName, *className);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(nodeName), sipType_wxString, nodeNameState);
            sipReleaseType(const_cast< ::wxString *>(className), sipType_wxString, classNameState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextXMLHandler, sipName_RegisterNodeName, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextXMLHandler_ClearNodeToClassMap, "ClearNodeToClassMap() -> None\n"
"\n"
"Cleans up the mapping between node name and C++ class.");

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

    {
        if (sipParseArgs(&sipParseErr, sipArgs, ""))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            ::wxRichTextXMLHandler::ClearNodeToClassMap();
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextXMLHandler, sipName_ClearNodeToClassMap, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextXMLHandler_DoLoadFile, "DoLoadFile(self, buffer: RichTextBuffer|None, stream: InputStream) -> bool");

extern "C" {static PyObject *meth_wxRichTextXMLHandler_DoLoadFile(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxRichTextXMLHandler_DoLoadFile(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        ::wxRichTextBuffer* buffer;
        ::wxInputStream* stream;
        int streamState = 0;
        sipwxRichTextXMLHandler *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J1", &sipSelf, sipType_wxRichTextXMLHandler, &sipCpp, sipType_wxRichTextBuffer, &buffer, sipType_wxInputStream, &stream, &streamState))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_DoLoadFile(sipSelfWasArg, buffer, *stream);
            Py_END_ALLOW_THREADS
            sipReleaseType(stream, sipType_wxInputStream, streamState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextXMLHandler, sipName_DoLoadFile, doc_wxRichTextXMLHandler_DoLoadFile);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxRichTextXMLHandler_DoSaveFile, "DoSaveFile(self, buffer: RichTextBuffer|None, stream: OutputStream) -> bool");

extern "C" {static PyObject *meth_wxRichTextXMLHandler_DoSaveFile(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_wxRichTextXMLHandler_DoSaveFile(PyObject *sipSelf, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        ::wxRichTextBuffer* buffer;
        ::wxOutputStream* stream;
        int streamState = 0;
        sipwxRichTextXMLHandler *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8J1", &sipSelf, sipType_wxRichTextXMLHandler, &sipCpp, sipType_wxRichTextBuffer, &buffer, sipType_wxOutputStream, &stream, &streamState))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->sipProtectVirt_DoSaveFile(sipSelfWasArg, buffer, *stream);
            Py_END_ALLOW_THREADS
            sipReleaseType(stream, sipType_wxOutputStream, streamState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_RichTextXMLHandler, sipName_DoSaveFile, doc_wxRichTextXMLHandler_DoSaveFile);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_wxRichTextXMLHandler(void *, const sipTypeDef *);}
static void *cast_wxRichTextXMLHandler(void *sipCppV, const sipTypeDef *targetType)
{
    ::wxRichTextXMLHandler *sipCpp = reinterpret_cast< ::wxRichTextXMLHandler *>(sipCppV);

    if (targetType == sipType_wxRichTextXMLHandler)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_wxRichTextFileHandler)->ctd_cast(static_cast< ::wxRichTextFileHandler *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxRichTextXMLHandler *>(sipCppV);
    else
        delete reinterpret_cast< ::wxRichTextXMLHandler *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


extern "C" {static void array_delete_wxRichTextXMLHandler(void *);}
static void array_delete_wxRichTextXMLHandler(void *sipCpp)
{
    delete[] reinterpret_cast< ::wxRichTextXMLHandler *>(sipCpp);
}


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


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


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

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


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

    {
        const ::wxString& namedef = "XML";
        const ::wxString* name = &namedef;
        int nameState = 0;
        const ::wxString& extdef = "xml";
        const ::wxString* ext = &extdef;
        int extState = 0;
        int type = wxRICHTEXT_TYPE_XML;

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

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|J1J1i", sipType_wxString, &name, &nameState, sipType_wxString, &ext, &extState, &type))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxRichTextXMLHandler(*name, *ext, type);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(name), sipType_wxString, nameState);
            sipReleaseType(const_cast< ::wxString *>(ext), sipType_wxString, extState);

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const ::wxRichTextXMLHandler* a0;

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_wxRichTextXMLHandler[] = {{24, 255, 1}};


static PyMethodDef methods_wxRichTextXMLHandler[] = {
    {sipName_CanLoad, meth_wxRichTextXMLHandler_CanLoad, METH_VARARGS, doc_wxRichTextXMLHandler_CanLoad},
    {sipName_CanSave, meth_wxRichTextXMLHandler_CanSave, METH_VARARGS, doc_wxRichTextXMLHandler_CanSave},
    {sipName_ClearNodeToClassMap, meth_wxRichTextXMLHandler_ClearNodeToClassMap, METH_VARARGS, doc_wxRichTextXMLHandler_ClearNodeToClassMap},
    {sipName_DoLoadFile, SIP_MLMETH_CAST(meth_wxRichTextXMLHandler_DoLoadFile), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextXMLHandler_DoLoadFile},
    {sipName_DoSaveFile, SIP_MLMETH_CAST(meth_wxRichTextXMLHandler_DoSaveFile), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextXMLHandler_DoSaveFile},
    {sipName_ExportXML, SIP_MLMETH_CAST(meth_wxRichTextXMLHandler_ExportXML), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextXMLHandler_ExportXML},
    {sipName_ImportXML, SIP_MLMETH_CAST(meth_wxRichTextXMLHandler_ImportXML), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextXMLHandler_ImportXML},
    {sipName_RegisterNodeName, SIP_MLMETH_CAST(meth_wxRichTextXMLHandler_RegisterNodeName), METH_VARARGS|METH_KEYWORDS, doc_wxRichTextXMLHandler_RegisterNodeName}
};

PyDoc_STRVAR(doc_wxRichTextXMLHandler, "RichTextXMLHandler(name=\"XML\", ext=\"xml\", type=RICHTEXT_TYPE_XML) -> None\n"
"\n"
"A handler for loading and saving content in an XML format specific to\n"
"wxRichTextBuffer.");


sipClassTypeDef sipTypeDef__richtext_wxRichTextXMLHandler = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxRichTextXMLHandler,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_RichTextXMLHandler,
        {0, 0, 1},
        8, methods_wxRichTextXMLHandler,
        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_wxRichTextXMLHandler,
    -1,
    -1,
    supers_wxRichTextXMLHandler,
    SIP_NULLPTR,
    init_type_wxRichTextXMLHandler,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxRichTextXMLHandler,
    assign_wxRichTextXMLHandler,
    array_wxRichTextXMLHandler,
    copy_wxRichTextXMLHandler,
    release_wxRichTextXMLHandler,
    cast_wxRichTextXMLHandler,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxRichTextXMLHandler,
    sizeof (::wxRichTextXMLHandler),
};
