// ***** AUTOGENERATED CODE, DO NOT EDIT *****
            // ***** This class is not copyable.
        
        #include "REcmaUnit.h"
        #include "RMetaTypes.h"
        #include "../REcmaHelper.h"

        // forwards declarations mapped to includes
        
                #include "RDocument.h"
            
            
        // includes for base ecma wrapper classes
         void REcmaUnit::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

    bool protoCreated = false;
    if(proto == NULL){
        proto = new QScriptValue(engine.newVariant(qVariantFromValue(
                (RUnit*) 0)));
        protoCreated = true;
    }

    

    QScriptValue fun;

    // toString:
    REcmaHelper::registerFunction(&engine, proto, toString, "toString");
    

    // destroy:
    REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
    

    // get class name
    REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
    

    // conversion to all base classes (multiple inheritance):
    REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
    

    // properties:
    

    // methods:
    
        engine.setDefaultPrototype(
            qMetaTypeId<RUnit*>(), *proto);

        
    

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
    
    // static methods:
    
            REcmaHelper::registerFunction(&engine, &ctor, formatLinear, "formatLinear");
            
            REcmaHelper::registerFunction(&engine, &ctor, formatScientific, "formatScientific");
            
            REcmaHelper::registerFunction(&engine, &ctor, formatDecimal, "formatDecimal");
            
            REcmaHelper::registerFunction(&engine, &ctor, formatEngineering, "formatEngineering");
            
            REcmaHelper::registerFunction(&engine, &ctor, formatArchitectural, "formatArchitectural");
            
            REcmaHelper::registerFunction(&engine, &ctor, formatFractional, "formatFractional");
            
            REcmaHelper::registerFunction(&engine, &ctor, formatAngle, "formatAngle");
            
            REcmaHelper::registerFunction(&engine, &ctor, isMetric, "isMetric");
            
            REcmaHelper::registerFunction(&engine, &ctor, convert, "convert");
            
            REcmaHelper::registerFunction(&engine, &ctor, getFactorToM, "getFactorToM");
            
            REcmaHelper::registerFunction(&engine, &ctor, parseUnit, "parseUnit");
            
            REcmaHelper::registerFunction(&engine, &ctor, unitToSymbol, "unitToSymbol");
            
            REcmaHelper::registerFunction(&engine, &ctor, unitToName, "unitToName");
            
            REcmaHelper::registerFunction(&engine, &ctor, getLabel, "getLabel");
            
            REcmaHelper::registerFunction(&engine, &ctor, doubleToString, "doubleToString");
            
            REcmaHelper::registerFunction(&engine, &ctor, doubleToStringDec, "doubleToStringDec");
            

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RUnit",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
     QScriptValue REcmaUnit::createEcma(QScriptContext* context, QScriptEngine* engine) 
    
    {
    if (context->thisObject().strictlyEquals(
       engine->globalObject())) {
       return REcmaHelper::throwError(
       QString::fromLatin1("RUnit(): Did you forget to construct with 'new'?"),
           context);
    }

    QScriptValue result;
    
            // constructor without variants:
            
    if( context->argumentCount() ==
        0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ constructor:
    
            // non-copyable class:
            RUnit
                    * cppResult =
                    new
                    RUnit
                    ();
                
                    // TODO: triggers: Warning: QScriptEngine::newVariant(): changing class of non-QScriptObject not supported:
                    result = engine->newVariant(context->thisObject(), qVariantFromValue(cppResult));
                
    } else 

    {
       return REcmaHelper::throwError(
       QString::fromLatin1("RUnit(): no matching constructor found."),
           context);
    }
    
    return result;
    }
    

    // conversion functions for base classes:
    

    // returns class name:
     QScriptValue REcmaUnit::getClassName(QScriptContext *context, QScriptEngine *engine) 
        
    {
        return qScriptValueFromValue(engine, QString("RUnit"));
    }
    

    // returns all base classes (in case of multiple inheritance):
     QScriptValue REcmaUnit::getBaseClasses(QScriptContext *context, QScriptEngine *engine) 
        
    {
        QStringList list;
        

        return qScriptValueFromSequence(engine, list);
    }
    

    // properties:
    

    // public methods:
     QScriptValue
        REcmaUnit::formatLinear
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::formatLinear", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::formatLinear";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: RS::LinearFormat */
     && (
            context->argument(3).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::LinearFormat
                    a2 =
                    (RS::LinearFormat)
                    (int)
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a3 =
                    (int)
                    
                    context->argument( 3 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatLinear(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: RS::LinearFormat */
     && (
            context->argument(3).isNumber()
        ) /* type: int */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::LinearFormat
                    a2 =
                    (RS::LinearFormat)
                    (int)
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a3 =
                    (int)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatLinear(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: RS::LinearFormat */
     && (
            context->argument(3).isNumber()
        ) /* type: int */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::LinearFormat
                    a2 =
                    (RS::LinearFormat)
                    (int)
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a3 =
                    (int)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatLinear(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: RS::LinearFormat */
     && (
            context->argument(3).isNumber()
        ) /* type: int */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
     && (
            context->argument(6).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::LinearFormat
                    a2 =
                    (RS::LinearFormat)
                    (int)
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a3 =
                    (int)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a6 =
                    (bool)
                    
                    context->argument( 6 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatLinear(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    8 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: RS::LinearFormat */
     && (
            context->argument(3).isNumber()
        ) /* type: int */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
     && (
            context->argument(6).isBool()
        ) /* type: bool */
     && (
            context->argument(7).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::LinearFormat
                    a2 =
                    (RS::LinearFormat)
                    (int)
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a3 =
                    (int)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a6 =
                    (bool)
                    
                    context->argument( 6 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a7 =
                    (bool)
                    
                    context->argument( 7 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatLinear(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6
        ,
    a7);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    9 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: RS::LinearFormat */
     && (
            context->argument(3).isNumber()
        ) /* type: int */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
     && (
            context->argument(6).isBool()
        ) /* type: bool */
     && (
            context->argument(7).isBool()
        ) /* type: bool */
     && (
            context->argument(8).isNumber()
        ) /* type: char */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::LinearFormat
                    a2 =
                    (RS::LinearFormat)
                    (int)
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a3 =
                    (int)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a6 =
                    (bool)
                    
                    context->argument( 6 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a7 =
                    (bool)
                    
                    context->argument( 7 ).
                    toBool();
                
                    // argument isStandardType
                    char
                    a8 =
                    (char)
                    
                    context->argument( 8 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatLinear(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6
        ,
    a7
        ,
    a8);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.formatLinear().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::formatLinear", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::formatScientific
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::formatScientific", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::formatScientific";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatScientific(a0
        ,
    a1
        ,
    a2);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatScientific(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatScientific(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatScientific(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
     && (
            context->argument(6).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a6 =
                    (bool)
                    
                    context->argument( 6 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatScientific(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.formatScientific().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::formatScientific", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::formatDecimal
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::formatDecimal", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::formatDecimal";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatDecimal(a0
        ,
    a1
        ,
    a2);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatDecimal(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatDecimal(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatDecimal(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
     && (
            context->argument(6).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a6 =
                    (bool)
                    
                    context->argument( 6 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatDecimal(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    8 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
     && (
            context->argument(6).isBool()
        ) /* type: bool */
     && (
            context->argument(7).isNumber()
        ) /* type: char */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a6 =
                    (bool)
                    
                    context->argument( 6 ).
                    toBool();
                
                    // argument isStandardType
                    char
                    a7 =
                    (char)
                    
                    context->argument( 7 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatDecimal(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6
        ,
    a7);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.formatDecimal().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::formatDecimal", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::formatEngineering
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::formatEngineering", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::formatEngineering";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatEngineering(a0
        ,
    a1
        ,
    a2);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatEngineering(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatEngineering(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatEngineering(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
     && (
            context->argument(6).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a6 =
                    (bool)
                    
                    context->argument( 6 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatEngineering(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.formatEngineering().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::formatEngineering", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::formatArchitectural
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::formatArchitectural", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::formatArchitectural";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatArchitectural(a0
        ,
    a1
        ,
    a2);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatArchitectural(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatArchitectural(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatArchitectural(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
     && (
            context->argument(6).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a6 =
                    (bool)
                    
                    context->argument( 6 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatArchitectural(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.formatArchitectural().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::formatArchitectural", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::formatFractional
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::formatFractional", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::formatFractional";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatFractional(a0
        ,
    a1
        ,
    a2);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatFractional(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatFractional(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatFractional(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
     && (
            context->argument(6).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a6 =
                    (bool)
                    
                    context->argument( 6 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatFractional(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.formatFractional().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::formatFractional", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::formatAngle
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::formatAngle", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::formatAngle";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::AngleFormat */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::AngleFormat
                    a1 =
                    (RS::AngleFormat)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatAngle(a0
        ,
    a1
        ,
    a2);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::AngleFormat */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::AngleFormat
                    a1 =
                    (RS::AngleFormat)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatAngle(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::AngleFormat */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::AngleFormat
                    a1 =
                    (RS::AngleFormat)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatAngle(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::AngleFormat */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isNumber()
        ) /* type: char */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::AngleFormat
                    a1 =
                    (RS::AngleFormat)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    char
                    a5 =
                    (char)
                    
                    context->argument( 5 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       formatAngle(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.formatAngle().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::formatAngle", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::isMetric
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::isMetric", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::isMetric";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: RS::Unit */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RS::Unit
                    a0 =
                    (RS::Unit)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'bool'
    bool cppResult =
        RUnit::
       isMetric(a0);
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.isMetric().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::isMetric", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::convert
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::convert", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::convert";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: RS::Unit */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a2 =
                    (RS::Unit)
                    (int)
                    context->argument( 2 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'double'
    double cppResult =
        RUnit::
       convert(a0
        ,
    a1
        ,
    a2);
        // return type: double
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RVector */
     && (
            context->argument(1).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(2).isNumber()
        ) /* type: RS::Unit */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RVector*
                    ap0 =
                    qscriptvalue_cast<
                    RVector*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RUnit: Argument 0 is not of type RVector.",
                               context);                    
                    }
                    RVector 
                    a0 = 
                    *ap0;
                
                    // argument isStandardType
                    RS::Unit
                    a1 =
                    (RS::Unit)
                    (int)
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    RS::Unit
                    a2 =
                    (RS::Unit)
                    (int)
                    context->argument( 2 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'RVector'
    RVector cppResult =
        RUnit::
       convert(a0
        ,
    a1
        ,
    a2);
        // return type: RVector
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.convert().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::convert", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::getFactorToM
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::getFactorToM", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::getFactorToM";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: RS::Unit */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RS::Unit
                    a0 =
                    (RS::Unit)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'double'
    double cppResult =
        RUnit::
       getFactorToM(a0);
        // return type: double
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.getFactorToM().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::getFactorToM", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::parseUnit
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::parseUnit", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::parseUnit";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isString()
        ) /* type: QString */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
    // end of arguments

    // call C++ function:
    // return type 'RS::Unit'
    RS::Unit cppResult =
        RUnit::
       parseUnit(a0);
        // return type: RS::Unit
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.parseUnit().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::parseUnit", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::unitToSymbol
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::unitToSymbol", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::unitToSymbol";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: RS::Unit */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RS::Unit
                    a0 =
                    (RS::Unit)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       unitToSymbol(a0);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RS::Unit
                    a0 =
                    (RS::Unit)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       unitToSymbol(a0
        ,
    a1);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.unitToSymbol().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::unitToSymbol", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::unitToName
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::unitToName", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::unitToName";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: RS::Unit */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RS::Unit
                    a0 =
                    (RS::Unit)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       unitToName(a0);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RS::Unit
                    a0 =
                    (RS::Unit)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       unitToName(a0
        ,
    a1);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.unitToName().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::unitToName", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::getLabel
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::getLabel", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::getLabel";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RDocument */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is reference
                    RDocument*
                    ap1 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RUnit: Argument 1 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a1 = *ap1;
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       getLabel(a0
        ,
    a1);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RDocument */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is reference
                    RDocument*
                    ap1 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RUnit: Argument 1 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a1 = *ap1;
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       getLabel(a0
        ,
    a1
        ,
    a2);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RDocument */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is reference
                    RDocument*
                    ap1 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RUnit: Argument 1 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a1 = *ap1;
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       getLabel(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RDocument */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is reference
                    RDocument*
                    ap1 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RUnit: Argument 1 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a1 = *ap1;
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       getLabel(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RDocument */
     && (
            context->argument(2).isNumber()
        ) /* type: int */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isNumber()
        ) /* type: char */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is reference
                    RDocument*
                    ap1 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RUnit: Argument 1 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a1 = *ap1;
                
                    // argument isStandardType
                    int
                    a2 =
                    (int)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    char
                    a5 =
                    (char)
                    
                    context->argument( 5 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       getLabel(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.getLabel().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::getLabel", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::doubleToString
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::doubleToString", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::doubleToString";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: double */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a1 =
                    (double)
                    
                    context->argument( 1 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToString(a0
        ,
    a1);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: double */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a1 =
                    (double)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToString(a0
        ,
    a1
        ,
    a2);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: double */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a1 =
                    (double)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToString(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: double */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isNumber()
        ) /* type: char */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a1 =
                    (double)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    char
                    a4 =
                    (char)
                    
                    context->argument( 4 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToString(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a1 =
                    (int)
                    
                    context->argument( 1 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToString(a0
        ,
    a1);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: int */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a1 =
                    (int)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToString(a0
        ,
    a1
        ,
    a2);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: int */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a1 =
                    (int)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToString(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: int */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isNumber()
        ) /* type: char */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a1 =
                    (int)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    char
                    a4 =
                    (char)
                    
                    context->argument( 4 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToString(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.doubleToString().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::doubleToString", context, engine);
            return result;
        }
         QScriptValue
        REcmaUnit::doubleToStringDec
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaUnit::doubleToStringDec", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaUnit::doubleToStringDec";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: int */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a1 =
                    (int)
                    
                    context->argument( 1 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToStringDec(a0
        ,
    a1);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: int */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a1 =
                    (int)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToStringDec(a0
        ,
    a1
        ,
    a2);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: int */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a1 =
                    (int)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToStringDec(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: int */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isNumber()
        ) /* type: char */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a1 =
                    (int)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    char
                    a4 =
                    (char)
                    
                    context->argument( 4 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RUnit::
       doubleToStringDec(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RUnit.doubleToStringDec().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaUnit::doubleToStringDec", context, engine);
            return result;
        }
         QScriptValue REcmaUnit::toString
    (QScriptContext *context, QScriptEngine *engine)
    
    {

    RUnit* self = getSelf("toString", context);
    
    QString result;
    
            result = QString("RUnit(0x%1)").arg((unsigned long int)self, 0, 16);
        
    return QScriptValue(result);
    }
     QScriptValue REcmaUnit::destroy(QScriptContext *context, QScriptEngine *engine)
    
    {

        RUnit* self = getSelf("RUnit", context);
        //Q_ASSERT(self!=NULL);
        if (self==NULL) {
            return REcmaHelper::throwError("self is NULL", context);
        }
        
    
        delete self;
        context->thisObject().setData(engine->nullValue());
        context->thisObject().prototype().setData(engine->nullValue());
        context->thisObject().setPrototype(engine->nullValue());
        context->thisObject().setScriptClass(NULL);
        return engine->undefinedValue();
    }
    RUnit* REcmaUnit::getSelf(const QString& fName, QScriptContext* context)
    
        {
            RUnit* self = NULL;

            
                // self could be a normal object (e.g. from an UI file) or
                // an ECMA shell object (made from an ECMA script):
                //self = getSelfShell(fName, context);
                

            //if (self==NULL) {
                self = REcmaHelper::scriptValueTo<RUnit >(context->thisObject())
                
                ;
            //}

            if (self == NULL){
                // avoid recursion (toString is used by the backtrace):
                if (fName!="toString") {
                    REcmaHelper::throwError(QString("RUnit.%1(): "
                        "This object is not a RUnit").arg(fName),
                        context);
                }
                return NULL;
            }

            return self;
        }
        RUnit* REcmaUnit::getSelfShell(const QString& fName, QScriptContext* context)
    
        {
          RUnit* selfBase = getSelf(fName, context);
                RUnit* self = dynamic_cast<RUnit*>(selfBase);
                //return REcmaHelper::scriptValueTo<RUnit >(context->thisObject());
            if(self == NULL){
                REcmaHelper::throwError(QString("RUnit.%1(): "
                    "This object is not a RUnit").arg(fName),
                    context);
            }

            return self;
            


        }
        