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

#include "sipAPI_core.h"
        #include <wx/fs_mem.h>
        #include <wx/filesys.h>
        #include <wx/filesys.h>
        #include <wx/image.h>
        #include <wx/bitmap.h>
        #include <wx/object.h>
        #include <wx/object.h>
        #include <wx/object.h>
    void _wxMemoryFSHandler_AddFile(const wxString* filename, const wxString* textdata)
    {
        wxScopedCharBuffer buf = textdata->utf8_str();
        wxMemoryFSHandler::AddFile(*filename, (const char*)buf, strlen(buf));
    }
    void _wxMemoryFSHandler_AddFile(const wxString* filename, wxPyBuffer* binarydata)
    {
        wxMemoryFSHandler::AddFile(*filename, binarydata->m_ptr, binarydata->m_len);
    }
    void _wxMemoryFSHandler_AddFileWithMimeType(const wxString* filename, const wxString* textdata, const wxString* mimetype)
    {
        wxScopedCharBuffer buf = textdata->utf8_str();
        wxMemoryFSHandler::AddFileWithMimeType(*filename, (const char*)buf, strlen(buf), *mimetype);
    }
    void _wxMemoryFSHandler_AddFileWithMimeType(const wxString* filename, wxPyBuffer* binarydata, const wxString* mimetype)
    {
        wxMemoryFSHandler::AddFileWithMimeType(
                *filename, binarydata->m_ptr, binarydata->m_len, *mimetype);
    }


class sipwxMemoryFSHandler : public ::wxMemoryFSHandler
{
public:
    sipwxMemoryFSHandler();
    virtual ~sipwxMemoryFSHandler();

    /*
     * There is a public method for every protected method visible from
     * this class.
     */
    static ::wxString sipProtect_GetAnchor(const ::wxString&);
    static ::wxString sipProtect_GetLeftLocation(const ::wxString&);
    static ::wxString sipProtect_GetProtocol(const ::wxString&);
    static ::wxString sipProtect_GetRightLocation(const ::wxString&);

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    bool CanOpen(const ::wxString&) SIP_OVERRIDE;
    ::wxString FindFirst(const ::wxString&, int) SIP_OVERRIDE;
    ::wxString FindNext() SIP_OVERRIDE;
    ::wxFSFile* OpenFile(::wxFileSystem&, const ::wxString&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[4];
};

sipwxMemoryFSHandler::sipwxMemoryFSHandler(): ::wxMemoryFSHandler(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

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

bool sipwxMemoryFSHandler::CanOpen(const ::wxString& location)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxMemoryFSHandler::CanOpen(location);

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

    return sipVH__core_9(sipGILState, 0, sipPySelf, sipMeth, location);
}

::wxString sipwxMemoryFSHandler::FindFirst(const ::wxString& spec, int flags)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

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

    if (!sipMeth)
        return ::wxMemoryFSHandler::FindFirst(spec, flags);

    extern ::wxString sipVH__core_10(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const ::wxString&, int);

    return sipVH__core_10(sipGILState, 0, sipPySelf, sipMeth, spec, flags);
}

::wxString sipwxMemoryFSHandler::FindNext()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_FindNext);

    if (!sipMeth)
        return ::wxMemoryFSHandler::FindNext();

    extern ::wxString sipVH__core_11(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

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

::wxFSFile* sipwxMemoryFSHandler::OpenFile(::wxFileSystem& fs, const ::wxString& location)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_OpenFile);

    if (!sipMeth)
        return ::wxMemoryFSHandler::OpenFile(fs, location);

    extern ::wxFSFile* sipVH__core_12(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, ::wxFileSystem&, const ::wxString&);

    return sipVH__core_12(sipGILState, 0, sipPySelf, sipMeth, fs, location);
}

::wxString sipwxMemoryFSHandler::sipProtect_GetAnchor(const ::wxString& location)
{
    return ::wxFileSystemHandler::GetAnchor(location);
}

::wxString sipwxMemoryFSHandler::sipProtect_GetLeftLocation(const ::wxString& location)
{
    return ::wxFileSystemHandler::GetLeftLocation(location);
}

::wxString sipwxMemoryFSHandler::sipProtect_GetProtocol(const ::wxString& location)
{
    return ::wxFileSystemHandler::GetProtocol(location);
}

::wxString sipwxMemoryFSHandler::sipProtect_GetRightLocation(const ::wxString& location)
{
    return ::wxFileSystemHandler::GetRightLocation(location);
}


PyDoc_STRVAR(doc_wxMemoryFSHandler_GetAnchor, "GetAnchor(location) -> str\n"
"\n"
"Returns the anchor if present in the location.");

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

    {
        const ::wxString* location;
        int locationState = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1", sipType_wxString, &location, &locationState))
        {
            ::wxString*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxString(sipwxMemoryFSHandler::sipProtect_GetAnchor(*location));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(location), sipType_wxString, locationState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_MemoryFSHandler, sipName_GetAnchor, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMemoryFSHandler_GetLeftLocation, "GetLeftLocation(location) -> str\n"
"\n"
"Returns the left location string extracted from location.");

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

    {
        const ::wxString* location;
        int locationState = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1", sipType_wxString, &location, &locationState))
        {
            ::wxString*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxString(sipwxMemoryFSHandler::sipProtect_GetLeftLocation(*location));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(location), sipType_wxString, locationState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_MemoryFSHandler, sipName_GetLeftLocation, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMemoryFSHandler_GetProtocol, "GetProtocol(location) -> str\n"
"\n"
"Returns the protocol string extracted from location.");

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

    {
        const ::wxString* location;
        int locationState = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1", sipType_wxString, &location, &locationState))
        {
            ::wxString*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxString(sipwxMemoryFSHandler::sipProtect_GetProtocol(*location));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(location), sipType_wxString, locationState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_MemoryFSHandler, sipName_GetProtocol, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMemoryFSHandler_GetRightLocation, "GetRightLocation(location) -> str\n"
"\n"
"Returns the right location string extracted from location.");

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

    {
        const ::wxString* location;
        int locationState = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1", sipType_wxString, &location, &locationState))
        {
            ::wxString*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxString(sipwxMemoryFSHandler::sipProtect_GetRightLocation(*location));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(location), sipType_wxString, locationState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_MemoryFSHandler, sipName_GetRightLocation, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMemoryFSHandler_AddFile, "AddFile(filename, image, type) -> None\n"
"AddFile(filename, bitmap, type) -> None\n"
"AddFile(filename, textdata) -> None\n"
"AddFile(filename, binarydata) -> None\n"
"\n"
"Adds a file to the list of the files stored in memory.\n"
"\n"
"\n"
"");

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

    {
        const ::wxString* filename;
        int filenameState = 0;
        ::wxImage* image;
        ::wxBitmapType type;

        static const char *sipKwdList[] = {
            sipName_filename,
            sipName_image,
            sipName_type,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1J9E", sipType_wxString, &filename, &filenameState, sipType_wxImage, &image, sipType_wxBitmapType, &type))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            ::wxMemoryFSHandler::AddFile(*filename, *image, type);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(filename), sipType_wxString, filenameState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const ::wxString* filename;
        int filenameState = 0;
        const ::wxBitmap* bitmap;
        ::wxBitmapType type;

        static const char *sipKwdList[] = {
            sipName_filename,
            sipName_bitmap,
            sipName_type,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1J9E", sipType_wxString, &filename, &filenameState, sipType_wxBitmap, &bitmap, sipType_wxBitmapType, &type))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            ::wxMemoryFSHandler::AddFile(*filename, *bitmap, type);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(filename), sipType_wxString, filenameState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const ::wxString* filename;
        int filenameState = 0;
        const ::wxString* textdata;
        int textdataState = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1J1", sipType_wxString, &filename, &filenameState, sipType_wxString, &textdata, &textdataState))
        {
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        _wxMemoryFSHandler_AddFile(filename, textdata);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;
            sipReleaseType(const_cast< ::wxString *>(filename), sipType_wxString, filenameState);
            sipReleaseType(const_cast< ::wxString *>(textdata), sipType_wxString, textdataState);

            if (sipIsErr)
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const ::wxString* filename;
        int filenameState = 0;
        ::wxPyBuffer* binarydata;
        int binarydataState = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1J0", sipType_wxString, &filename, &filenameState, sipType_wxPyBuffer, &binarydata, &binarydataState))
        {
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        _wxMemoryFSHandler_AddFile(filename, binarydata);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;
            sipReleaseType(const_cast< ::wxString *>(filename), sipType_wxString, filenameState);
            sipReleaseType(binarydata, sipType_wxPyBuffer, binarydataState);

            if (sipIsErr)
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_MemoryFSHandler, sipName_AddFile, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMemoryFSHandler_AddFileWithMimeType, "AddFileWithMimeType(filename, textdata, mimetype) -> None\n"
"AddFileWithMimeType(filename, binarydata, mimetype) -> None\n"
"\n"
"Add a file from text data, which will first be converted to utf-8\n"
"encoded bytes.\n"
"");

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

    {
        const ::wxString* filename;
        int filenameState = 0;
        const ::wxString* textdata;
        int textdataState = 0;
        const ::wxString* mimetype;
        int mimetypeState = 0;

        static const char *sipKwdList[] = {
            sipName_filename,
            sipName_textdata,
            sipName_mimetype,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1J1J1", sipType_wxString, &filename, &filenameState, sipType_wxString, &textdata, &textdataState, sipType_wxString, &mimetype, &mimetypeState))
        {
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        _wxMemoryFSHandler_AddFileWithMimeType(filename, textdata, mimetype);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;
            sipReleaseType(const_cast< ::wxString *>(filename), sipType_wxString, filenameState);
            sipReleaseType(const_cast< ::wxString *>(textdata), sipType_wxString, textdataState);
            sipReleaseType(const_cast< ::wxString *>(mimetype), sipType_wxString, mimetypeState);

            if (sipIsErr)
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const ::wxString* filename;
        int filenameState = 0;
        ::wxPyBuffer* binarydata;
        int binarydataState = 0;
        const ::wxString* mimetype;
        int mimetypeState = 0;

        static const char *sipKwdList[] = {
            sipName_filename,
            sipName_binarydata,
            sipName_mimetype,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1J0J1", sipType_wxString, &filename, &filenameState, sipType_wxPyBuffer, &binarydata, &binarydataState, sipType_wxString, &mimetype, &mimetypeState))
        {
            int sipIsErr = 0;
        PyErr_Clear();
        Py_BEGIN_ALLOW_THREADS
        _wxMemoryFSHandler_AddFileWithMimeType(filename, binarydata, mimetype);
        Py_END_ALLOW_THREADS
        if (PyErr_Occurred()) sipIsErr = 1;
            sipReleaseType(const_cast< ::wxString *>(filename), sipType_wxString, filenameState);
            sipReleaseType(binarydata, sipType_wxPyBuffer, binarydataState);
            sipReleaseType(const_cast< ::wxString *>(mimetype), sipType_wxString, mimetypeState);

            if (sipIsErr)
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_MemoryFSHandler, sipName_AddFileWithMimeType, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMemoryFSHandler_RemoveFile, "RemoveFile(filename) -> None\n"
"\n"
"Removes a file from memory FS and frees the occupied memory.");

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

    {
        const ::wxString* filename;
        int filenameState = 0;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1", sipType_wxString, &filename, &filenameState))
        {
            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            ::wxMemoryFSHandler::RemoveFile(*filename);
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(filename), sipType_wxString, filenameState);

            if (PyErr_Occurred())
                return 0;

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_MemoryFSHandler, sipName_RemoveFile, SIP_NULLPTR);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMemoryFSHandler_CanOpen, "CanOpen(self, location: Any) -> bool");

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

    {
        const ::wxString* location;
        int locationState = 0;
        ::wxMemoryFSHandler *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1", &sipSelf, sipType_wxMemoryFSHandler, &sipCpp, sipType_wxString, &location, &locationState))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxMemoryFSHandler::CanOpen(*location) : sipCpp->CanOpen(*location));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(location), sipType_wxString, locationState);

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_MemoryFSHandler, sipName_CanOpen, doc_wxMemoryFSHandler_CanOpen);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMemoryFSHandler_OpenFile, "OpenFile(self, fs: FileSystem, location: Any) -> FSFile|None");

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

    {
        ::wxFileSystem* fs;
        const ::wxString* location;
        int locationState = 0;
        ::wxMemoryFSHandler *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ9J1", &sipSelf, sipType_wxMemoryFSHandler, &sipCpp, sipType_wxFileSystem, &fs, sipType_wxString, &location, &locationState))
        {
            ::wxFSFile*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = (sipSelfWasArg ? sipCpp->::wxMemoryFSHandler::OpenFile(*fs, *location) : sipCpp->OpenFile(*fs, *location));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(location), sipType_wxString, locationState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_MemoryFSHandler, sipName_OpenFile, doc_wxMemoryFSHandler_OpenFile);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMemoryFSHandler_FindFirst, "FindFirst(self, spec: Any, flags: int = 0) -> Any");

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

    {
        const ::wxString* spec;
        int specState = 0;
        int flags = 0;
        ::wxMemoryFSHandler *sipCpp;

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

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|i", &sipSelf, sipType_wxMemoryFSHandler, &sipCpp, sipType_wxString, &spec, &specState, &flags))
        {
            ::wxString*sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxString((sipSelfWasArg ? sipCpp->::wxMemoryFSHandler::FindFirst(*spec, flags) : sipCpp->FindFirst(*spec, flags)));
            Py_END_ALLOW_THREADS
            sipReleaseType(const_cast< ::wxString *>(spec), sipType_wxString, specState);

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_MemoryFSHandler, sipName_FindFirst, doc_wxMemoryFSHandler_FindFirst);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_wxMemoryFSHandler_FindNext, "FindNext(self) -> Any");

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

    {
        ::wxMemoryFSHandler *sipCpp;

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

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = new ::wxString((sipSelfWasArg ? sipCpp->::wxMemoryFSHandler::FindNext() : sipCpp->FindNext()));
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

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

    sipNoMethod(sipParseErr, sipName_MemoryFSHandler, sipName_FindNext, doc_wxMemoryFSHandler_FindNext);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_wxMemoryFSHandler)
        return sipCppV;

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

    return SIP_NULLPTR;
}


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

    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipwxMemoryFSHandler *>(sipCppV);
    else
        delete reinterpret_cast< ::wxMemoryFSHandler *>(sipCppV);

    Py_END_ALLOW_THREADS
}


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


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


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

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


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

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

            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipwxMemoryFSHandler();
            Py_END_ALLOW_THREADS

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

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_wxMemoryFSHandler[] = {
    {sipName_AddFile, SIP_MLMETH_CAST(meth_wxMemoryFSHandler_AddFile), METH_VARARGS|METH_KEYWORDS, doc_wxMemoryFSHandler_AddFile},
    {sipName_AddFileWithMimeType, SIP_MLMETH_CAST(meth_wxMemoryFSHandler_AddFileWithMimeType), METH_VARARGS|METH_KEYWORDS, doc_wxMemoryFSHandler_AddFileWithMimeType},
    {sipName_CanOpen, SIP_MLMETH_CAST(meth_wxMemoryFSHandler_CanOpen), METH_VARARGS|METH_KEYWORDS, doc_wxMemoryFSHandler_CanOpen},
    {sipName_FindFirst, SIP_MLMETH_CAST(meth_wxMemoryFSHandler_FindFirst), METH_VARARGS|METH_KEYWORDS, doc_wxMemoryFSHandler_FindFirst},
    {sipName_FindNext, meth_wxMemoryFSHandler_FindNext, METH_VARARGS, doc_wxMemoryFSHandler_FindNext},
    {sipName_GetAnchor, SIP_MLMETH_CAST(meth_wxMemoryFSHandler_GetAnchor), METH_VARARGS|METH_KEYWORDS, SIP_NULLPTR},
    {sipName_GetLeftLocation, SIP_MLMETH_CAST(meth_wxMemoryFSHandler_GetLeftLocation), METH_VARARGS|METH_KEYWORDS, SIP_NULLPTR},
    {sipName_GetProtocol, SIP_MLMETH_CAST(meth_wxMemoryFSHandler_GetProtocol), METH_VARARGS|METH_KEYWORDS, SIP_NULLPTR},
    {sipName_GetRightLocation, SIP_MLMETH_CAST(meth_wxMemoryFSHandler_GetRightLocation), METH_VARARGS|METH_KEYWORDS, SIP_NULLPTR},
    {sipName_OpenFile, SIP_MLMETH_CAST(meth_wxMemoryFSHandler_OpenFile), METH_VARARGS|METH_KEYWORDS, doc_wxMemoryFSHandler_OpenFile},
    {sipName_RemoveFile, SIP_MLMETH_CAST(meth_wxMemoryFSHandler_RemoveFile), METH_VARARGS|METH_KEYWORDS, doc_wxMemoryFSHandler_RemoveFile}
};

PyDoc_STRVAR(doc_wxMemoryFSHandler, "MemoryFSHandler() -> None\n"
"\n"
"This wxFileSystem handler can store arbitrary data in memory stream\n"
"and make them accessible via an URL.");


sipClassTypeDef sipTypeDef__core_wxMemoryFSHandler = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_CLASS,
        sipNameNr_wxMemoryFSHandler,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_MemoryFSHandler,
        {0, 0, 1},
        11, methods_wxMemoryFSHandler,
        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_wxMemoryFSHandler,
    -1,
    -1,
    supers_wxMemoryFSHandler,
    SIP_NULLPTR,
    init_type_wxMemoryFSHandler,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxMemoryFSHandler,
    SIP_NULLPTR,
    array_wxMemoryFSHandler,
    SIP_NULLPTR,
    release_wxMemoryFSHandler,
    cast_wxMemoryFSHandler,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxMemoryFSHandler,
    sizeof (::wxMemoryFSHandler),
};
