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

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

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

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

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

    QScriptValue fun;

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

    // destroy:
    REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
    
        // conversion for base class ROperation
        REcmaHelper::registerFunction(&engine, proto, getROperation, "getROperation");
        
        // conversion for base class RRequireHeap
        REcmaHelper::registerFunction(&engine, proto, getRRequireHeap, "getRRequireHeap");
        

    // 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, apply, "apply");
            
            REcmaHelper::registerFunction(&engine, proto, copyEntityBlock, "copyEntityBlock");
            
            REcmaHelper::registerFunction(&engine, proto, copyBlock, "copyBlock");
            
            REcmaHelper::registerFunction(&engine, proto, copyEntityLayer, "copyEntityLayer");
            
            REcmaHelper::registerFunction(&engine, proto, copyLayer, "copyLayer");
            
            REcmaHelper::registerFunction(&engine, proto, copyEntityLinetype, "copyEntityLinetype");
            
            REcmaHelper::registerFunction(&engine, proto, copyLinetype, "copyLinetype");
            
            REcmaHelper::registerFunction(&engine, proto, setCopyEmptyBlocks, "setCopyEmptyBlocks");
            
            REcmaHelper::registerFunction(&engine, proto, setCopyAllLayers, "setCopyAllLayers");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RClipboardOperation*>(), *proto);

        
    

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

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RClipboardOperation",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
     QScriptValue REcmaClipboardOperation::createEcma(QScriptContext* context, QScriptEngine* engine) 
    
    {
    if (context->thisObject().strictlyEquals(
       engine->globalObject())) {
       return REcmaHelper::throwError(
       QString::fromLatin1("RClipboardOperation(): 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:
    
            // non-copyable class:
            RClipboardOperation
                    * cppResult =
                    new
                    RClipboardOperation
                    ();
                
                    // TODO: triggers: Warning: QScriptEngine::newVariant(): changing class of non-QScriptObject not supported:
                    result = engine->newVariant(context->thisObject(), qVariantFromValue(cppResult));
                
    } else 

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

    // conversion functions for base classes:
     QScriptValue REcmaClipboardOperation::getROperation(QScriptContext *context,
            QScriptEngine *engine)
        
            {
                ROperation* cppResult =
                    qscriptvalue_cast<RClipboardOperation*> (context->thisObject());
                QScriptValue result = qScriptValueFromValue(engine, cppResult);
                return result;
            }
             QScriptValue REcmaClipboardOperation::getRRequireHeap(QScriptContext *context,
            QScriptEngine *engine)
        
            {
                RRequireHeap* cppResult =
                    qscriptvalue_cast<RClipboardOperation*> (context->thisObject());
                QScriptValue result = qScriptValueFromValue(engine, cppResult);
                return result;
            }
            

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

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

        return qScriptValueFromSequence(engine, list);
    }
    

    // properties:
    

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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RClipboardOperation* self = 
                        getSelf("apply", 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: RDocument */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RDocument*
                    ap0 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 0 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a0 = *ap0;
                
    // end of arguments

    // call C++ function:
    // return type 'RTransaction'
    RTransaction cppResult =
        
               self->apply(a0);
        // return type: RTransaction
                // 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: RDocument */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RDocument*
                    ap0 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 0 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a0 = *ap0;
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'RTransaction'
    RTransaction cppResult =
        
               self->apply(a0
        ,
    a1);
        // return type: RTransaction
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: REntity */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RDocument */
     && (
            context->argument(2).isVariant() || 
            context->argument(2).isQObject() || 
            context->argument(2).isNull()
        ) /* type: RDocument */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isString()
        ) /* type: QString */
     && (
            context->argument(6).isVariant() || 
            context->argument(6).isQObject() || 
            context->argument(6).isNull()
        ) /* type: RTransaction */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    REntity*
                    ap0 =
                    qscriptvalue_cast<
                    REntity*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 0 is not of type REntity*.",
                               context);                    
                    }
                    REntity& a0 = *ap0;
                
                    // argument is reference
                    RDocument*
                    ap1 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 1 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a1 = *ap1;
                
                    // argument is reference
                    RDocument*
                    ap2 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        2
                        )
                    );
                    if( ap2 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 2 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a2 = *ap2;
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    QString
                    a5 =
                    (QString)
                    
                    context->argument( 5 ).
                    toString();
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RTransaction*
                    ap6 =
                    qscriptvalue_cast<
                    RTransaction*
                        >(
                        context->argument(
                        6
                        )
                    );
                    if (ap6 == NULL) {
                           return REcmaHelper::throwError("RClipboardOperation: Argument 6 is not of type RTransaction.",
                               context);                    
                    }
                    RTransaction 
                    a6 = 
                    *ap6;
                
    // end of arguments

    // call C++ function:
    // return type 'QSharedPointer < RBlock >'
    QSharedPointer < RBlock > cppResult =
        
               self->copyEntityBlock(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6);
        // return type: QSharedPointer < RBlock >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isNumber()
        ) /* type: RBlock::Id */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RDocument */
     && (
            context->argument(2).isVariant() || 
            context->argument(2).isQObject() || 
            context->argument(2).isNull()
        ) /* type: RDocument */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isBool()
        ) /* type: bool */
     && (
            context->argument(5).isString()
        ) /* type: QString */
     && (
            context->argument(6).isVariant() || 
            context->argument(6).isQObject() || 
            context->argument(6).isNull()
        ) /* type: RTransaction */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RBlock::Id
                    a0 =
                    (RBlock::Id)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is reference
                    RDocument*
                    ap1 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 1 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a1 = *ap1;
                
                    // argument is reference
                    RDocument*
                    ap2 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        2
                        )
                    );
                    if( ap2 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 2 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a2 = *ap2;
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a4 =
                    (bool)
                    
                    context->argument( 4 ).
                    toBool();
                
                    // argument isStandardType
                    QString
                    a5 =
                    (QString)
                    
                    context->argument( 5 ).
                    toString();
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RTransaction*
                    ap6 =
                    qscriptvalue_cast<
                    RTransaction*
                        >(
                        context->argument(
                        6
                        )
                    );
                    if (ap6 == NULL) {
                           return REcmaHelper::throwError("RClipboardOperation: Argument 6 is not of type RTransaction.",
                               context);                    
                    }
                    RTransaction 
                    a6 = 
                    *ap6;
                
    // end of arguments

    // call C++ function:
    // return type 'QSharedPointer < RBlock >'
    QSharedPointer < RBlock > cppResult =
        
               self->copyBlock(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6);
        // return type: QSharedPointer < RBlock >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: REntity */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RDocument */
     && (
            context->argument(2).isVariant() || 
            context->argument(2).isQObject() || 
            context->argument(2).isNull()
        ) /* type: RDocument */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isVariant() || 
            context->argument(4).isQObject() || 
            context->argument(4).isNull()
        ) /* type: RTransaction */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    REntity*
                    ap0 =
                    qscriptvalue_cast<
                    REntity*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 0 is not of type REntity*.",
                               context);                    
                    }
                    REntity& a0 = *ap0;
                
                    // argument is reference
                    RDocument*
                    ap1 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 1 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a1 = *ap1;
                
                    // argument is reference
                    RDocument*
                    ap2 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        2
                        )
                    );
                    if( ap2 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 2 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a2 = *ap2;
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RTransaction*
                    ap4 =
                    qscriptvalue_cast<
                    RTransaction*
                        >(
                        context->argument(
                        4
                        )
                    );
                    if (ap4 == NULL) {
                           return REcmaHelper::throwError("RClipboardOperation: Argument 4 is not of type RTransaction.",
                               context);                    
                    }
                    RTransaction 
                    a4 = 
                    *ap4;
                
    // end of arguments

    // call C++ function:
    // return type 'QSharedPointer < RLayer >'
    QSharedPointer < RLayer > cppResult =
        
               self->copyEntityLayer(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QSharedPointer < RLayer >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: RLayer::Id */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RDocument */
     && (
            context->argument(2).isVariant() || 
            context->argument(2).isQObject() || 
            context->argument(2).isNull()
        ) /* type: RDocument */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isVariant() || 
            context->argument(4).isQObject() || 
            context->argument(4).isNull()
        ) /* type: RTransaction */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RLayer::Id
                    a0 =
                    (RLayer::Id)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is reference
                    RDocument*
                    ap1 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 1 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a1 = *ap1;
                
                    // argument is reference
                    RDocument*
                    ap2 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        2
                        )
                    );
                    if( ap2 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 2 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a2 = *ap2;
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RTransaction*
                    ap4 =
                    qscriptvalue_cast<
                    RTransaction*
                        >(
                        context->argument(
                        4
                        )
                    );
                    if (ap4 == NULL) {
                           return REcmaHelper::throwError("RClipboardOperation: Argument 4 is not of type RTransaction.",
                               context);                    
                    }
                    RTransaction 
                    a4 = 
                    *ap4;
                
    // end of arguments

    // call C++ function:
    // return type 'QSharedPointer < RLayer >'
    QSharedPointer < RLayer > cppResult =
        
               self->copyLayer(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QSharedPointer < RLayer >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: REntity */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RDocument */
     && (
            context->argument(2).isVariant() || 
            context->argument(2).isQObject() || 
            context->argument(2).isNull()
        ) /* type: RDocument */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isVariant() || 
            context->argument(4).isQObject() || 
            context->argument(4).isNull()
        ) /* type: RTransaction */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    REntity*
                    ap0 =
                    qscriptvalue_cast<
                    REntity*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 0 is not of type REntity*.",
                               context);                    
                    }
                    REntity& a0 = *ap0;
                
                    // argument is reference
                    RDocument*
                    ap1 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 1 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a1 = *ap1;
                
                    // argument is reference
                    RDocument*
                    ap2 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        2
                        )
                    );
                    if( ap2 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 2 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a2 = *ap2;
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RTransaction*
                    ap4 =
                    qscriptvalue_cast<
                    RTransaction*
                        >(
                        context->argument(
                        4
                        )
                    );
                    if (ap4 == NULL) {
                           return REcmaHelper::throwError("RClipboardOperation: Argument 4 is not of type RTransaction.",
                               context);                    
                    }
                    RTransaction 
                    a4 = 
                    *ap4;
                
    // end of arguments

    // call C++ function:
    // return type 'QSharedPointer < RLinetype >'
    QSharedPointer < RLinetype > cppResult =
        
               self->copyEntityLinetype(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QSharedPointer < RLinetype >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: RLinetype::Id */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RDocument */
     && (
            context->argument(2).isVariant() || 
            context->argument(2).isQObject() || 
            context->argument(2).isNull()
        ) /* type: RDocument */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isVariant() || 
            context->argument(4).isQObject() || 
            context->argument(4).isNull()
        ) /* type: RTransaction */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RLinetype::Id
                    a0 =
                    (RLinetype::Id)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is reference
                    RDocument*
                    ap1 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 1 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a1 = *ap1;
                
                    // argument is reference
                    RDocument*
                    ap2 =
                    qscriptvalue_cast<
                    RDocument*
                        >(
                        context->argument(
                        2
                        )
                    );
                    if( ap2 == NULL ){
                           return REcmaHelper::throwError("RClipboardOperation: Argument 2 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a2 = *ap2;
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RTransaction*
                    ap4 =
                    qscriptvalue_cast<
                    RTransaction*
                        >(
                        context->argument(
                        4
                        )
                    );
                    if (ap4 == NULL) {
                           return REcmaHelper::throwError("RClipboardOperation: Argument 4 is not of type RTransaction.",
                               context);                    
                    }
                    RTransaction 
                    a4 = 
                    *ap4;
                
    // end of arguments

    // call C++ function:
    // return type 'QSharedPointer < RLinetype >'
    QSharedPointer < RLinetype > cppResult =
        
               self->copyLinetype(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QSharedPointer < RLinetype >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    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 'void'
    
               self->setCopyEmptyBlocks(a0);
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    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 'void'
    
               self->setCopyAllLayers(a0);
    } else


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

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

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

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

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

            return self;
            


        }
        