
// Auto generated

#ifndef QBYTEARRAY_H_WRAPPER
#define QBYTEARRAY_H_WRAPPER

// include header:
//#include "header_h.h"

#include "../RJSHelper.h"


#include "RJSWrapperObj.h"

#include <QString>

#include <QDataStream>

#include <QQmlEngine>

#include "RJSType.h"

#include <QByteArray>

// singleton class wrapper for static functions:
class QTJSAPI_EXPORT QByteArray_WrapperSingleton: public QObject {
    Q_OBJECT
    QML_INTERFACE

    // constants:


    // static properties:


public:
    //Q_INVOKABLE
    QByteArray_WrapperSingleton(RJSApi& h)
        : QObject(),
          handler(h)

    {}



    // static functions:

#ifndef QT_NO_CAST_FROM_BYTEARRAY

#endif

#if !defined(Q_CLANG_QDOC)

#else

#endif

#if !defined(QT_NO_CAST_FROM_ASCII)&&!defined(QT_RESTRICTED_CAST_FROM_ASCII)

#endif

    // Class: QByteArray
    // Function: number
    // Source:
    // Static: true
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    number
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()
          ,
        const QJSValue&
        a3
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: fromRawData
    // Source:
    // Static: true
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    fromRawData
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: fromBase64
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    fromBase64
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: fromHex
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    fromHex
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: fromPercentEncoding
    // Source:
    // Static: true
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    fromPercentEncoding
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    ;

#if defined(Q_OS_DARWIN)||defined(Q_QDOC)

#endif


private:
    RJSApi& handler;
    //static QByteArray_WrapperSingleton* _singleInstance;

    // constants:

};

// static functions implementation in singleton wrapper:

// wrapper class for QByteArray
class QTJSAPI_EXPORT QByteArray_Wrapper : public RJSWrapperObj {


    Q_OBJECT
    QML_INTERFACE


private:
    // disable copy constructor:
    QByteArray_Wrapper(const QByteArray_Wrapper&);

public:
    // initialization of QByteArray:
    static void init(RJSApi& handler);


    static QByteArray* castToBase(void* vp, /*RJSType ID*/ int t) {

        // check if pointer points to derrived type:


        // hook for modules to cast from other types to base QByteArray:
        for (int i=0; i<basecasters_QByteArray.length(); i++) {
            RJSBasecaster_QByteArray* basecaster = basecasters_QByteArray[i];
            QByteArray* ret = basecaster->castToBase(t, vp);
            if (ret!=nullptr) {
                return ret;
            }
        }

        // object is a pointer to base class QByteArray:
        if (t==RJSType_QByteArray::getIdStatic()) {
            return (QByteArray*)vp;
        }

        qWarning() << "QByteArray_Wrapper::castToBase: type not found: " << RJSHelper::getTypeName(t);

        return nullptr;

    }

    static QByteArray* getWrappedBase(RJSWrapper* wrapper) {
        int t = wrapper->getWrappedType();
        void* vp = wrapper->getWrappedVoid();
        if (vp==nullptr) {
            //qWarning() << "getWrapped_QByteArray*: wrapper wraps NULL";
        }

        QByteArray* ret = castToBase(vp, t);
        if (ret==nullptr && vp!=nullptr) {
            qWarning() << "QByteArray*_Wrapper::getWrappedBase: extracted type " << t << "from wrapper is NULL";
        }
        return ret;
    }

    /*
    // special constructor used as prototype:

          Q_INVOKABLE
          QByteArray_Wrapper(QJSEngine* e);

    */


    // special constructor to wrap existing object:

    //Q_INVOKABLE
    QByteArray_Wrapper(RJSApi& h, QByteArray* o, bool wrappedCreated);


    // destructor:

    virtual ~QByteArray_Wrapper();

    // initialization of signal forwarding

    void initConnections();


    // constructors:

    // Class: QByteArray
    // Function:
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE
    QByteArray_Wrapper

    (


        // RJSApi:
        QObject* h

        ,

        const QJSValue&
        a1
        = QJSValue()

    )

    ;

#ifndef QT_NO_CAST_FROM_BYTEARRAY

#endif

#if !defined(Q_CLANG_QDOC)

#else

#endif

#if !defined(QT_NO_CAST_FROM_ASCII)&&!defined(QT_RESTRICTED_CAST_FROM_ASCII)

#endif

#if defined(Q_OS_DARWIN)||defined(Q_QDOC)

#endif


    // non-static functions:

    // Class: QByteArray
    // Function: swap
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    swap
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: isEmpty
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isEmpty
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: resize
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    resize
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: fill
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    fill
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: capacity
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    capacity
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: reserve
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    reserve
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: squeeze
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    squeeze
    (


    )

    ;

#ifndef QT_NO_CAST_FROM_BYTEARRAY

#endif

    // Class: QByteArray
    // Function: data
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    data
    (


    )

    ;

    // Class: QByteArray
    // Function: constData
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    constData
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: detach
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    detach
    (


    )

    ;

    // Class: QByteArray
    // Function: isDetached
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isDetached
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: isSharedWith
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isSharedWith
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: clear
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    clear
    (


    )

    ;

    // Class: QByteArray
    // Function: at
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    at
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: front
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    front
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: back
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    back
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: indexOf
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    indexOf
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: lastIndexOf
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    lastIndexOf
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: contains
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    contains
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: count
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    count
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: left
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    left
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: right
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    right
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: mid
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    mid
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: first
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    first
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: last
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    last
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: sliced
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    sliced
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: chopped
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    chopped
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: startsWith
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    startsWith
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: endsWith
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    endsWith
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: isUpper
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isUpper
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: isLower
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isLower
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: truncate
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    truncate
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: chop
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    chop
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

#if !defined(Q_CLANG_QDOC)

    // Class: QByteArray
    // Function: toLower
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toLower
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: toUpper
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toUpper
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: trimmed
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    trimmed
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: simplified
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    simplified
    (


    )

    const

    ;

#else

#endif

    // Class: QByteArray
    // Function: leftJustified
    // Source:
    // Static: false
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    leftJustified
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()
          ,
        const QJSValue&
        a3
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: rightJustified
    // Source:
    // Static: false
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    rightJustified
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()
          ,
        const QJSValue&
        a3
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: prepend
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    prepend
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: append
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    append
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: insert
    // Source:
    // Static: false
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    insert
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()
          ,
        const QJSValue&
        a3
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: remove
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    remove
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: replace
    // Source:
    // Static: false
    // Parameters: 4
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    replace
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()
          ,
        const QJSValue&
        a3
        = QJSValue()
          ,
        const QJSValue&
        a4
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: split
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    split
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: repeated
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    repeated
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

#if !defined(QT_NO_CAST_FROM_ASCII)&&!defined(QT_RESTRICTED_CAST_FROM_ASCII)

#endif

    // Class: QByteArray
    // Function: toShort
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toShort
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: toUShort
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toUShort
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: toInt
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toInt
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: toUInt
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toUInt
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: toLong
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toLong
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: toULong
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toULong
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: toLongLong
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toLongLong
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: toULongLong
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toULongLong
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: toFloat
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toFloat
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: toDouble
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toDouble
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: toHex
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toHex
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QByteArray
    // Function: setNum
    // Source:
    // Static: false
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setNum
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()
          ,
        const QJSValue&
        a3
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: setRawData
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setRawData
    (


        const QJSValue&
        a1
        = QJSValue()
          ,
        const QJSValue&
        a2
        = QJSValue()

    )

    ;

#if defined(Q_OS_DARWIN)||defined(Q_QDOC)

#endif

    // Class: QByteArray
    // Function: push_back
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    push_back
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: push_front
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    push_front
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QByteArray
    // Function: shrink_to_fit
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    shrink_to_fit
    (


    )

    ;

    // Class: QByteArray
    // Function: size
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    size
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: length
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    length
    (


    )

    const

    ;

    // Class: QByteArray
    // Function: isNull
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isNull
    (


    )

    const

    ;

    // destroy function for non-copyable objects:
    Q_INVOKABLE void destr() {
        if (wrapped!=nullptr) {

            delete wrapped;

            wrapped = nullptr;
        }

    }


    //public:
    // set engine:
    //Q_INVOKABLE void setHandler(RJSApi* h) {
    //  RJSWrapperObj::setHandler(h);
    //}


    // member functions for static properties, forward to static function



    // protected overwritten functions / events and their public invokable counterparts:

public:

    // get type of wrapped object:
    Q_INVOKABLE
    virtual /*RJSType ID*/ int getWrappedType() const {
        return RJSType_QByteArray::getIdStatic();
    }

    // return true if wrapped object is owned by C++ (not deleted):
    Q_INVOKABLE
    virtual bool isCppOwnership() const {

        return false;

    }

    // get wrapped object:
    QByteArray* getWrapped() {
        if (wrapped!=nullptr) {
            return wrapped;
        }

        return nullptr;
    }

    // get wrapped object (const):
    QByteArray* getWrapped() const {
        if (wrapped!=nullptr) {
            return wrapped;
        }

        return nullptr;
    }

    // get wrapped object as void*:
    virtual void* getWrappedVoid() {
        if (wrapped!=nullptr) {
            return wrapped;
        }

        return nullptr;
    }



    bool hasWrapped() const {
        return wrapped!=nullptr

               ;
    }

    Q_INVOKABLE
    bool isNullWrapper() const {
        return !hasWrapped();
    }

    Q_INVOKABLE
    unsigned long long int getAddress() const {
        if (wrapped!=nullptr) {
            return (unsigned long long int)wrapped;
        }

        return (unsigned long long int)0;
    }



    //public slots:
    //void slotDestroyed(QObject* obj) {
    //  qDebug() << "destroying QObject:" << (long int)obj;
    //}



private:
    // wrapped object:
    QByteArray* wrapped;



    bool wrappedCreated;

private:
    // list of registered base casters for this wrapper class:
    static QList<RJSBasecaster_QByteArray*> basecasters_QByteArray;

public:
    static void registerBasecaster_QByteArray(RJSBasecaster_QByteArray* bc) {
        basecasters_QByteArray.append(bc);
    }

};

Q_DECLARE_METATYPE(QByteArray_Wrapper*)

Q_DECLARE_INTERFACE(QByteArray_Wrapper, "org.qcad.QByteArray_Wrapper")


#endif

