{

    RPatternLine* self = getSelf("toString", context);

    QString result;

            QDebug d(&result);
            if (self!=NULL) {
                d << *self;
            }
            else {
                d << "NULL";
            }

    return QScriptValue(result);
    }

// ***** AUTOGENERATED CODE, DO NOT EDIT *****

        #include "REcmaPatternLine.h"
        #include "RMetaTypes.h"
        #include "../REcmaHelper.h"

        // forwards declarations mapped to includes

        // includes for base ecma wrapper classes
         void REcmaPatternLine::initEcma(QScriptEngine& engine, QScriptValue* proto

    )

    {

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

    QScriptValue fun;

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

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

    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");

            REcmaHelper::registerFunction(&engine, proto, getPainterPath, "getPainterPath");

            REcmaHelper::registerFunction(&engine, proto, hasDots, "hasDots");

            REcmaHelper::registerFunction(&engine, proto, getLines, "getLines");

            REcmaHelper::registerFunction(&engine, proto, getLength, "getLength");

            REcmaHelper::registerFunction(&engine, proto, getAngle, "getAngle");

            REcmaHelper::registerFunction(&engine, proto, getOffset, "getOffset");

            REcmaHelper::registerFunction(&engine, proto, getBasePoint, "getBasePoint");

            REcmaHelper::registerFunction(&engine, proto, getDashes, "getDashes");

            REcmaHelper::registerFunction(&engine, proto, scale, "scale");

            REcmaHelper::registerFunction(&engine, proto, rotate, "rotate");

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

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

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);

    engine.globalObject().setProperty("RPatternLine",
    ctor, QScriptValue::SkipInEnumeration);

    if( protoCreated ){
       delete proto;
    }

    }
     QScriptValue REcmaPatternLine::createEcma(QScriptContext* context, QScriptEngine* engine)

    {
    if (context->thisObject().strictlyEquals(
       engine->globalObject())) {
       return REcmaHelper::throwError(
       QString::fromLatin1("RPatternLine(): Did you forget to construct with 'new'?"),
           context);
    }

    QScriptValue result;

            // constructor without variants:

    if( context->argumentCount() ==
        0
    ){
    // prepare arguments:

    // end of arguments

            RPatternLine
                    cppResult;

            result = engine->newVariant(
            context->thisObject(), qVariantFromValue(cppResult));

    } else

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

    return result;
    }

    // conversion functions for base classes:

     QScriptValue REcmaPatternLine::getClassName(QScriptContext *context, QScriptEngine *engine)

    {
        return qScriptValueFromValue(engine, QString("RPatternLine"));
    }

    // returns all base classes (in case of multiple inheritance):
     QScriptValue REcmaPatternLine::getBaseClasses(QScriptContext *context, QScriptEngine *engine)

    {
        QStringList list;

        return qScriptValueFromSequence(engine, list);
    }

     QScriptValue
        REcmaPatternLine::getPainterPath
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getPainterPath", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RPainterPath cppResult =

               self->getPainterPath();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getPainterPath().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::hasDots
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("hasDots", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    bool cppResult =

               self->hasDots();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.hasDots().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getLines
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getLines", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    QList < RLine > cppResult =

               self->getLines();
                result = REcmaHelper::listToScriptValue(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:
    QList < RLine > cppResult =

               self->getLines(a0);
                result = REcmaHelper::listToScriptValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getLines().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getLength
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getLength", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    double cppResult =

               self->getLength();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getLength().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getAngle
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getAngle", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    double cppResult =

               self->getAngle();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getAngle().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getOffset
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getOffset", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RVector cppResult =

               self->getOffset();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getOffset().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getBasePoint
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getBasePoint", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RVector cppResult =

               self->getBasePoint();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getBasePoint().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getDashes
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getDashes", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    QList < double > cppResult =

               self->getDashes();
                result = REcmaHelper::listToScriptValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getDashes().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::scale
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("scale", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: double */

    ){
    // prepare arguments:

                    // argument isStandardType
                    double
                    a0 =
                    (double)

                    context->argument( 0 ).
                    toNumber();

    // end of arguments

    // call C++ function:

               self->scale(a0);
    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.scale().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::rotate
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("rotate", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: double */

    ){
    // prepare arguments:

                    // argument isStandardType
                    double
                    a0 =
                    (double)

                    context->argument( 0 ).
                    toNumber();

    // end of arguments

    // call C++ function:

               self->rotate(a0);
    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.rotate().",
                   context);
            }
            return result;
        }
         QScriptValue REcmaPatternLine::toString
    (QScriptContext *context, QScriptEngine *engine)

     QScriptValue REcmaPatternLine::copy
    (QScriptContext *context, QScriptEngine *engine)

    {
        RPatternLine cp = qscriptvalue_cast<RPatternLine>(context->thisObject());
        return qScriptValueFromValue(engine, cp);
    }
     QScriptValue REcmaPatternLine::destroy(QScriptContext *context, QScriptEngine *engine)

    {

        RPatternLine* self = getSelf("RPatternLine", context);
        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();
    }
    RPatternLine* REcmaPatternLine::getSelf(const QString& fName, QScriptContext* context)

        {
            RPatternLine* 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 = REcmaHelper::scriptValueTo<RPatternLine >(context->thisObject())

                ;

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

            return self;
        }
        RPatternLine* REcmaPatternLine::getSelfShell(const QString& fName, QScriptContext* context)

        {
          RPatternLine* selfBase = getSelf(fName, context);
                RPatternLine* self = dynamic_cast<RPatternLine*>(selfBase);
            if(self == NULL){
                REcmaHelper::throwError(QString("RPatternLine.%1(): "
                    "This object is not a RPatternLine").arg(fName),
                    context);
            }

            return self;

        }


// ***** AUTOGENERATED CODE, DO NOT EDIT *****

        #include "REcmaPatternLine.h"
        #include "RMetaTypes.h"
        #include "../REcmaHelper.h"

        // forwards declarations mapped to includes

        // includes for base ecma wrapper classes
         void REcmaPatternLine::initEcma(QScriptEngine& engine, QScriptValue* proto

    )

    {

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

    QScriptValue fun;

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

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

    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");

            REcmaHelper::registerFunction(&engine, proto, getPainterPath, "getPainterPath");

            REcmaHelper::registerFunction(&engine, proto, hasDots, "hasDots");

            REcmaHelper::registerFunction(&engine, proto, getLines, "getLines");

            REcmaHelper::registerFunction(&engine, proto, getLength, "getLength");

            REcmaHelper::registerFunction(&engine, proto, getAngle, "getAngle");

            REcmaHelper::registerFunction(&engine, proto, getOffset, "getOffset");

            REcmaHelper::registerFunction(&engine, proto, getBasePoint, "getBasePoint");

            REcmaHelper::registerFunction(&engine, proto, getDashes, "getDashes");

            REcmaHelper::registerFunction(&engine, proto, scale, "scale");

            REcmaHelper::registerFunction(&engine, proto, rotate, "rotate");

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

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

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);

    engine.globalObject().setProperty("RPatternLine",
    ctor, QScriptValue::SkipInEnumeration);

    if( protoCreated ){
       delete proto;
    }

    }
     QScriptValue REcmaPatternLine::createEcma(QScriptContext* context, QScriptEngine* engine)

    {
    if (context->thisObject().strictlyEquals(
       engine->globalObject())) {
       return REcmaHelper::throwError(
       QString::fromLatin1("RPatternLine(): Did you forget to construct with 'new'?"),
           context);
    }

    QScriptValue result;

            // constructor without variants:

    if( context->argumentCount() ==
        0
    ){
    // prepare arguments:

    // end of arguments

            RPatternLine
                    cppResult;

            result = engine->newVariant(
            context->thisObject(), qVariantFromValue(cppResult));

    } else

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

    return result;
    }

    // conversion functions for base classes:

     QScriptValue REcmaPatternLine::getClassName(QScriptContext *context, QScriptEngine *engine)

    {
        return qScriptValueFromValue(engine, QString("RPatternLine"));
    }

    // returns all base classes (in case of multiple inheritance):
     QScriptValue REcmaPatternLine::getBaseClasses(QScriptContext *context, QScriptEngine *engine)

    {
        QStringList list;

        return qScriptValueFromSequence(engine, list);
    }

     QScriptValue
        REcmaPatternLine::getPainterPath
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getPainterPath", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RPainterPath cppResult =

               self->getPainterPath();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getPainterPath().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::hasDots
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("hasDots", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    bool cppResult =

               self->hasDots();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.hasDots().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getLines
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getLines", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    QList < RLine > cppResult =

               self->getLines();
                result = REcmaHelper::listToScriptValue(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:
    QList < RLine > cppResult =

               self->getLines(a0);
                result = REcmaHelper::listToScriptValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getLines().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getLength
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getLength", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    double cppResult =

               self->getLength();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getLength().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getAngle
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getAngle", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    double cppResult =

               self->getAngle();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getAngle().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getOffset
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getOffset", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RVector cppResult =

               self->getOffset();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getOffset().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getBasePoint
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getBasePoint", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RVector cppResult =

               self->getBasePoint();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getBasePoint().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getDashes
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getDashes", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    QList < double > cppResult =

               self->getDashes();
                result = REcmaHelper::listToScriptValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getDashes().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::scale
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("scale", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: double */

    ){
    // prepare arguments:

                    // argument isStandardType
                    double
                    a0 =
                    (double)

                    context->argument( 0 ).
                    toNumber();

    // end of arguments

    // call C++ function:

               self->scale(a0);
    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.scale().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::rotate
        (QScriptContext* context, QScriptEngine* engine)

                    RPatternLine* self =
                        getSelf("rotate", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: double */

    ){
    // prepare arguments:

                    // argument isStandardType
                    double
                    a0 =
                    (double)

                    context->argument( 0 ).
                    toNumber();

    // end of arguments

    // call C++ function:

               self->rotate(a0);
    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.rotate().",
                   context);
            }
            return result;
        }
         QScriptValue REcmaPatternLine::toString
    (QScriptContext *context, QScriptEngine *engine)

    {

    RPatternLine* self = getSelf("toString", context);

    QString result;

            QDebug d(&result);
            if (self!=NULL) {
                d << *self;
            }
            else {
                d << "NULL";
            }

    return QScriptValue(result);
    }
     QScriptValue REcmaPatternLine::copy
    (QScriptContext *context, QScriptEngine *engine)

    {
        RPatternLine cp = qscriptvalue_cast<RPatternLine>(context->thisObject());
        return qScriptValueFromValue(engine, cp);
    }
     QScriptValue REcmaPatternLine::destroy(QScriptContext *context, QScriptEngine *engine)

    {

        RPatternLine* self = getSelf("RPatternLine", context);
        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();
    }
    RPatternLine* REcmaPatternLine::getSelf(const QString& fName, QScriptContext* context)

        {
            RPatternLine* 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 = REcmaHelper::scriptValueTo<RPatternLine >(context->thisObject())

                ;

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

            return self;
        }
        RPatternLine* REcmaPatternLine::getSelfShell(const QString& fName, QScriptContext* context)

        {
          RPatternLine* selfBase = getSelf(fName, context);
                RPatternLine* self = dynamic_cast<RPatternLine*>(selfBase);
            if(self == NULL){
                REcmaHelper::throwError(QString("RPatternLine.%1(): "
                    "This object is not a RPatternLine").arg(fName),
                    context);
            }

            return self;

        }


RPatternLine* self =
                        getSelf("rotate", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

// ***** AUTOGENERATED CODE, DO NOT EDIT *****

        #include "REcmaPatternLine.h"
        #include "RMetaTypes.h"
        #include "../REcmaHelper.h"

        // forwards declarations mapped to includes

        // includes for base ecma wrapper classes
         void REcmaPatternLine::initEcma(QScriptEngine& engine, QScriptValue* proto

    )

    {

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

    QScriptValue fun;

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

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

    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");

            REcmaHelper::registerFunction(&engine, proto, getPainterPath, "getPainterPath");

            REcmaHelper::registerFunction(&engine, proto, hasDots, "hasDots");

            REcmaHelper::registerFunction(&engine, proto, getLines, "getLines");

            REcmaHelper::registerFunction(&engine, proto, getLength, "getLength");

            REcmaHelper::registerFunction(&engine, proto, getAngle, "getAngle");

            REcmaHelper::registerFunction(&engine, proto, getOffset, "getOffset");

            REcmaHelper::registerFunction(&engine, proto, getBasePoint, "getBasePoint");

            REcmaHelper::registerFunction(&engine, proto, getDashes, "getDashes");

            REcmaHelper::registerFunction(&engine, proto, scale, "scale");

            REcmaHelper::registerFunction(&engine, proto, rotate, "rotate");

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

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

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);

    engine.globalObject().setProperty("RPatternLine",
    ctor, QScriptValue::SkipInEnumeration);

    if( protoCreated ){
       delete proto;
    }

    }
     QScriptValue REcmaPatternLine::createEcma(QScriptContext* context, QScriptEngine* engine)

    {
    if (context->thisObject().strictlyEquals(
       engine->globalObject())) {
       return REcmaHelper::throwError(
       QString::fromLatin1("RPatternLine(): Did you forget to construct with 'new'?"),
           context);
    }

    QScriptValue result;

            // constructor without variants:

    if( context->argumentCount() ==
        0
    ){
    // prepare arguments:

    // end of arguments

            RPatternLine
                    cppResult;

            result = engine->newVariant(
            context->thisObject(), qVariantFromValue(cppResult));

    } else

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

    return result;
    }

    // conversion functions for base classes:

     QScriptValue REcmaPatternLine::getClassName(QScriptContext *context, QScriptEngine *engine)

    {
        return qScriptValueFromValue(engine, QString("RPatternLine"));
    }

    // returns all base classes (in case of multiple inheritance):
     QScriptValue REcmaPatternLine::getBaseClasses(QScriptContext *context, QScriptEngine *engine)

    {
        QStringList list;

        return qScriptValueFromSequence(engine, list);
    }

     QScriptValue
        REcmaPatternLine::getPainterPath
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getPainterPath", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RPainterPath cppResult =

               self->getPainterPath();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getPainterPath().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::hasDots
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("hasDots", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    bool cppResult =

               self->hasDots();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.hasDots().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getLines
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getLines", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    QList < RLine > cppResult =

               self->getLines();
                result = REcmaHelper::listToScriptValue(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:
    QList < RLine > cppResult =

               self->getLines(a0);
                result = REcmaHelper::listToScriptValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getLines().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getLength
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getLength", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    double cppResult =

               self->getLength();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getLength().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getAngle
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getAngle", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    double cppResult =

               self->getAngle();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getAngle().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getOffset
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getOffset", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RVector cppResult =

               self->getOffset();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getOffset().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getBasePoint
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getBasePoint", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RVector cppResult =

               self->getBasePoint();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getBasePoint().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getDashes
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getDashes", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    QList < double > cppResult =

               self->getDashes();
                result = REcmaHelper::listToScriptValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getDashes().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::scale
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("scale", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: double */

    ){
    // prepare arguments:

                    // argument isStandardType
                    double
                    a0 =
                    (double)

                    context->argument( 0 ).
                    toNumber();

    // end of arguments

    // call C++ function:

               self->scale(a0);
    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.scale().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::rotate
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:

    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: double */

    ){
    // prepare arguments:

                    // argument isStandardType
                    double
                    a0 =
                    (double)

                    context->argument( 0 ).
                    toNumber();

    // end of arguments

    // call C++ function:

               self->rotate(a0);
    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.rotate().",
                   context);
            }
            return result;
        }
         QScriptValue REcmaPatternLine::toString
    (QScriptContext *context, QScriptEngine *engine)

    {

    RPatternLine* self = getSelf("toString", context);

    QString result;

            QDebug d(&result);
            if (self!=NULL) {
                d << *self;
            }
            else {
                d << "NULL";
            }

    return QScriptValue(result);
    }
     QScriptValue REcmaPatternLine::copy
    (QScriptContext *context, QScriptEngine *engine)

    {
        RPatternLine cp = qscriptvalue_cast<RPatternLine>(context->thisObject());
        return qScriptValueFromValue(engine, cp);
    }
     QScriptValue REcmaPatternLine::destroy(QScriptContext *context, QScriptEngine *engine)

    {

        RPatternLine* self = getSelf("RPatternLine", context);
        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();
    }
    RPatternLine* REcmaPatternLine::getSelf(const QString& fName, QScriptContext* context)

        {
            RPatternLine* 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 = REcmaHelper::scriptValueTo<RPatternLine >(context->thisObject())

                ;

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

            return self;
        }
        RPatternLine* REcmaPatternLine::getSelfShell(const QString& fName, QScriptContext* context)

        {
          RPatternLine* selfBase = getSelf(fName, context);
                RPatternLine* self = dynamic_cast<RPatternLine*>(selfBase);
            if(self == NULL){
                REcmaHelper::throwError(QString("RPatternLine.%1(): "
                    "This object is not a RPatternLine").arg(fName),
                    context);
            }

            return self;

        }


if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: double */

    ){
    // prepare arguments:

                    // argument isStandardType
                    double
                    a0 =
                    (double)

                    context->argument( 0 ).
                    toNumber();

    // end of arguments

    // call C++ function:

               self->rotate(a0);
    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.rotate().",
                   context);
            }
            return result;
        }

// ***** AUTOGENERATED CODE, DO NOT EDIT *****

        #include "REcmaPatternLine.h"
        #include "RMetaTypes.h"
        #include "../REcmaHelper.h"

        // forwards declarations mapped to includes

        // includes for base ecma wrapper classes
         void REcmaPatternLine::initEcma(QScriptEngine& engine, QScriptValue* proto

    )

    {

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

    QScriptValue fun;

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

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

    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");

            REcmaHelper::registerFunction(&engine, proto, getPainterPath, "getPainterPath");

            REcmaHelper::registerFunction(&engine, proto, hasDots, "hasDots");

            REcmaHelper::registerFunction(&engine, proto, getLines, "getLines");

            REcmaHelper::registerFunction(&engine, proto, getLength, "getLength");

            REcmaHelper::registerFunction(&engine, proto, getAngle, "getAngle");

            REcmaHelper::registerFunction(&engine, proto, getOffset, "getOffset");

            REcmaHelper::registerFunction(&engine, proto, getBasePoint, "getBasePoint");

            REcmaHelper::registerFunction(&engine, proto, getDashes, "getDashes");

            REcmaHelper::registerFunction(&engine, proto, scale, "scale");

            REcmaHelper::registerFunction(&engine, proto, rotate, "rotate");

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

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

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);

    engine.globalObject().setProperty("RPatternLine",
    ctor, QScriptValue::SkipInEnumeration);

    if( protoCreated ){
       delete proto;
    }

    }
     QScriptValue REcmaPatternLine::createEcma(QScriptContext* context, QScriptEngine* engine)

    {
    if (context->thisObject().strictlyEquals(
       engine->globalObject())) {
       return REcmaHelper::throwError(
       QString::fromLatin1("RPatternLine(): Did you forget to construct with 'new'?"),
           context);
    }

    QScriptValue result;

            // constructor without variants:

    if( context->argumentCount() ==
        0
    ){
    // prepare arguments:

    // end of arguments

            RPatternLine
                    cppResult;

            result = engine->newVariant(
            context->thisObject(), qVariantFromValue(cppResult));

    } else

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

    return result;
    }

    // conversion functions for base classes:

     QScriptValue REcmaPatternLine::getClassName(QScriptContext *context, QScriptEngine *engine)

    {
        return qScriptValueFromValue(engine, QString("RPatternLine"));
    }

    // returns all base classes (in case of multiple inheritance):
     QScriptValue REcmaPatternLine::getBaseClasses(QScriptContext *context, QScriptEngine *engine)

    {
        QStringList list;

        return qScriptValueFromSequence(engine, list);
    }

     QScriptValue
        REcmaPatternLine::getPainterPath
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getPainterPath", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RPainterPath cppResult =

               self->getPainterPath();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getPainterPath().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::hasDots
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("hasDots", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    bool cppResult =

               self->hasDots();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.hasDots().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getLines
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getLines", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    QList < RLine > cppResult =

               self->getLines();
                result = REcmaHelper::listToScriptValue(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:
    QList < RLine > cppResult =

               self->getLines(a0);
                result = REcmaHelper::listToScriptValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getLines().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getLength
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getLength", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    double cppResult =

               self->getLength();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getLength().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getAngle
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getAngle", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    double cppResult =

               self->getAngle();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getAngle().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getOffset
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getOffset", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RVector cppResult =

               self->getOffset();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getOffset().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getBasePoint
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getBasePoint", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RVector cppResult =

               self->getBasePoint();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getBasePoint().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getDashes
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getDashes", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    QList < double > cppResult =

               self->getDashes();
                result = REcmaHelper::listToScriptValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getDashes().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::scale
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("scale", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: double */

    ){
    // prepare arguments:

                    // argument isStandardType
                    double
                    a0 =
                    (double)

                    context->argument( 0 ).
                    toNumber();

    // end of arguments

    // call C++ function:

               self->scale(a0);
    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.scale().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::rotate
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("rotate", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

         QScriptValue REcmaPatternLine::toString
    (QScriptContext *context, QScriptEngine *engine)

    {

    RPatternLine* self = getSelf("toString", context);

    QString result;

            QDebug d(&result);
            if (self!=NULL) {
                d << *self;
            }
            else {
                d << "NULL";
            }

    return QScriptValue(result);
    }
     QScriptValue REcmaPatternLine::copy
    (QScriptContext *context, QScriptEngine *engine)

    {
        RPatternLine cp = qscriptvalue_cast<RPatternLine>(context->thisObject());
        return qScriptValueFromValue(engine, cp);
    }
     QScriptValue REcmaPatternLine::destroy(QScriptContext *context, QScriptEngine *engine)

    {

        RPatternLine* self = getSelf("RPatternLine", context);
        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();
    }
    RPatternLine* REcmaPatternLine::getSelf(const QString& fName, QScriptContext* context)

        {
            RPatternLine* 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 = REcmaHelper::scriptValueTo<RPatternLine >(context->thisObject())

                ;

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

            return self;
        }
        RPatternLine* REcmaPatternLine::getSelfShell(const QString& fName, QScriptContext* context)

        {
          RPatternLine* selfBase = getSelf(fName, context);
                RPatternLine* self = dynamic_cast<RPatternLine*>(selfBase);
            if(self == NULL){
                REcmaHelper::throwError(QString("RPatternLine.%1(): "
                    "This object is not a RPatternLine").arg(fName),
                    context);
            }

            return self;

        }


// ***** AUTOGENERATED CODE, DO NOT EDIT *****

        #include "REcmaPatternLine.h"
        #include "RMetaTypes.h"
        #include "../REcmaHelper.h"

        // forwards declarations mapped to includes

        // includes for base ecma wrapper classes
         void REcmaPatternLine::initEcma(QScriptEngine& engine, QScriptValue* proto

    )

    {

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

    QScriptValue fun;

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

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

    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");

            REcmaHelper::registerFunction(&engine, proto, getPainterPath, "getPainterPath");

            REcmaHelper::registerFunction(&engine, proto, hasDots, "hasDots");

            REcmaHelper::registerFunction(&engine, proto, getLines, "getLines");

            REcmaHelper::registerFunction(&engine, proto, getLength, "getLength");

            REcmaHelper::registerFunction(&engine, proto, getAngle, "getAngle");

            REcmaHelper::registerFunction(&engine, proto, getOffset, "getOffset");

            REcmaHelper::registerFunction(&engine, proto, getBasePoint, "getBasePoint");

            REcmaHelper::registerFunction(&engine, proto, getDashes, "getDashes");

            REcmaHelper::registerFunction(&engine, proto, scale, "scale");

            REcmaHelper::registerFunction(&engine, proto, rotate, "rotate");

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

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

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);

    engine.globalObject().setProperty("RPatternLine",
    ctor, QScriptValue::SkipInEnumeration);

    if( protoCreated ){
       delete proto;
    }

    }
     QScriptValue REcmaPatternLine::createEcma(QScriptContext* context, QScriptEngine* engine)

    {
    if (context->thisObject().strictlyEquals(
       engine->globalObject())) {
       return REcmaHelper::throwError(
       QString::fromLatin1("RPatternLine(): Did you forget to construct with 'new'?"),
           context);
    }

    QScriptValue result;

            // constructor without variants:

    if( context->argumentCount() ==
        0
    ){
    // prepare arguments:

    // end of arguments

            RPatternLine
                    cppResult;

            result = engine->newVariant(
            context->thisObject(), qVariantFromValue(cppResult));

    } else

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

    return result;
    }

    // conversion functions for base classes:

     QScriptValue REcmaPatternLine::getClassName(QScriptContext *context, QScriptEngine *engine)

    {
        return qScriptValueFromValue(engine, QString("RPatternLine"));
    }

    // returns all base classes (in case of multiple inheritance):
     QScriptValue REcmaPatternLine::getBaseClasses(QScriptContext *context, QScriptEngine *engine)

    {
        QStringList list;

        return qScriptValueFromSequence(engine, list);
    }

     QScriptValue
        REcmaPatternLine::getPainterPath
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getPainterPath", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RPainterPath cppResult =

               self->getPainterPath();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getPainterPath().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::hasDots
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("hasDots", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    bool cppResult =

               self->hasDots();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.hasDots().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getLines
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getLines", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    QList < RLine > cppResult =

               self->getLines();
                result = REcmaHelper::listToScriptValue(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:
    QList < RLine > cppResult =

               self->getLines(a0);
                result = REcmaHelper::listToScriptValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getLines().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getLength
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getLength", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    double cppResult =

               self->getLength();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getLength().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getAngle
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getAngle", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    double cppResult =

               self->getAngle();
                // standard Type
                result = QScriptValue(cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getAngle().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getOffset
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getOffset", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RVector cppResult =

               self->getOffset();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getOffset().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getBasePoint
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getBasePoint", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    RVector cppResult =

               self->getBasePoint();
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getBasePoint().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::getDashes
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("getDashes", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:

    // end of arguments

    // call C++ function:
    QList < double > cppResult =

               self->getDashes();
                result = REcmaHelper::listToScriptValue(engine, cppResult);

    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.getDashes().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::scale
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("scale", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: double */

    ){
    // prepare arguments:

                    // argument isStandardType
                    double
                    a0 =
                    (double)

                    context->argument( 0 ).
                    toNumber();

    // end of arguments

    // call C++ function:

               self->scale(a0);
    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.scale().",
                   context);
            }
            return result;
        }
         QScriptValue
        REcmaPatternLine::rotate
        (QScriptContext* context, QScriptEngine* engine)

        {

            QScriptValue result = engine->undefinedValue();

                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RPatternLine* self =
                        getSelf("rotate", context);

                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }

    if( context->argumentCount() ==
    1 && (
            context->argument(0).isNumber()
        ) /* type: double */

    ){
    // prepare arguments:

                    // argument isStandardType
                    double
                    a0 =
                    (double)

                    context->argument( 0 ).
                    toNumber();

    // end of arguments

    // call C++ function:

               self->rotate(a0);
    } else

            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RPatternLine.rotate().",
                   context);
            }
            return result;
        }
         QScriptValue REcmaPatternLine::toString
    (QScriptContext *context, QScriptEngine *engine)

    {

    RPatternLine* self = getSelf("toString", context);

    QString result;

            QDebug d(&result);
            if (self!=NULL) {
                d << *self;
            }
            else {
                d << "NULL";
            }

    return QScriptValue(result);
    }
     QScriptValue REcmaPatternLine::copy
    (QScriptContext *context, QScriptEngine *engine)

    {
        RPatternLine cp = qscriptvalue_cast<RPatternLine>(context->thisObject());
        return qScriptValueFromValue(engine, cp);
    }
     QScriptValue REcmaPatternLine::destroy(QScriptContext *context, QScriptEngine *engine)

    {

        RPatternLine* self = getSelf("RPatternLine", context);
        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();
    }
    RPatternLine* REcmaPatternLine::getSelf(const QString& fName, QScriptContext* context)

        {
            RPatternLine* 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 = REcmaHelper::scriptValueTo<RPatternLine >(context->thisObject())

                ;

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

            return self;
        }
        RPatternLine* REcmaPatternLine::getSelfShell(const QString& fName, QScriptContext* context)

        {
          RPatternLine* selfBase = getSelf(fName, context);
                RPatternLine* self = dynamic_cast<RPatternLine*>(selfBase);
            if(self == NULL){
                REcmaHelper::throwError(QString("RPatternLine.%1(): "
                    "This object is not a RPatternLine").arg(fName),
                    context);
            }

            return self;

        }