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

        // forwards declarations mapped to includes
        
            
        // includes for base ecma wrapper classes
         void REcmaTransform::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

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

    
        // primary base class QTransform:
        
            QScriptValue dpt = engine.defaultPrototype(
                qMetaTypeId<QTransform*>());

            if (dpt.isValid()) {
                proto->setPrototype(dpt);
            }
          
        /*
        
        */
    

    QScriptValue fun;

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

    // destroy:
    REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
    
        // conversion for base class QTransform
        REcmaHelper::registerFunction(&engine, proto, getQTransform, "getQTransform");
        

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

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

    // properties:
    

    // methods:
    
            REcmaHelper::registerFunction(&engine, proto, translate, "translate");
            
            REcmaHelper::registerFunction(&engine, proto, scale, "scale");
            
            REcmaHelper::registerFunction(&engine, proto, rotateRadians, "rotateRadians");
            
            REcmaHelper::registerFunction(&engine, proto, rotate, "rotate");
            
            REcmaHelper::registerFunction(&engine, proto, getOps, "getOps");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RTransform*>(), *proto);

        
                engine.setDefaultPrototype(qMetaTypeId<
                RTransform
                > (), *proto);
            
    

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
    
    // static methods:
    

    // static properties:
    

    // enum values:
    

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

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

    // call C++ constructor:
    
            // copyable class:
            RTransform
                    cppResult;
                
            result = engine->newVariant(
            context->thisObject(), qVariantFromValue(cppResult));
        
    } else 

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

    // conversion functions for base classes:
     QScriptValue REcmaTransform::getQTransform(QScriptContext *context,
            QScriptEngine *engine)
        
            {
                QTransform* cppResult =
                    qscriptvalue_cast<RTransform*> (context->thisObject());
                QScriptValue result = qScriptValueFromValue(engine, cppResult);
                return result;
            }
            

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

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

        return qScriptValueFromSequence(engine, list);
    }
    

    // properties:
    

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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RTransform* self = 
                        getSelf("translate", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: qreal */
     && (
            context->argument(1).isNumber()
        ) /* type: qreal */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    qreal
                    a0 =
                    (qreal)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    qreal
                    a1 =
                    (qreal)
                    
                    context->argument( 1 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'RTransform &'
    RTransform & cppResult =
        
               self->translate(a0
        ,
    a1);
        // return type: RTransform &
                // reference
                result = engine->newVariant(
                QVariant::fromValue(&cppResult));
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RTransform* self = 
                        getSelf("scale", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: qreal */
     && (
            context->argument(1).isNumber()
        ) /* type: qreal */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    qreal
                    a0 =
                    (qreal)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    qreal
                    a1 =
                    (qreal)
                    
                    context->argument( 1 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'RTransform &'
    RTransform & cppResult =
        
               self->scale(a0
        ,
    a1);
        // return type: RTransform &
                // reference
                result = engine->newVariant(
                QVariant::fromValue(&cppResult));
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RTransform* self = 
                        getSelf("rotateRadians", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: qreal */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    qreal
                    a0 =
                    (qreal)
                    
                    context->argument( 0 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'RTransform &'
    RTransform & cppResult =
        
               self->rotateRadians(a0);
        // return type: RTransform &
                // reference
                result = engine->newVariant(
                QVariant::fromValue(&cppResult));
            
    } else


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

    // call C++ function:
    // return type 'RTransform &'
    RTransform & cppResult =
        
               self->rotateRadians(a0
        ,
    a1);
        // return type: RTransform &
                // reference
                result = engine->newVariant(
                QVariant::fromValue(&cppResult));
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RTransform* self = 
                        getSelf("rotate", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: qreal */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    qreal
                    a0 =
                    (qreal)
                    
                    context->argument( 0 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'RTransform &'
    RTransform & cppResult =
        
               self->rotate(a0);
        // return type: RTransform &
                // reference
                result = engine->newVariant(
                QVariant::fromValue(&cppResult));
            
    } else


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

    // call C++ function:
    // return type 'RTransform &'
    RTransform & cppResult =
        
               self->rotate(a0
        ,
    a1);
        // return type: RTransform &
                // reference
                result = engine->newVariant(
                QVariant::fromValue(&cppResult));
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RTransform* self = 
                        getSelf("getOps", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'QList < RTransformOp >'
    QList < RTransformOp > cppResult =
        
               self->getOps();
        // return type: QList < RTransformOp >
                // List of ...:
                result = REcmaHelper::listToScriptValue(engine, cppResult);
            
    } else


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

    RTransform* self = getSelf("toString", context);
    
    QString result;
    
            result = QString("RTransform(0x%1)").arg((unsigned long int)self, 0, 16);
        
    return QScriptValue(result);
    }
     QScriptValue REcmaTransform::copy
    (QScriptContext *context, QScriptEngine *engine)
    
    {
        RTransform cp = qscriptvalue_cast<RTransform>(context->thisObject());
        return qScriptValueFromValue(engine, cp);
    }
     QScriptValue REcmaTransform::destroy(QScriptContext *context, QScriptEngine *engine)
    
    {

        RTransform* self = getSelf("RTransform", 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();
    }
    RTransform* REcmaTransform::getSelf(const QString& fName, QScriptContext* context)
    
        {
            RTransform* 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<RTransform >(context->thisObject())
                
                ;
            //}

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

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

            return self;
            


        }
        