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

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

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

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

            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 QColor
        REcmaHelper::registerFunction(&engine, proto, getQColor, "getQColor");
        

    // 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, getCustomColorCode, "getCustomColorCode");
            
            REcmaHelper::registerFunction(&engine, proto, getColorIndex, "getColorIndex");
            
            REcmaHelper::registerFunction(&engine, proto, getHash, "getHash");
            
            REcmaHelper::registerFunction(&engine, proto, isValid, "isValid");
            
            REcmaHelper::registerFunction(&engine, proto, getName, "getName");
            
            REcmaHelper::registerFunction(&engine, proto, isByLayer, "isByLayer");
            
            REcmaHelper::registerFunction(&engine, proto, isByBlock, "isByBlock");
            
            REcmaHelper::registerFunction(&engine, proto, isFixed, "isFixed");
            
            REcmaHelper::registerFunction(&engine, proto, toCompat, "toCompat");
            
            REcmaHelper::registerFunction(&engine, proto, setCompat, "setCompat");
            
            REcmaHelper::registerFunction(&engine, proto, equals, "equals");
            
            REcmaHelper::registerFunction(&engine, proto, operator_not_assign, "operator_not_assign");
            
            REcmaHelper::registerFunction(&engine, proto, operator_less, "operator_less");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RColor*>(), *proto);

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

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
    
    // static methods:
    
            REcmaHelper::registerFunction(&engine, &ctor, removeColor, "removeColor");
            
            REcmaHelper::registerFunction(&engine, &ctor, addColor, "addColor");
            
            REcmaHelper::registerFunction(&engine, &ctor, createFromCadIndex, "createFromCadIndex");
            
            REcmaHelper::registerFunction(&engine, &ctor, createFromCadCustom, "createFromCadCustom");
            
            REcmaHelper::registerFunction(&engine, &ctor, createFromName, "createFromName");
            
            REcmaHelper::registerFunction(&engine, &ctor, getList, "getList");
            
            REcmaHelper::registerFunction(&engine, &ctor, getIcon, "getIcon");
            
            REcmaHelper::registerFunction(&engine, &ctor, getHighlighted, "getHighlighted");
            
            REcmaHelper::registerFunction(&engine, &ctor, getFaded, "getFaded");
            
            REcmaHelper::registerFunction(&engine, &ctor, reinit, "reinit");
            

    // static properties:
    
            ctor.setProperty("CompatByLayer",
                qScriptValueFromValue(&engine, RColor::CompatByLayer),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("CompatByBlock",
                qScriptValueFromValue(&engine, RColor::CompatByBlock),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            

    // enum values:
    

    ctor.setProperty("ByLayer",
    QScriptValue(RColor::ByLayer),
    QScriptValue::ReadOnly);


    ctor.setProperty("ByBlock",
    QScriptValue(RColor::ByBlock),
    QScriptValue::ReadOnly);


    ctor.setProperty("Fixed",
    QScriptValue(RColor::Fixed),
    QScriptValue::ReadOnly);


    // enum conversions:
    
    qScriptRegisterMetaType<RColor::Mode>(
        &engine,
        toScriptValueEnumMode,
        fromScriptValueEnumMode,
        ctor.property(QString::fromLatin1("prototype"))
    );

        
    // init class:
    engine.globalObject().setProperty("RColor",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
     QScriptValue REcmaColor::createEcma(QScriptContext* context, QScriptEngine* engine) 
    
    {
    if (context->thisObject().strictlyEquals(
       engine->globalObject())) {
       return REcmaHelper::throwError(
       QString::fromLatin1("RColor(): 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:
            RColor
                    cppResult;
                
            result = engine->newVariant(
            context->thisObject(), qVariantFromValue(cppResult));
        
    } else 

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

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

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

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

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

    // call C++ constructor:
    
            // copyable class:
            RColor
                    cppResult(
                    a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
                    );
                
            result = engine->newVariant(
            context->thisObject(), qVariantFromValue(cppResult));
        
    } else 

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

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

    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++ constructor:
    
            // copyable class:
            RColor
                    cppResult(
                    a0
                    );
                
            result = engine->newVariant(
            context->thisObject(), qVariantFromValue(cppResult));
        
    } else 

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

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

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

    // conversion functions for base classes:
     QScriptValue REcmaColor::getQColor(QScriptContext *context,
            QScriptEngine *engine)
        
            {
                QColor* cppResult =
                    qscriptvalue_cast<RColor*> (context->thisObject());
                QScriptValue result = qScriptValueFromValue(engine, cppResult);
                return result;
            }
            

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

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

        return qScriptValueFromSequence(engine, list);
    }
    

    // properties:
    

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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColor* self = 
                        getSelf("getCustomColorCode", 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 'int'
    int cppResult =
        
               self->getCustomColorCode();
        // return type: int
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColor* self = 
                        getSelf("getColorIndex", 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 'int'
    int cppResult =
        
               self->getColorIndex();
        // return type: int
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RColor.getColorIndex().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaColor::getColorIndex", context, engine);
            return result;
        }
         QScriptValue
        REcmaColor::removeColor
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaColor::removeColor", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaColor::removeColor";
            //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 'void'
    RColor::
       removeColor(a0);
    } else


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

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isString()
        ) /* type: QString */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RColor */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap1 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if (ap1 == NULL) {
                           return REcmaHelper::throwError("RColor: Argument 1 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a1 = 
                    *ap1;
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    RColor::
       addColor(a0
        ,
    a1);
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RColor.addColor().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaColor::addColor", context, engine);
            return result;
        }
         QScriptValue
        REcmaColor::createFromCadIndex
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaColor::createFromCadIndex", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaColor::createFromCadIndex";
            //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 'RColor'
    RColor cppResult =
        RColor::
       createFromCadIndex(a0);
        // return type: RColor
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

    // call C++ function:
    // return type 'RColor'
    RColor cppResult =
        RColor::
       createFromCadIndex(a0);
        // return type: RColor
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RColor.createFromCadIndex().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaColor::createFromCadIndex", context, engine);
            return result;
        }
         QScriptValue
        REcmaColor::createFromCadCustom
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaColor::createFromCadCustom", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaColor::createFromCadCustom";
            //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 'RColor'
    RColor cppResult =
        RColor::
       createFromCadCustom(a0);
        // return type: RColor
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

    // call C++ function:
    // return type 'RColor'
    RColor cppResult =
        RColor::
       createFromCadCustom(a0);
        // return type: RColor
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RColor.createFromCadCustom().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaColor::createFromCadCustom", context, engine);
            return result;
        }
         QScriptValue
        REcmaColor::createFromName
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaColor::createFromName", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaColor::createFromName";
            //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 'RColor'
    RColor cppResult =
        RColor::
       createFromName(a0);
        // return type: RColor
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'QList < QPair < QString , RColor > >'
    QList < QPair < QString , RColor > > cppResult =
        RColor::
       getList();
        // return type: QList < QPair < QString , RColor > >
                // List of Pairs of ...:
                result = REcmaHelper::pairListToScriptValue(engine, cppResult);
            
    } else


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

    // call C++ function:
    // return type 'QList < QPair < QString , RColor > >'
    QList < QPair < QString , RColor > > cppResult =
        RColor::
       getList(a0);
        // return type: QList < QPair < QString , RColor > >
                // List of Pairs of ...:
                result = REcmaHelper::pairListToScriptValue(engine, cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RColor */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap0 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RColor: Argument 0 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a0 = 
                    *ap0;
                
    // end of arguments

    // call C++ function:
    // return type 'QIcon'
    QIcon cppResult =
        RColor::
       getIcon(a0);
        // return type: QIcon
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RColor */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: QSize */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap0 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RColor: Argument 0 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a0 = 
                    *ap0;
                
                    // argument is reference
                    QSize*
                    ap1 =
                    qscriptvalue_cast<
                    QSize*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RColor: Argument 1 is not of type QSize*.",
                               context);                    
                    }
                    QSize& a1 = *ap1;
                
    // end of arguments

    // call C++ function:
    // return type 'QIcon'
    QIcon cppResult =
        RColor::
       getIcon(a0
        ,
    a1);
        // return type: QIcon
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColor* self = 
                        getSelf("getHash", 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 'long'
    long cppResult =
        
               self->getHash();
        // return type: long
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColor* self = 
                        getSelf("isValid", 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 'bool'
    bool cppResult =
        
               self->isValid();
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColor* self = 
                        getSelf("getName", 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 'QString'
    QString cppResult =
        
               self->getName();
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColor* self = 
                        getSelf("isByLayer", 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 'bool'
    bool cppResult =
        
               self->isByLayer();
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColor* self = 
                        getSelf("isByBlock", 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 'bool'
    bool cppResult =
        
               self->isByBlock();
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColor* self = 
                        getSelf("isFixed", 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 'bool'
    bool cppResult =
        
               self->isFixed();
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RColor* self = 
                        getSelf("toCompat", 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 'QColor'
    QColor cppResult =
        
               self->toCompat();
        // return type: QColor
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant()
        ) /* type: QColor */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    QColor*
                    ap0 =
                    qscriptvalue_cast<
                    QColor*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RColor: Argument 0 is not of type QColor.",
                               context);                    
                    }
                    QColor 
                    a0 = 
                    *ap0;
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->setCompat(a0);
    } else


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

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RColor */
     && (
            context->argument(1).isVariant()
        ) /* type: QColor */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap0 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RColor: Argument 0 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a0 = 
                    *ap0;
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    QColor*
                    ap1 =
                    qscriptvalue_cast<
                    QColor*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if (ap1 == NULL) {
                           return REcmaHelper::throwError("RColor: Argument 1 is not of type QColor.",
                               context);                    
                    }
                    QColor 
                    a1 = 
                    *ap1;
                
    // end of arguments

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


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

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


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

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RColor */
     && (
            context->argument(1).isVariant()
        ) /* type: QColor */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap0 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RColor: Argument 0 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a0 = 
                    *ap0;
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    QColor*
                    ap1 =
                    qscriptvalue_cast<
                    QColor*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if (ap1 == NULL) {
                           return REcmaHelper::throwError("RColor: Argument 1 is not of type QColor.",
                               context);                    
                    }
                    QColor 
                    a1 = 
                    *ap1;
                
    // end of arguments

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


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

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


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RColor.getFaded().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaColor::getFaded", context, engine);
            return result;
        }
         QScriptValue
        REcmaColor::equals
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaColor::operator==", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaColor::operator==";
            //QCoreApplication::processEvents();

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RColor */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap0 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RColor: Argument 0 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a0 = 
                    *ap0;
                
    // end of arguments

    // call C++ function:
    // return type 'bool'
    bool cppResult =
        
               self->operator==(a0);
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RColor.equals().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaColor::operator==", context, engine);
            return result;
        }
         QScriptValue
        REcmaColor::operator_not_assign
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaColor::operator!=", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaColor::operator!=";
            //QCoreApplication::processEvents();

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RColor */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap0 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RColor: Argument 0 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a0 = 
                    *ap0;
                
    // end of arguments

    // call C++ function:
    // return type 'bool'
    bool cppResult =
        
               self->operator!=(a0);
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RColor.operator_not_assign().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaColor::operator!=", context, engine);
            return result;
        }
         QScriptValue
        REcmaColor::operator_less
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaColor::operator<", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaColor::operator<";
            //QCoreApplication::processEvents();

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RColor */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap0 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RColor: Argument 0 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a0 = 
                    *ap0;
                
    // end of arguments

    // call C++ function:
    // return type 'bool'
    bool cppResult =
        
               self->operator<(a0);
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RColor.operator_less().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaColor::operator<", context, engine);
            return result;
        }
         QScriptValue
        REcmaColor::reinit
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaColor::reinit", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaColor::reinit";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'void'
    RColor::
       reinit();
    } else


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

    RColor* self = getSelf("toString", context);
    
    QString result;
    
            QDebug d(&result);
            if (self!=NULL) {
                d << *self;
            }
            else {
                d << "NULL";
            }
        
    return QScriptValue(result);
    }
     QScriptValue REcmaColor::copy
    (QScriptContext *context, QScriptEngine *engine)
    
    {
        RColor cp = qscriptvalue_cast<RColor>(context->thisObject());
        return qScriptValueFromValue(engine, cp);
    }
     QScriptValue REcmaColor::destroy(QScriptContext *context, QScriptEngine *engine)
    
    {

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

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

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

            return self;
            


        }
         QScriptValue REcmaColor::toScriptValueEnumMode(QScriptEngine* engine, const RColor::Mode& value)
    
        {
            return QScriptValue(engine, (int)value);
        }
         void REcmaColor::fromScriptValueEnumMode(const QScriptValue& value, RColor::Mode& out)
    
        {
            out = qvariant_cast<RColor::Mode>(value.toVariant());
        }
        