/*
 * 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/platinfo.h>



extern "C" {static PyObject *slot_wxLinuxDistributionInfo___ne__(PyObject *, PyObject *);}
static PyObject *slot_wxLinuxDistributionInfo___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxLinuxDistributionInfo *sipCpp = reinterpret_cast< ::wxLinuxDistributionInfo *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxLinuxDistributionInfo));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::wxLinuxDistributionInfo* ldi;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxLinuxDistributionInfo, &ldi))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->::wxLinuxDistributionInfo::operator!=(*ldi);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__core, ne_slot, sipType_wxLinuxDistributionInfo, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_wxLinuxDistributionInfo___eq__(PyObject *, PyObject *);}
static PyObject *slot_wxLinuxDistributionInfo___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::wxLinuxDistributionInfo *sipCpp = reinterpret_cast< ::wxLinuxDistributionInfo *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_wxLinuxDistributionInfo));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::wxLinuxDistributionInfo* ldi;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_wxLinuxDistributionInfo, &ldi))
        {
            bool sipRes;

            PyErr_Clear();

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->::wxLinuxDistributionInfo::operator==(*ldi);
            Py_END_ALLOW_THREADS

            if (PyErr_Occurred())
                return 0;

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI__core, eq_slot, sipType_wxLinuxDistributionInfo, sipSelf, sipArg);
}


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

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

    Py_END_ALLOW_THREADS
}


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::wxLinuxDistributionInfo* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


extern "C" {static PyObject *varget_wxLinuxDistributionInfo_CodeName(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLinuxDistributionInfo_CodeName(void *sipSelf, PyObject *, PyObject *)
{
    ::wxString*sipVal;
    ::wxLinuxDistributionInfo *sipCpp = reinterpret_cast< ::wxLinuxDistributionInfo *>(sipSelf);

    sipVal = &sipCpp->CodeName;

    return sipConvertFromType(sipVal, sipType_wxString, SIP_NULLPTR);
}


extern "C" {static int varset_wxLinuxDistributionInfo_CodeName(void *, PyObject *, PyObject *);}
static int varset_wxLinuxDistributionInfo_CodeName(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::wxString*sipVal;
    ::wxLinuxDistributionInfo *sipCpp = reinterpret_cast< ::wxLinuxDistributionInfo *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::wxString *>(sipForceConvertToType(sipPy, sipType_wxString, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->CodeName = *sipVal;

    sipReleaseType(sipVal, sipType_wxString, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_wxLinuxDistributionInfo_Description(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLinuxDistributionInfo_Description(void *sipSelf, PyObject *, PyObject *)
{
    ::wxString*sipVal;
    ::wxLinuxDistributionInfo *sipCpp = reinterpret_cast< ::wxLinuxDistributionInfo *>(sipSelf);

    sipVal = &sipCpp->Description;

    return sipConvertFromType(sipVal, sipType_wxString, SIP_NULLPTR);
}


extern "C" {static int varset_wxLinuxDistributionInfo_Description(void *, PyObject *, PyObject *);}
static int varset_wxLinuxDistributionInfo_Description(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::wxString*sipVal;
    ::wxLinuxDistributionInfo *sipCpp = reinterpret_cast< ::wxLinuxDistributionInfo *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::wxString *>(sipForceConvertToType(sipPy, sipType_wxString, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->Description = *sipVal;

    sipReleaseType(sipVal, sipType_wxString, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_wxLinuxDistributionInfo_Id(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLinuxDistributionInfo_Id(void *sipSelf, PyObject *, PyObject *)
{
    ::wxString*sipVal;
    ::wxLinuxDistributionInfo *sipCpp = reinterpret_cast< ::wxLinuxDistributionInfo *>(sipSelf);

    sipVal = &sipCpp->Id;

    return sipConvertFromType(sipVal, sipType_wxString, SIP_NULLPTR);
}


extern "C" {static int varset_wxLinuxDistributionInfo_Id(void *, PyObject *, PyObject *);}
static int varset_wxLinuxDistributionInfo_Id(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::wxString*sipVal;
    ::wxLinuxDistributionInfo *sipCpp = reinterpret_cast< ::wxLinuxDistributionInfo *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::wxString *>(sipForceConvertToType(sipPy, sipType_wxString, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->Id = *sipVal;

    sipReleaseType(sipVal, sipType_wxString, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_wxLinuxDistributionInfo_Release(void *, PyObject *, PyObject *);}
static PyObject *varget_wxLinuxDistributionInfo_Release(void *sipSelf, PyObject *, PyObject *)
{
    ::wxString*sipVal;
    ::wxLinuxDistributionInfo *sipCpp = reinterpret_cast< ::wxLinuxDistributionInfo *>(sipSelf);

    sipVal = &sipCpp->Release;

    return sipConvertFromType(sipVal, sipType_wxString, SIP_NULLPTR);
}


extern "C" {static int varset_wxLinuxDistributionInfo_Release(void *, PyObject *, PyObject *);}
static int varset_wxLinuxDistributionInfo_Release(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::wxString*sipVal;
    ::wxLinuxDistributionInfo *sipCpp = reinterpret_cast< ::wxLinuxDistributionInfo *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::wxString *>(sipForceConvertToType(sipPy, sipType_wxString, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->Release = *sipVal;

    sipReleaseType(sipVal, sipType_wxString, sipValState);

    return 0;
}

sipVariableDef variables_wxLinuxDistributionInfo[] = {
    {InstanceVariable, sipName_CodeName, (PyMethodDef *)varget_wxLinuxDistributionInfo_CodeName, (PyMethodDef *)varset_wxLinuxDistributionInfo_CodeName, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_Description, (PyMethodDef *)varget_wxLinuxDistributionInfo_Description, (PyMethodDef *)varset_wxLinuxDistributionInfo_Description, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_Id, (PyMethodDef *)varget_wxLinuxDistributionInfo_Id, (PyMethodDef *)varset_wxLinuxDistributionInfo_Id, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_Release, (PyMethodDef *)varget_wxLinuxDistributionInfo_Release, (PyMethodDef *)varset_wxLinuxDistributionInfo_Release, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_wxLinuxDistributionInfo, "A structure containing information about a Linux distribution as\n"
"returned by the lsb_release utility.");


sipClassTypeDef sipTypeDef__core_wxLinuxDistributionInfo = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_CLASS,
        sipNameNr_wxLinuxDistributionInfo,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_LinuxDistributionInfo,
        {0, 0, 1},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        4, variables_wxLinuxDistributionInfo,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_wxLinuxDistributionInfo,
    -1,
    -1,
    SIP_NULLPTR,
    slots_wxLinuxDistributionInfo,
    init_type_wxLinuxDistributionInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_wxLinuxDistributionInfo,
    assign_wxLinuxDistributionInfo,
    array_wxLinuxDistributionInfo,
    copy_wxLinuxDistributionInfo,
    release_wxLinuxDistributionInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_wxLinuxDistributionInfo,
    sizeof (::wxLinuxDistributionInfo),
};
