
// Auto generated

#ifndef QDIR_H_WRAPPER
#define QDIR_H_WRAPPER

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

#include "../RJSHelper.h"


#include "RJSWrapperObj.h"

#include <QDirIterator>

#include <QDebug>

#include <QQmlEngine>

#include "RJSType.h"

#include <QDir>

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

    // constants:


    // static properties:


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

    {}



    // static functions:

    // Class: QDir
    // Function: setSearchPaths
    // Source:
    // Static: true
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setSearchPaths
    (


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

    )

    ;

    // Class: QDir
    // Function: addSearchPath
    // Source:
    // Static: true
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    addSearchPath
    (


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

    )

    ;

    // Class: QDir
    // Function: searchPaths
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    searchPaths
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: toNativeSeparators
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    toNativeSeparators
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: fromNativeSeparators
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    fromNativeSeparators
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: nameFiltersFromString
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    nameFiltersFromString
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: isRelativePath
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isRelativePath
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: isAbsolutePath
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isAbsolutePath
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: drives
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    drives
    (


    )

    ;

    // Class: QDir
    // Function: listSeparator
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    listSeparator
    (


    )

    ;

    // Class: QDir
    // Function: separator
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    separator
    (


    )

    ;

    // Class: QDir
    // Function: setCurrent
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setCurrent
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: current
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    current
    (


    )

    ;

    // Class: QDir
    // Function: currentPath
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    currentPath
    (


    )

    ;

    // Class: QDir
    // Function: home
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    home
    (


    )

    ;

    // Class: QDir
    // Function: homePath
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    homePath
    (


    )

    ;

    // Class: QDir
    // Function: root
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    root
    (


    )

    ;

    // Class: QDir
    // Function: rootPath
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    rootPath
    (


    )

    ;

    // Class: QDir
    // Function: temp
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    temp
    (


    )

    ;

    // Class: QDir
    // Function: tempPath
    // Source:
    // Static: true
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    tempPath
    (


    )

    ;

#if QT_CONFIG(regularexpression)

    // Class: QDir
    // Function: match
    // Source:
    // Static: true
    // Parameters: 2
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    match
    (


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

    )

    ;

#endif

    // Class: QDir
    // Function: cleanPath
    // Source:
    // Static: true
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    cleanPath
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;


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

    // constants:

};

// static functions implementation in singleton wrapper:

// wrapper class for QDir
class QTJSAPI_EXPORT QDir_Wrapper : public RJSWrapperObj {


    Q_OBJECT
    QML_INTERFACE


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

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


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

        // check if pointer points to derrived type:


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

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

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

        return nullptr;

    }

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

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

    // enums:

    enum Filter {
        Dirs = QDir::Dirs,
        Files = QDir::Files,
        Drives = QDir::Drives,
        NoSymLinks = QDir::NoSymLinks,
        AllEntries = QDir::AllEntries,
        TypeMask = QDir::TypeMask,
        Readable = QDir::Readable,
        Writable = QDir::Writable,
        Executable = QDir::Executable,
        PermissionMask = QDir::PermissionMask,
        Modified = QDir::Modified,
        Hidden = QDir::Hidden,
        System = QDir::System,
        AccessMask = QDir::AccessMask,
        AllDirs = QDir::AllDirs,
        CaseSensitive = QDir::CaseSensitive,
        NoDot = QDir::NoDot,
        NoDotDot = QDir::NoDotDot,
        NoDotAndDotDot = QDir::NoDotAndDotDot,
        NoFilter = QDir::NoFilter,

    };
    Q_ENUM(Filter)

    enum SortFlag {
        Name = QDir::Name,
        Time = QDir::Time,
        Size = QDir::Size,
        Unsorted = QDir::Unsorted,
        SortByMask = QDir::SortByMask,
        DirsFirst = QDir::DirsFirst,
        Reversed = QDir::Reversed,
        IgnoreCase = QDir::IgnoreCase,
        DirsLast = QDir::DirsLast,
        LocaleAware = QDir::LocaleAware,
        Type = QDir::Type,
        NoSort = QDir::NoSort,

    };
    Q_ENUM(SortFlag)

    /*
    // special constructor used as prototype:

          Q_INVOKABLE
          QDir_Wrapper(QJSEngine* e);

    */


    // special constructor to wrap existing object:

    //Q_INVOKABLE
    QDir_Wrapper(RJSApi& h, QDir* o, bool wrappedCreated);


    // destructor:

    virtual ~QDir_Wrapper();

    // initialization of signal forwarding

    void initConnections();


    // constructors:

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

public:
    Q_INVOKABLE
    QDir_Wrapper

    (


        // RJSApi:
        QObject* h

        ,

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

    )

    ;

#if QT_CONFIG(regularexpression)

#endif


    // non-static functions:

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

public:
    Q_INVOKABLE

    QJSValue
    swap
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: setPath
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setPath
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: path
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    path
    (


    )

    const

    ;

    // Class: QDir
    // Function: absolutePath
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    absolutePath
    (


    )

    const

    ;

    // Class: QDir
    // Function: canonicalPath
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    canonicalPath
    (


    )

    const

    ;

    // Class: QDir
    // Function: dirName
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    dirName
    (


    )

    const

    ;

    // Class: QDir
    // Function: filePath
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    filePath
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QDir
    // Function: absoluteFilePath
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    absoluteFilePath
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QDir
    // Function: relativeFilePath
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    relativeFilePath
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QDir
    // Function: cd
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    cd
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: cdUp
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    cdUp
    (


    )

    ;

    // Class: QDir
    // Function: nameFilters
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    nameFilters
    (


    )

    const

    ;

    // Class: QDir
    // Function: setNameFilters
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setNameFilters
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: filter
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    filter
    (


    )

    const

    ;

    // Class: QDir
    // Function: setFilter
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setFilter
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

    // Class: QDir
    // Function: sorting
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    sorting
    (


    )

    const

    ;

    // Class: QDir
    // Function: setSorting
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    setSorting
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    count
    (


    )

    const

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    isEmpty
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QDir
    // Function: entryList
    // Source:
    // Static: false
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    entryList
    (


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

    )

    const

    ;

    // Class: QDir
    // Function: entryInfoList
    // Source:
    // Static: false
    // Parameters: 3
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    entryInfoList
    (


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

    )

    const

    ;

    // Class: QDir
    // Function: mkdir
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    mkdir
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QDir
    // Function: rmdir
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    rmdir
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QDir
    // Function: mkpath
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    mkpath
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QDir
    // Function: rmpath
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    rmpath
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QDir
    // Function: removeRecursively
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    removeRecursively
    (


    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    isReadable
    (


    )

    const

    ;

    // Class: QDir
    // Function: exists
    // Source:
    // Static: false
    // Parameters: 1
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    exists
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    const

    ;

    // Class: QDir
    // Function: isRoot
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isRoot
    (


    )

    const

    ;

    // Class: QDir
    // Function: isRelative
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isRelative
    (


    )

    const

    ;

    // Class: QDir
    // Function: isAbsolute
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    isAbsolute
    (


    )

    const

    ;

    // Class: QDir
    // Function: makeAbsolute
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    makeAbsolute
    (


    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    remove
    (


        const QJSValue&
        a1
        = QJSValue()

    )

    ;

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

public:
    Q_INVOKABLE

    QJSValue
    rename
    (


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

    )

    ;

#if QT_CONFIG(regularexpression)

#endif

    // Class: QDir
    // Function: refresh
    // Source:
    // Static: false
    // Parameters: 0
    // preceding Parameters: -1

public:
    Q_INVOKABLE

    QJSValue
    refresh
    (


    )

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

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

        return false;

    }

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

        return nullptr;
    }

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



    bool wrappedCreated;

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

public:
    static void registerBasecaster_QDir(RJSBasecaster_QDir* bc) {
        basecasters_QDir.append(bc);
    }

};

Q_DECLARE_METATYPE(QDir_Wrapper*)

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


#endif

