
// Auto generated

#ifndef QFILE_H_WRAPPER
#define QFILE_H_WRAPPER

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

#include "../RJSHelper.h"


#include "RJSWrapperObj.h"

#include <QTemporaryFile>

#include <QQmlEngine>

#include "RJSType.h"

#include <QFile>

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

    // constants:


    // static properties:


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

    {}



    // static functions:

#ifndef QT_NO_QOBJECT

#endif

#ifndef QT_NO_QOBJECT

#endif

#if defined(Q_OS_DARWIN)

#else

#endif

    // Class: QFile
    // Function: exists
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    exists
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: remove
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    remove
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: rename
    // Source:
    // Static: true
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    rename
    (


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

    )

    ;

    // Class: QFile
    // Function: link
    // Source:
    // Static: true
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    link
    (


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

    )

    ;

    // Class: QFile
    // Function: copy
    // Source:
    // Static: true
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    copy
    (


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

    )

    ;

#ifdef QT_NO_QOBJECT

#else

#endif


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

    // constants:

};

// static functions implementation in singleton wrapper:

// wrapper class for QFile
class QTJSAPI_EXPORT QFile_Wrapper : public RJSWrapperObj {


    Q_OBJECT
    QML_INTERFACE


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

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


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

        // check if pointer points to derrived type:


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

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

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

        return nullptr;

    }

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

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

    /*
    // special constructor used as prototype:

          Q_INVOKABLE
          QFile_Wrapper(QJSEngine* e);

    */


    // special constructor to wrap existing object:

    //Q_INVOKABLE
    QFile_Wrapper(RJSApi& h, QFile* o, bool wrappedCreated);


    // destructor:

    virtual ~QFile_Wrapper();

    // initialization of signal forwarding

    void initConnections();


    // constructors:

#ifndef QT_NO_QOBJECT

#endif

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

public:
    Q_INVOKABLE
    QFile_Wrapper

    (


        // RJSApi:
        QObject* h

        ,

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

    )

    ;

#ifndef QT_NO_QOBJECT

#endif

#if defined(Q_OS_DARWIN)

#else

#endif

#ifdef QT_NO_QOBJECT

#else

#endif


    // non-static functions:

    // Class: QFile
    // Function: error
    // Source: QFileDevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    error
    (


    )

    const

    ;

    // Class: QFile
    // Function: unsetError
    // Source: QFileDevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    unsetError
    (


    )

    ;

    // Class: QFile
    // Function: handle
    // Source: QFileDevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    handle
    (


    )

    const

    ;

    // Class: QFile
    // Function: flush
    // Source: QFileDevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    flush
    (


    )

    ;

    // Class: QFile
    // Function: fileTime
    // Source: QFileDevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    fileTime
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QFile
    // Function: setFileTime
    // Source: QFileDevice
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setFileTime
    (


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

    )

    ;

    // Class: QFile
    // Function: openMode
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    openMode
    (


    )

    const

    ;

    // Class: QFile
    // Function: setTextModeEnabled
    // Source: QIODevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setTextModeEnabled
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: isTextModeEnabled
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isTextModeEnabled
    (


    )

    const

    ;

    // Class: QFile
    // Function: isOpen
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isOpen
    (


    )

    const

    ;

    // Class: QFile
    // Function: isReadable
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isReadable
    (


    )

    const

    ;

    // Class: QFile
    // Function: isWritable
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isWritable
    (


    )

    const

    ;

    // Class: QFile
    // Function: isSequential
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isSequential
    (


    )

    const

    ;

    // Class: QFile
    // Function: readChannelCount
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    readChannelCount
    (


    )

    const

    ;

    // Class: QFile
    // Function: writeChannelCount
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    writeChannelCount
    (


    )

    const

    ;

    // Class: QFile
    // Function: currentReadChannel
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    currentReadChannel
    (


    )

    const

    ;

    // Class: QFile
    // Function: setCurrentReadChannel
    // Source: QIODevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setCurrentReadChannel
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: currentWriteChannel
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    currentWriteChannel
    (


    )

    const

    ;

    // Class: QFile
    // Function: setCurrentWriteChannel
    // Source: QIODevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setCurrentWriteChannel
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: close
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    close
    (


    )

    ;

    // Class: QFile
    // Function: pos
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    pos
    (


    )

    const

    ;

    // Class: QFile
    // Function: seek
    // Source: QIODevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    seek
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: atEnd
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    atEnd
    (


    )

    const

    ;

    // Class: QFile
    // Function: reset
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    reset
    (


    )

    ;

    // Class: QFile
    // Function: bytesAvailable
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    bytesAvailable
    (


    )

    const

    ;

    // Class: QFile
    // Function: bytesToWrite
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    bytesToWrite
    (


    )

    const

    ;

    // Class: QFile
    // Function: readAll
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    readAll
    (


    )

    ;

    // Class: QFile
    // Function: canReadLine
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    canReadLine
    (


    )

    const

    ;

    // Class: QFile
    // Function: startTransaction
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    startTransaction
    (


    )

    ;

    // Class: QFile
    // Function: commitTransaction
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    commitTransaction
    (


    )

    ;

    // Class: QFile
    // Function: rollbackTransaction
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    rollbackTransaction
    (


    )

    ;

    // Class: QFile
    // Function: isTransactionStarted
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isTransactionStarted
    (


    )

    const

    ;

    // Class: QFile
    // Function: write
    // Source: QIODevice
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    write
    (


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

    )

    ;

    // Class: QFile
    // Function: skip
    // Source: QIODevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    skip
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: waitForReadyRead
    // Source: QIODevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    waitForReadyRead
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: waitForBytesWritten
    // Source: QIODevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    waitForBytesWritten
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: ungetChar
    // Source: QIODevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    ungetChar
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: putChar
    // Source: QIODevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    putChar
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: errorString
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    errorString
    (


    )

    const

    ;

    // Class: QFile
    // Function: readyRead
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

    // signal forwarded from wrapped class:
signals:
    void readyRead(

    );

    // called when signal is emitted from wrapped class:
public slots:
    void readyReadEmitter(

    );

    // Class: QFile
    // Function: channelReadyRead
    // Source: QIODevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

    // signal forwarded from wrapped class:
signals:
    void channelReadyRead(

        const QJSValue&
        a1
    );

    // called when signal is emitted from wrapped class:
public slots:
    void channelReadyReadEmitter(
        int channel
    );

    // Class: QFile
    // Function: bytesWritten
    // Source: QIODevice
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

    // signal forwarded from wrapped class:
signals:
    void bytesWritten(

        const QJSValue&
        a1
    );

    // called when signal is emitted from wrapped class:
public slots:
    void bytesWrittenEmitter(
        qint64 bytes
    );

    // Class: QFile
    // Function: channelBytesWritten
    // Source: QIODevice
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

    // signal forwarded from wrapped class:
signals:
    void channelBytesWritten(

        const QJSValue&
        a1,
        const QJSValue&
        a2
    );

    // called when signal is emitted from wrapped class:
public slots:
    void channelBytesWrittenEmitter(
        int channel, qint64 bytes
    );

    // Class: QFile
    // Function: aboutToClose
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

    // signal forwarded from wrapped class:
signals:
    void aboutToClose(

    );

    // called when signal is emitted from wrapped class:
public slots:
    void aboutToCloseEmitter(

    );

    // Class: QFile
    // Function: readChannelFinished
    // Source: QIODevice
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

    // signal forwarded from wrapped class:
signals:
    void readChannelFinished(

    );

    // called when signal is emitted from wrapped class:
public slots:
    void readChannelFinishedEmitter(

    );

#ifndef QT_NO_QOBJECT

#endif

#ifndef QT_NO_QOBJECT

#endif

    // Class: QFile
    // Function: fileName
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    fileName
    (


    )

    const

    ;

    // Class: QFile
    // Function: setFileName
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setFileName
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

#if defined(Q_OS_DARWIN)

#else

#endif

    // Class: QFile
    // Function: exists
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: 1

public:
    Q_INVOKABLE

    QJSValue
    exists
    (


    )

    const

    ;

    // Class: QFile
    // Function: symLinkTarget
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    symLinkTarget
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: remove
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: 1

public:
    Q_INVOKABLE

    QJSValue
    remove
    (


    )

    ;

    // Class: QFile
    // Function: rename
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: 2

public:
    Q_INVOKABLE

    QJSValue
    rename
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: link
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: 2

public:
    Q_INVOKABLE

    QJSValue
    link
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: copy
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: 2

public:
    Q_INVOKABLE

    QJSValue
    copy
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: open
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    open
    (


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

    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    size
    (


    )

    const

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    resize
    (


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

    )

    ;

    // Class: QFile
    // Function: permissions
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    permissions
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QFile
    // Function: setPermissions
    // Source:
    // Static: false
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setPermissions
    (


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

    )

    ;

#ifdef QT_NO_QOBJECT

#else

#endif

    // 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_QFile::getIdStatic();
    }

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

        return true;

    }

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

        return nullptr;
    }

    // get wrapped object (const):
    QFile* 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:
    QFile* wrapped;



    bool wrappedCreated;

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

public:
    static void registerBasecaster_QFile(RJSBasecaster_QFile* bc) {
        basecasters_QFile.append(bc);
    }

};

Q_DECLARE_METATYPE(QFile_Wrapper*)

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


#endif

