/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.3
 */

#include "sipAPIKConfigCore.h"

#include <kconfigbase.h>

#include <kconfigbase.h>


extern "C" {static long slot_KConfigBase_WriteConfigFlags___hash__(PyObject *);}
static long slot_KConfigBase_WriteConfigFlags___hash__(PyObject *sipSelf)
{
     ::KConfigBase::WriteConfigFlags *sipCpp = reinterpret_cast< ::KConfigBase::WriteConfigFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KConfigBase_WriteConfigFlags));

    if (!sipCpp)
        return 0;


    {
        {
            long sipRes = 0;

        sipRes = sipCpp->operator KConfigBase::WriteConfigFlags::Int();

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static int slot_KConfigBase_WriteConfigFlags___bool__(PyObject *);}
static int slot_KConfigBase_WriteConfigFlags___bool__(PyObject *sipSelf)
{
     ::KConfigBase::WriteConfigFlags *sipCpp = reinterpret_cast< ::KConfigBase::WriteConfigFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KConfigBase_WriteConfigFlags));

    if (!sipCpp)
        return -1;


    {
        {
            int sipRes = 0;

        sipRes = (sipCpp->operator KConfigBase::WriteConfigFlags::Int() != 0);

            return sipRes;
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_KConfigBase_WriteConfigFlags___ne__(PyObject *,PyObject *);}
static PyObject *slot_KConfigBase_WriteConfigFlags___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KConfigBase::WriteConfigFlags *sipCpp = reinterpret_cast< ::KConfigBase::WriteConfigFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KConfigBase_WriteConfigFlags));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KConfigBase::WriteConfigFlags* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_KConfigBase_WriteConfigFlags, &a0, &a0State))
        {
            bool sipRes = 0;

        sipRes = (sipCpp->operator KConfigBase::WriteConfigFlags::Int() != a0->operator KConfigBase::WriteConfigFlags::Int());
            sipReleaseType(const_cast< ::KConfigBase::WriteConfigFlags *>(a0),sipType_KConfigBase_WriteConfigFlags,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KConfigCore, ne_slot, sipType_KConfigBase_WriteConfigFlags, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_KConfigBase_WriteConfigFlags___eq__(PyObject *,PyObject *);}
static PyObject *slot_KConfigBase_WriteConfigFlags___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::KConfigBase::WriteConfigFlags *sipCpp = reinterpret_cast< ::KConfigBase::WriteConfigFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KConfigBase_WriteConfigFlags));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        const  ::KConfigBase::WriteConfigFlags* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_KConfigBase_WriteConfigFlags, &a0, &a0State))
        {
            bool sipRes = 0;

        sipRes = (sipCpp->operator KConfigBase::WriteConfigFlags::Int() == a0->operator KConfigBase::WriteConfigFlags::Int());
            sipReleaseType(const_cast< ::KConfigBase::WriteConfigFlags *>(a0),sipType_KConfigBase_WriteConfigFlags,a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KConfigCore, eq_slot, sipType_KConfigBase_WriteConfigFlags, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_KConfigBase_WriteConfigFlags___ixor__(PyObject *,PyObject *);}
static PyObject *slot_KConfigBase_WriteConfigFlags___ixor__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KConfigBase_WriteConfigFlags)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::KConfigBase::WriteConfigFlags *sipCpp = reinterpret_cast< ::KConfigBase::WriteConfigFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KConfigBase_WriteConfigFlags));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
        *sipCpp = KConfigBase::WriteConfigFlags(*sipCpp ^ a0);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_KConfigBase_WriteConfigFlags___xor__(PyObject *,PyObject *);}
static PyObject *slot_KConfigBase_WriteConfigFlags___xor__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KConfigBase::WriteConfigFlags* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KConfigBase_WriteConfigFlags, &a0, &a0State, &a1))
        {
             ::KConfigBase::WriteConfigFlags*sipRes;

            sipRes = new  ::KConfigBase::WriteConfigFlags((*a0 ^ a1));
            sipReleaseType(a0,sipType_KConfigBase_WriteConfigFlags,a0State);

            return sipConvertFromNewType(sipRes,sipType_KConfigBase_WriteConfigFlags,NULL);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KConfigCore, xor_slot, NULL, sipArg0, sipArg1);
}


extern "C" {static PyObject *slot_KConfigBase_WriteConfigFlags___ior__(PyObject *,PyObject *);}
static PyObject *slot_KConfigBase_WriteConfigFlags___ior__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KConfigBase_WriteConfigFlags)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::KConfigBase::WriteConfigFlags *sipCpp = reinterpret_cast< ::KConfigBase::WriteConfigFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KConfigBase_WriteConfigFlags));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
        *sipCpp = KConfigBase::WriteConfigFlags(*sipCpp | a0);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_KConfigBase_WriteConfigFlags___or__(PyObject *,PyObject *);}
static PyObject *slot_KConfigBase_WriteConfigFlags___or__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KConfigBase::WriteConfigFlags* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KConfigBase_WriteConfigFlags, &a0, &a0State, &a1))
        {
             ::KConfigBase::WriteConfigFlags*sipRes;

            sipRes = new  ::KConfigBase::WriteConfigFlags((*a0 | a1));
            sipReleaseType(a0,sipType_KConfigBase_WriteConfigFlags,a0State);

            return sipConvertFromNewType(sipRes,sipType_KConfigBase_WriteConfigFlags,NULL);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KConfigCore, or_slot, NULL, sipArg0, sipArg1);
}


extern "C" {static PyObject *slot_KConfigBase_WriteConfigFlags___iand__(PyObject *,PyObject *);}
static PyObject *slot_KConfigBase_WriteConfigFlags___iand__(PyObject *sipSelf,PyObject *sipArg)
{
    if (!PyObject_TypeCheck(sipSelf, sipTypeAsPyTypeObject(sipType_KConfigBase_WriteConfigFlags)))
    {
        Py_INCREF(Py_NotImplemented);
        return Py_NotImplemented;
    }

     ::KConfigBase::WriteConfigFlags *sipCpp = reinterpret_cast< ::KConfigBase::WriteConfigFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KConfigBase_WriteConfigFlags));

    if (!sipCpp)
        return 0;

    PyObject *sipParseErr = NULL;

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
            sipCpp-> ::KConfigBase::WriteConfigFlags::operator&=(a0);

            Py_INCREF(sipSelf);
            return sipSelf;
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    PyErr_Clear();

    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
}


extern "C" {static PyObject *slot_KConfigBase_WriteConfigFlags___and__(PyObject *,PyObject *);}
static PyObject *slot_KConfigBase_WriteConfigFlags___and__(PyObject *sipArg0,PyObject *sipArg1)
{
    PyObject *sipParseErr = NULL;

    {
         ::KConfigBase::WriteConfigFlags* a0;
        int a0State = 0;
        int a1;

        if (sipParsePair(&sipParseErr, sipArg0, sipArg1, "J1i", sipType_KConfigBase_WriteConfigFlags, &a0, &a0State, &a1))
        {
             ::KConfigBase::WriteConfigFlags*sipRes;

            sipRes = new  ::KConfigBase::WriteConfigFlags((*a0 & a1));
            sipReleaseType(a0,sipType_KConfigBase_WriteConfigFlags,a0State);

            return sipConvertFromNewType(sipRes,sipType_KConfigBase_WriteConfigFlags,NULL);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return NULL;

    return sipPySlotExtend(&sipModuleAPI_KConfigCore, and_slot, NULL, sipArg0, sipArg1);
}


extern "C" {static PyObject *slot_KConfigBase_WriteConfigFlags___invert__(PyObject *);}
static PyObject *slot_KConfigBase_WriteConfigFlags___invert__(PyObject *sipSelf)
{
     ::KConfigBase::WriteConfigFlags *sipCpp = reinterpret_cast< ::KConfigBase::WriteConfigFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KConfigBase_WriteConfigFlags));

    if (!sipCpp)
        return 0;


    {
        {
             ::KConfigBase::WriteConfigFlags*sipRes;

            sipRes = new  ::KConfigBase::WriteConfigFlags(~(*sipCpp));

            return sipConvertFromNewType(sipRes,sipType_KConfigBase_WriteConfigFlags,NULL);
        }
    }

    return 0;
}


extern "C" {static PyObject *slot_KConfigBase_WriteConfigFlags___int__(PyObject *);}
static PyObject *slot_KConfigBase_WriteConfigFlags___int__(PyObject *sipSelf)
{
     ::KConfigBase::WriteConfigFlags *sipCpp = reinterpret_cast< ::KConfigBase::WriteConfigFlags *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_KConfigBase_WriteConfigFlags));

    if (!sipCpp)
        return 0;


    {
        {
            int sipRes;

            sipRes = *sipCpp;

            return SIPLong_FromLong(sipRes);
        }
    }

    return 0;
}


/* Call the instance's destructor. */
extern "C" {static void release_KConfigBase_WriteConfigFlags(void *, int);}
static void release_KConfigBase_WriteConfigFlags(void *sipCppV, int)
{
    delete reinterpret_cast< ::KConfigBase::WriteConfigFlags *>(sipCppV);
}


extern "C" {static void assign_KConfigBase_WriteConfigFlags(void *, SIP_SSIZE_T, const void *);}
static void assign_KConfigBase_WriteConfigFlags(void *sipDst, SIP_SSIZE_T sipDstIdx, const void *sipSrc)
{
    reinterpret_cast< ::KConfigBase::WriteConfigFlags *>(sipDst)[sipDstIdx] = *reinterpret_cast<const  ::KConfigBase::WriteConfigFlags *>(sipSrc);
}


extern "C" {static void *array_KConfigBase_WriteConfigFlags(SIP_SSIZE_T);}
static void *array_KConfigBase_WriteConfigFlags(SIP_SSIZE_T sipNrElem)
{
    return new  ::KConfigBase::WriteConfigFlags[sipNrElem];
}


extern "C" {static void *copy_KConfigBase_WriteConfigFlags(const void *, SIP_SSIZE_T);}
static void *copy_KConfigBase_WriteConfigFlags(const void *sipSrc, SIP_SSIZE_T sipSrcIdx)
{
    return new  ::KConfigBase::WriteConfigFlags(reinterpret_cast<const  ::KConfigBase::WriteConfigFlags *>(sipSrc)[sipSrcIdx]);
}


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


extern "C" {static void *init_type_KConfigBase_WriteConfigFlags(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_KConfigBase_WriteConfigFlags(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::KConfigBase::WriteConfigFlags *sipCpp = 0;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            sipCpp = new  ::KConfigBase::WriteConfigFlags();

            return sipCpp;
        }
    }

    {
        int a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "i", &a0))
        {
            sipCpp = new  ::KConfigBase::WriteConfigFlags(a0);

            return sipCpp;
        }
    }

    {
        const  ::KConfigBase::WriteConfigFlags* a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J1", sipType_KConfigBase_WriteConfigFlags, &a0, &a0State))
        {
            sipCpp = new  ::KConfigBase::WriteConfigFlags(*a0);
            sipReleaseType(const_cast< ::KConfigBase::WriteConfigFlags *>(a0),sipType_KConfigBase_WriteConfigFlags,a0State);

            return sipCpp;
        }
    }

    return NULL;
}


extern "C" {static int convertTo_KConfigBase_WriteConfigFlags(PyObject *, void **, int *, PyObject *);}
static int convertTo_KConfigBase_WriteConfigFlags(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr,PyObject *sipTransferObj)
{
     ::KConfigBase::WriteConfigFlags **sipCppPtr = reinterpret_cast< ::KConfigBase::WriteConfigFlags **>(sipCppPtrV);

// Allow an instance of the base enum whenever a KConfigBase::WriteConfigFlags is expected.

if (sipIsErr == NULL)
    return (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KConfigBase_WriteConfigFlag)) ||
            sipCanConvertToType(sipPy, sipType_KConfigBase_WriteConfigFlags, SIP_NO_CONVERTORS));

if (PyObject_TypeCheck(sipPy, sipTypeAsPyTypeObject(sipType_KConfigBase_WriteConfigFlag)))
{
    *sipCppPtr = new KConfigBase::WriteConfigFlags(int(SIPLong_AsLong(sipPy)));

    return sipGetState(sipTransferObj);
}

*sipCppPtr = reinterpret_cast<KConfigBase::WriteConfigFlags *>(sipConvertToType(sipPy, sipType_KConfigBase_WriteConfigFlags, sipTransferObj, SIP_NO_CONVERTORS, 0, sipIsErr));

return 0;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_KConfigBase_WriteConfigFlags[] = {
    {(void *)slot_KConfigBase_WriteConfigFlags___hash__, hash_slot},
    {(void *)slot_KConfigBase_WriteConfigFlags___bool__, bool_slot},
    {(void *)slot_KConfigBase_WriteConfigFlags___ne__, ne_slot},
    {(void *)slot_KConfigBase_WriteConfigFlags___eq__, eq_slot},
    {(void *)slot_KConfigBase_WriteConfigFlags___ixor__, ixor_slot},
    {(void *)slot_KConfigBase_WriteConfigFlags___xor__, xor_slot},
    {(void *)slot_KConfigBase_WriteConfigFlags___ior__, ior_slot},
    {(void *)slot_KConfigBase_WriteConfigFlags___or__, or_slot},
    {(void *)slot_KConfigBase_WriteConfigFlags___iand__, iand_slot},
    {(void *)slot_KConfigBase_WriteConfigFlags___and__, and_slot},
    {(void *)slot_KConfigBase_WriteConfigFlags___invert__, invert_slot},
    {(void *)slot_KConfigBase_WriteConfigFlags___int__, int_slot},
    {0, (sipPySlotType)0}
};


static pyqt5ClassPluginDef plugin_KConfigBase_WriteConfigFlags = {
    0,
    1,
    0,
    0
};


sipClassTypeDef sipTypeDef_KConfigCore_KConfigBase_WriteConfigFlags = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KConfigBase__WriteConfigFlags,
        {0},
        &plugin_KConfigBase_WriteConfigFlags
    },
    {
        sipNameNr_WriteConfigFlags,
        {5, 255, 0},
        0, 0,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    slots_KConfigBase_WriteConfigFlags,
    init_type_KConfigBase_WriteConfigFlags,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KConfigBase_WriteConfigFlags,
    assign_KConfigBase_WriteConfigFlags,
    array_KConfigBase_WriteConfigFlags,
    copy_KConfigBase_WriteConfigFlags,
    release_KConfigBase_WriteConfigFlags,
    0,
    convertTo_KConfigBase_WriteConfigFlags,
    0,
    0,
    0,
    0,
    0
};
