#ifndef SBK_TAGATTRIBUTEWRAPPER_H
#define SBK_TAGATTRIBUTEWRAPPER_H

// Workaround to access protected functions
#ifndef protected
#  define protected public
#endif

#include <tagattribute.h>

#include <sbkpython.h>

#include <array>
namespace Shiboken { struct AutoDecRef; class GilState; }

class TagAttributeWrapper : public Akonadi::TagAttribute
{
public:
    TagAttributeWrapper();
    TagAttributeWrapper(const TagAttributeWrapper &) = delete;
    TagAttributeWrapper& operator=(const TagAttributeWrapper &) = delete;
    TagAttributeWrapper(TagAttributeWrapper &&) = delete;
    TagAttributeWrapper& operator=(TagAttributeWrapper &&) = delete;
    ~TagAttributeWrapper() override;

    ::Akonadi::TagAttribute * clone() const override;
    static ::Akonadi::TagAttribute * sbk_o_clone([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride);
    void deserialize(const ::QByteArray & data) override;
    ::QByteArray serialized() const override;
    ::QByteArray type() const override;
    static void pysideInitQtMetaTypes();

    void resetPyMethodCache();

private:
    mutable std::array<PyObject *, 4> m_PyMethodCache = {nullptr, nullptr, nullptr, nullptr};
};

#endif // SBK_TAGATTRIBUTEWRAPPER_H
