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

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

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

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

            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 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, init, "init");
            
            REcmaHelper::registerFunction(&engine, proto, initLinetypes, "initLinetypes");
            
            REcmaHelper::registerFunction(&engine, proto, getDefaultLinetypes, "getDefaultLinetypes");
            
            REcmaHelper::registerFunction(&engine, proto, getStorage, "getStorage");
            
            REcmaHelper::registerFunction(&engine, proto, getSpatialIndex, "getSpatialIndex");
            
            REcmaHelper::registerFunction(&engine, proto, getSpatialIndexForBlock, "getSpatialIndexForBlock");
            
            REcmaHelper::registerFunction(&engine, proto, getSpatialIndexForCurrentBlock, "getSpatialIndexForCurrentBlock");
            
            REcmaHelper::registerFunction(&engine, proto, getTransactionStack, "getTransactionStack");
            
            REcmaHelper::registerFunction(&engine, proto, clear, "clear");
            
            REcmaHelper::registerFunction(&engine, proto, queryClosestXY, "queryClosestXY");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllObjects, "queryAllObjects");
            
            REcmaHelper::registerFunction(&engine, proto, querySelectedLayers, "querySelectedLayers");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllVisibleEntities, "queryAllVisibleEntities");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllEntities, "queryAllEntities");
            
            REcmaHelper::registerFunction(&engine, proto, queryWorkingSetEntities, "queryWorkingSetEntities");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllUcs, "queryAllUcs");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllLayers, "queryAllLayers");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllLayerStates, "queryAllLayerStates");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllBlocks, "queryAllBlocks");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllLayoutBlocks, "queryAllLayoutBlocks");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllLayouts, "queryAllLayouts");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllViews, "queryAllViews");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllLinetypes, "queryAllLinetypes");
            
            REcmaHelper::registerFunction(&engine, proto, queryLayerEntities, "queryLayerEntities");
            
            REcmaHelper::registerFunction(&engine, proto, querySelectedLayerEntities, "querySelectedLayerEntities");
            
            REcmaHelper::registerFunction(&engine, proto, hasBlockEntities, "hasBlockEntities");
            
            REcmaHelper::registerFunction(&engine, proto, queryBlockEntities, "queryBlockEntities");
            
            REcmaHelper::registerFunction(&engine, proto, queryLayerBlockEntities, "queryLayerBlockEntities");
            
            REcmaHelper::registerFunction(&engine, proto, queryChildEntities, "queryChildEntities");
            
            REcmaHelper::registerFunction(&engine, proto, hasChildEntities, "hasChildEntities");
            
            REcmaHelper::registerFunction(&engine, proto, queryBlockReferences, "queryBlockReferences");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllBlockReferences, "queryAllBlockReferences");
            
            REcmaHelper::registerFunction(&engine, proto, queryAllViewports, "queryAllViewports");
            
            REcmaHelper::registerFunction(&engine, proto, queryContainedEntities, "queryContainedEntities");
            
            REcmaHelper::registerFunction(&engine, proto, queryInfiniteEntities, "queryInfiniteEntities");
            
            REcmaHelper::registerFunction(&engine, proto, queryIntersectedEntitiesXYFast, "queryIntersectedEntitiesXYFast");
            
            REcmaHelper::registerFunction(&engine, proto, queryIntersectedShapesXYFast, "queryIntersectedShapesXYFast");
            
            REcmaHelper::registerFunction(&engine, proto, queryIntersectedEntitiesXY, "queryIntersectedEntitiesXY");
            
            REcmaHelper::registerFunction(&engine, proto, queryIntersectedShapesXY, "queryIntersectedShapesXY");
            
            REcmaHelper::registerFunction(&engine, proto, queryContainedEntitiesXY, "queryContainedEntitiesXY");
            
            REcmaHelper::registerFunction(&engine, proto, querySelectedEntities, "querySelectedEntities");
            
            REcmaHelper::registerFunction(&engine, proto, queryConnectedEntities, "queryConnectedEntities");
            
            REcmaHelper::registerFunction(&engine, proto, queryPropertyEditorObjects, "queryPropertyEditorObjects");
            
            REcmaHelper::registerFunction(&engine, proto, queryDocumentVariables, "queryDocumentVariables");
            
            REcmaHelper::registerFunction(&engine, proto, queryDocumentVariablesDirect, "queryDocumentVariablesDirect");
            
            REcmaHelper::registerFunction(&engine, proto, queryObject, "queryObject");
            
            REcmaHelper::registerFunction(&engine, proto, queryObjectDirect, "queryObjectDirect");
            
            REcmaHelper::registerFunction(&engine, proto, queryObjectByHandle, "queryObjectByHandle");
            
            REcmaHelper::registerFunction(&engine, proto, queryEntity, "queryEntity");
            
            REcmaHelper::registerFunction(&engine, proto, queryEntityDirect, "queryEntityDirect");
            
            REcmaHelper::registerFunction(&engine, proto, queryVisibleEntityDirect, "queryVisibleEntityDirect");
            
            REcmaHelper::registerFunction(&engine, proto, queryUcs, "queryUcs");
            
            REcmaHelper::registerFunction(&engine, proto, queryLayer, "queryLayer");
            
            REcmaHelper::registerFunction(&engine, proto, queryLayerDirect, "queryLayerDirect");
            
            REcmaHelper::registerFunction(&engine, proto, queryLayerState, "queryLayerState");
            
            REcmaHelper::registerFunction(&engine, proto, queryLayerStateDirect, "queryLayerStateDirect");
            
            REcmaHelper::registerFunction(&engine, proto, queryLayout, "queryLayout");
            
            REcmaHelper::registerFunction(&engine, proto, queryLayoutDirect, "queryLayoutDirect");
            
            REcmaHelper::registerFunction(&engine, proto, queryBlock, "queryBlock");
            
            REcmaHelper::registerFunction(&engine, proto, queryBlockDirect, "queryBlockDirect");
            
            REcmaHelper::registerFunction(&engine, proto, queryView, "queryView");
            
            REcmaHelper::registerFunction(&engine, proto, queryLinetype, "queryLinetype");
            
            REcmaHelper::registerFunction(&engine, proto, countSelectedEntities, "countSelectedEntities");
            
            REcmaHelper::registerFunction(&engine, proto, clearSelection, "clearSelection");
            
            REcmaHelper::registerFunction(&engine, proto, selectAllEntities, "selectAllEntities");
            
            REcmaHelper::registerFunction(&engine, proto, selectEntity, "selectEntity");
            
            REcmaHelper::registerFunction(&engine, proto, deselectEntity, "deselectEntity");
            
            REcmaHelper::registerFunction(&engine, proto, selectEntities, "selectEntities");
            
            REcmaHelper::registerFunction(&engine, proto, deselectEntities, "deselectEntities");
            
            REcmaHelper::registerFunction(&engine, proto, isSelected, "isSelected");
            
            REcmaHelper::registerFunction(&engine, proto, isSelectedWorkingSet, "isSelectedWorkingSet");
            
            REcmaHelper::registerFunction(&engine, proto, isLayerLocked, "isLayerLocked");
            
            REcmaHelper::registerFunction(&engine, proto, isParentLayerLocked, "isParentLayerLocked");
            
            REcmaHelper::registerFunction(&engine, proto, isEntity, "isEntity");
            
            REcmaHelper::registerFunction(&engine, proto, isEntityEditable, "isEntityEditable");
            
            REcmaHelper::registerFunction(&engine, proto, isLayerOff, "isLayerOff");
            
            REcmaHelper::registerFunction(&engine, proto, isLayerOffOrFrozen, "isLayerOffOrFrozen");
            
            REcmaHelper::registerFunction(&engine, proto, isLayerFrozen, "isLayerFrozen");
            
            REcmaHelper::registerFunction(&engine, proto, isLayerPlottable, "isLayerPlottable");
            
            REcmaHelper::registerFunction(&engine, proto, isLayerSnappable, "isLayerSnappable");
            
            REcmaHelper::registerFunction(&engine, proto, isParentLayerFrozen, "isParentLayerFrozen");
            
            REcmaHelper::registerFunction(&engine, proto, isBlockFrozen, "isBlockFrozen");
            
            REcmaHelper::registerFunction(&engine, proto, isLayoutBlock, "isLayoutBlock");
            
            REcmaHelper::registerFunction(&engine, proto, isEntityLayerFrozen, "isEntityLayerFrozen");
            
            REcmaHelper::registerFunction(&engine, proto, isEntityVisible, "isEntityVisible");
            
            REcmaHelper::registerFunction(&engine, proto, isParentLayerSnappable, "isParentLayerSnappable");
            
            REcmaHelper::registerFunction(&engine, proto, isParentLayerPlottable, "isParentLayerPlottable");
            
            REcmaHelper::registerFunction(&engine, proto, hasSelection, "hasSelection");
            
            REcmaHelper::registerFunction(&engine, proto, getBoundingBox, "getBoundingBox");
            
            REcmaHelper::registerFunction(&engine, proto, getSelectionBox, "getSelectionBox");
            
            REcmaHelper::registerFunction(&engine, proto, getEntitiesBox, "getEntitiesBox");
            
            REcmaHelper::registerFunction(&engine, proto, clearSpatialIndices, "clearSpatialIndices");
            
            REcmaHelper::registerFunction(&engine, proto, rebuildSpatialIndex, "rebuildSpatialIndex");
            
            REcmaHelper::registerFunction(&engine, proto, addToSpatialIndex, "addToSpatialIndex");
            
            REcmaHelper::registerFunction(&engine, proto, blockContainsReferences, "blockContainsReferences");
            
            REcmaHelper::registerFunction(&engine, proto, removeBlockFromSpatialIndex, "removeBlockFromSpatialIndex");
            
            REcmaHelper::registerFunction(&engine, proto, addBlockToSpatialIndex, "addBlockToSpatialIndex");
            
            REcmaHelper::registerFunction(&engine, proto, removeFromSpatialIndex, "removeFromSpatialIndex");
            
            REcmaHelper::registerFunction(&engine, proto, updateAllEntities, "updateAllEntities");
            
            REcmaHelper::registerFunction(&engine, proto, undo, "undo");
            
            REcmaHelper::registerFunction(&engine, proto, redo, "redo");
            
            REcmaHelper::registerFunction(&engine, proto, isUndoAvailable, "isUndoAvailable");
            
            REcmaHelper::registerFunction(&engine, proto, isRedoAvailable, "isRedoAvailable");
            
            REcmaHelper::registerFunction(&engine, proto, startTransactionGroup, "startTransactionGroup");
            
            REcmaHelper::registerFunction(&engine, proto, getTransactionGroup, "getTransactionGroup");
            
            REcmaHelper::registerFunction(&engine, proto, setAutoTransactionGroup, "setAutoTransactionGroup");
            
            REcmaHelper::registerFunction(&engine, proto, getAutoTransactionGroup, "getAutoTransactionGroup");
            
            REcmaHelper::registerFunction(&engine, proto, resetTransactionStack, "resetTransactionStack");
            
            REcmaHelper::registerFunction(&engine, proto, setFileName, "setFileName");
            
            REcmaHelper::registerFunction(&engine, proto, getFileName, "getFileName");
            
            REcmaHelper::registerFunction(&engine, proto, setFileVersion, "setFileVersion");
            
            REcmaHelper::registerFunction(&engine, proto, getFileVersion, "getFileVersion");
            
            REcmaHelper::registerFunction(&engine, proto, queryCurrentLayer, "queryCurrentLayer");
            
            REcmaHelper::registerFunction(&engine, proto, setCurrentLayer, "setCurrentLayer");
            
            REcmaHelper::registerFunction(&engine, proto, getCurrentLayerId, "getCurrentLayerId");
            
            REcmaHelper::registerFunction(&engine, proto, getCurrentLayerName, "getCurrentLayerName");
            
            REcmaHelper::registerFunction(&engine, proto, setCurrentColor, "setCurrentColor");
            
            REcmaHelper::registerFunction(&engine, proto, getCurrentColor, "getCurrentColor");
            
            REcmaHelper::registerFunction(&engine, proto, setCurrentLineweight, "setCurrentLineweight");
            
            REcmaHelper::registerFunction(&engine, proto, getCurrentLineweight, "getCurrentLineweight");
            
            REcmaHelper::registerFunction(&engine, proto, setCurrentLinetype, "setCurrentLinetype");
            
            REcmaHelper::registerFunction(&engine, proto, setCurrentLinetypePattern, "setCurrentLinetypePattern");
            
            REcmaHelper::registerFunction(&engine, proto, getCurrentLinetypeId, "getCurrentLinetypeId");
            
            REcmaHelper::registerFunction(&engine, proto, getCurrentLinetypePattern, "getCurrentLinetypePattern");
            
            REcmaHelper::registerFunction(&engine, proto, queryCurrentBlock, "queryCurrentBlock");
            
            REcmaHelper::registerFunction(&engine, proto, setCurrentBlock, "setCurrentBlock");
            
            REcmaHelper::registerFunction(&engine, proto, getCurrentBlockId, "getCurrentBlockId");
            
            REcmaHelper::registerFunction(&engine, proto, getCurrentBlockName, "getCurrentBlockName");
            
            REcmaHelper::registerFunction(&engine, proto, setCurrentViewport, "setCurrentViewport");
            
            REcmaHelper::registerFunction(&engine, proto, getCurrentViewportId, "getCurrentViewportId");
            
            REcmaHelper::registerFunction(&engine, proto, hasCurrentViewport, "hasCurrentViewport");
            
            REcmaHelper::registerFunction(&engine, proto, unsetCurrentViewport, "unsetCurrentViewport");
            
            REcmaHelper::registerFunction(&engine, proto, queryCurrentView, "queryCurrentView");
            
            REcmaHelper::registerFunction(&engine, proto, setCurrentView, "setCurrentView");
            
            REcmaHelper::registerFunction(&engine, proto, getCurrentViewId, "getCurrentViewId");
            
            REcmaHelper::registerFunction(&engine, proto, getTempBlockName, "getTempBlockName");
            
            REcmaHelper::registerFunction(&engine, proto, getBlockName, "getBlockName");
            
            REcmaHelper::registerFunction(&engine, proto, getBlockNameFromLayout, "getBlockNameFromLayout");
            
            REcmaHelper::registerFunction(&engine, proto, getBlockNames, "getBlockNames");
            
            REcmaHelper::registerFunction(&engine, proto, sortBlocks, "sortBlocks");
            
            REcmaHelper::registerFunction(&engine, proto, sortLayers, "sortLayers");
            
            REcmaHelper::registerFunction(&engine, proto, getLayerName, "getLayerName");
            
            REcmaHelper::registerFunction(&engine, proto, getLayerNames, "getLayerNames");
            
            REcmaHelper::registerFunction(&engine, proto, getLayerStateName, "getLayerStateName");
            
            REcmaHelper::registerFunction(&engine, proto, getLayerStateNames, "getLayerStateNames");
            
            REcmaHelper::registerFunction(&engine, proto, getLayoutName, "getLayoutName");
            
            REcmaHelper::registerFunction(&engine, proto, getViewNames, "getViewNames");
            
            REcmaHelper::registerFunction(&engine, proto, hasLayer, "hasLayer");
            
            REcmaHelper::registerFunction(&engine, proto, hasLayerStates, "hasLayerStates");
            
            REcmaHelper::registerFunction(&engine, proto, hasLayerState, "hasLayerState");
            
            REcmaHelper::registerFunction(&engine, proto, hasBlock, "hasBlock");
            
            REcmaHelper::registerFunction(&engine, proto, hasLayout, "hasLayout");
            
            REcmaHelper::registerFunction(&engine, proto, hasView, "hasView");
            
            REcmaHelper::registerFunction(&engine, proto, hasLinetype, "hasLinetype");
            
            REcmaHelper::registerFunction(&engine, proto, getLayerId, "getLayerId");
            
            REcmaHelper::registerFunction(&engine, proto, getLayer0Id, "getLayer0Id");
            
            REcmaHelper::registerFunction(&engine, proto, getLayerStateId, "getLayerStateId");
            
            REcmaHelper::registerFunction(&engine, proto, getBlockId, "getBlockId");
            
            REcmaHelper::registerFunction(&engine, proto, getBlockIdAuto, "getBlockIdAuto");
            
            REcmaHelper::registerFunction(&engine, proto, getModelSpaceBlockId, "getModelSpaceBlockId");
            
            REcmaHelper::registerFunction(&engine, proto, getLinetypeId, "getLinetypeId");
            
            REcmaHelper::registerFunction(&engine, proto, getLinetypeByLayerId, "getLinetypeByLayerId");
            
            REcmaHelper::registerFunction(&engine, proto, getLinetypeByBlockId, "getLinetypeByBlockId");
            
            REcmaHelper::registerFunction(&engine, proto, getLinetypeName, "getLinetypeName");
            
            REcmaHelper::registerFunction(&engine, proto, getLinetypeDescription, "getLinetypeDescription");
            
            REcmaHelper::registerFunction(&engine, proto, getLinetypeLabel, "getLinetypeLabel");
            
            REcmaHelper::registerFunction(&engine, proto, getLinetypeNames, "getLinetypeNames");
            
            REcmaHelper::registerFunction(&engine, proto, getLinetypePatterns, "getLinetypePatterns");
            
            REcmaHelper::registerFunction(&engine, proto, isByLayer, "isByLayer");
            
            REcmaHelper::registerFunction(&engine, proto, isByBlock, "isByBlock");
            
            REcmaHelper::registerFunction(&engine, proto, getMaxLineweight, "getMaxLineweight");
            
            REcmaHelper::registerFunction(&engine, proto, getVariables, "getVariables");
            
            REcmaHelper::registerFunction(&engine, proto, setVariable, "setVariable");
            
            REcmaHelper::registerFunction(&engine, proto, getVariable, "getVariable");
            
            REcmaHelper::registerFunction(&engine, proto, hasVariable, "hasVariable");
            
            REcmaHelper::registerFunction(&engine, proto, removeVariable, "removeVariable");
            
            REcmaHelper::registerFunction(&engine, proto, setKnownVariable, "setKnownVariable");
            
            REcmaHelper::registerFunction(&engine, proto, getKnownVariable, "getKnownVariable");
            
            REcmaHelper::registerFunction(&engine, proto, setUnit, "setUnit");
            
            REcmaHelper::registerFunction(&engine, proto, getUnit, "getUnit");
            
            REcmaHelper::registerFunction(&engine, proto, setMeasurement, "setMeasurement");
            
            REcmaHelper::registerFunction(&engine, proto, getMeasurement, "getMeasurement");
            
            REcmaHelper::registerFunction(&engine, proto, isMetric, "isMetric");
            
            REcmaHelper::registerFunction(&engine, proto, setDimensionFont, "setDimensionFont");
            
            REcmaHelper::registerFunction(&engine, proto, getDimensionFont, "getDimensionFont");
            
            REcmaHelper::registerFunction(&engine, proto, setLinetypeScale, "setLinetypeScale");
            
            REcmaHelper::registerFunction(&engine, proto, getLinetypeScale, "getLinetypeScale");
            
            REcmaHelper::registerFunction(&engine, proto, formatLinear, "formatLinear");
            
            REcmaHelper::registerFunction(&engine, proto, formatAngle, "formatAngle");
            
            REcmaHelper::registerFunction(&engine, proto, setLinearFormat, "setLinearFormat");
            
            REcmaHelper::registerFunction(&engine, proto, getLinearFormat, "getLinearFormat");
            
            REcmaHelper::registerFunction(&engine, proto, getLinearPrecision, "getLinearPrecision");
            
            REcmaHelper::registerFunction(&engine, proto, showLeadingZeroes, "showLeadingZeroes");
            
            REcmaHelper::registerFunction(&engine, proto, showTrailingZeroes, "showTrailingZeroes");
            
            REcmaHelper::registerFunction(&engine, proto, showLeadingZeroesAngle, "showLeadingZeroesAngle");
            
            REcmaHelper::registerFunction(&engine, proto, showTrailingZeroesAngle, "showTrailingZeroesAngle");
            
            REcmaHelper::registerFunction(&engine, proto, getAngleFormat, "getAngleFormat");
            
            REcmaHelper::registerFunction(&engine, proto, getAnglePrecision, "getAnglePrecision");
            
            REcmaHelper::registerFunction(&engine, proto, getDecimalSeparator, "getDecimalSeparator");
            
            REcmaHelper::registerFunction(&engine, proto, isModified, "isModified");
            
            REcmaHelper::registerFunction(&engine, proto, getLastModifiedDateTime, "getLastModifiedDateTime");
            
            REcmaHelper::registerFunction(&engine, proto, getLastModified, "getLastModified");
            
            REcmaHelper::registerFunction(&engine, proto, setModified, "setModified");
            
            REcmaHelper::registerFunction(&engine, proto, copyVariablesFrom, "copyVariablesFrom");
            
            REcmaHelper::registerFunction(&engine, proto, addAutoVariable, "addAutoVariable");
            
            REcmaHelper::registerFunction(&engine, proto, getAutoVariables, "getAutoVariables");
            
            REcmaHelper::registerFunction(&engine, proto, substituteAutoVariables, "substituteAutoVariables");
            
            REcmaHelper::registerFunction(&engine, proto, eval, "eval");
            
            REcmaHelper::registerFunction(&engine, proto, isEditingWorkingSet, "isEditingWorkingSet");
            
            REcmaHelper::registerFunction(&engine, proto, setIgnoreWorkingSet, "setIgnoreWorkingSet");
            
            REcmaHelper::registerFunction(&engine, proto, dump, "dump");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RDocument*>(), *proto);

        
    

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
    
    // static methods:
    
            REcmaHelper::registerFunction(&engine, &ctor, getClipboard, "getClipboard");
            

    // static properties:
    

    // enum values:
    

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

    QScriptValue result;
        
            // generate constructor variants:
            
    if( context->argumentCount() ==
        2
                && (
                
                        context->argument(
                        0
                        ).isVariant()
                        ||
                    
                        context->argument(
                        0
                        ).isQObject()
                        ||
                    
                        context->argument(
                        0
                        ).isNull()
                ) /* type: RStorage */
            
                && (
                
                        context->argument(
                        1
                        ).isVariant()
                        ||
                    
                        context->argument(
                        1
                        ).isQObject()
                        ||
                    
                        context->argument(
                        1
                        ).isNull()
                ) /* type: RSpatialIndex */
            
    ){
    // prepare arguments:
    
                    // argument is reference
                    RStorage*
                    ap0 =
                    qscriptvalue_cast<
                    RStorage*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RStorage*.",
                               context);                    
                    }
                    RStorage& a0 = *ap0;
                
                    // argument is reference
                    RSpatialIndex*
                    ap1 =
                    qscriptvalue_cast<
                    RSpatialIndex*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if( ap1 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 1 is not of type RSpatialIndex*.",
                               context);                    
                    }
                    RSpatialIndex& a1 = *ap1;
                
    // end of arguments

    // call C++ constructor:
    
            // non-copyable class:
            RDocument
                    * cppResult =
                    new
                    RDocument
                    (
                    a0
        ,
    a1
                    );
                
                    // 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("RDocument(): no matching constructor found."),
           context);
    }
    
    return result;
    }
    

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

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

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

        return qScriptValueFromSequence(engine, list);
    }
    

    // properties:
    

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

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

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

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


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

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RTransaction * */
    
    ){
    // prepare arguments:
    
                    // argument is pointer
                    RTransaction * a0 = NULL;

                    a0 = 
                        REcmaHelper::scriptValueTo<RTransaction >(
                            context->argument(0)
                        );
                    
                    if (a0==NULL && 
                        !context->argument(0).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 0 is not of type RTransaction *RTransaction *.", context);                    
                    }
                
    // end of arguments

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


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

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

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

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


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

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

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

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


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

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


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

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

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

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


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

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


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'RSpatialIndex *'
    RSpatialIndex * cppResult =
        
               self->getSpatialIndexForCurrentBlock();
        // return type: RSpatialIndex *
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

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

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


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

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

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

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


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

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


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

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

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

    // call C++ function:
    // return type 'REntity::Id'
    REntity::Id cppResult =
        
               self->queryClosestXY(a0
        ,
    a1
        ,
    a2);
        // return type: REntity::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

    // call C++ function:
    // return type 'REntity::Id'
    REntity::Id cppResult =
        
               self->queryClosestXY(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: REntity::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

    // call C++ function:
    // return type 'REntity::Id'
    REntity::Id cppResult =
        
               self->queryClosestXY(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: REntity::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

    // call C++ function:
    // return type 'REntity::Id'
    REntity::Id cppResult =
        
               self->queryClosestXY(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
        // return type: REntity::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    4 && (
            context->argument(0).isArray()
        ) /* type: QSet < REntity::Id > */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RVector */
     && (
            context->argument(2).isNumber()
        ) /* type: double */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isArray
                    QSet < REntity::Id >
                    a0;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(0),
                        a0
                    );
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RVector*
                    ap1 =
                    qscriptvalue_cast<
                    RVector*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if (ap1 == NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 1 is not of type RVector.",
                               context);                    
                    }
                    RVector 
                    a1 = 
                    *ap1;
                
                    // argument isStandardType
                    double
                    a2 =
                    (double)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'REntity::Id'
    REntity::Id cppResult =
        
               self->queryClosestXY(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: REntity::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isArray()
        ) /* type: QSet < REntity::Id > */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RVector */
     && (
            context->argument(2).isNumber()
        ) /* type: double */
     && (
            context->argument(3).isBool()
        ) /* type: bool */
     && (
            context->argument(4).isNumber()
        ) /* type: double */
    
    ){
    // prepare arguments:
    
                    // argument isArray
                    QSet < REntity::Id >
                    a0;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(0),
                        a0
                    );
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RVector*
                    ap1 =
                    qscriptvalue_cast<
                    RVector*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if (ap1 == NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 1 is not of type RVector.",
                               context);                    
                    }
                    RVector 
                    a1 = 
                    *ap1;
                
                    // argument isStandardType
                    double
                    a2 =
                    (double)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isStandardType
                    double
                    a4 =
                    (double)
                    
                    context->argument( 4 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'REntity::Id'
    REntity::Id cppResult =
        
               self->queryClosestXY(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: REntity::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < RObject::Id >'
    QSet < RObject::Id > cppResult =
        
               self->queryAllObjects();
        // return type: QSet < RObject::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < RObject::Id >'
    QSet < RObject::Id > cppResult =
        
               self->querySelectedLayers();
        // return type: QSet < RObject::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryAllVisibleEntities();
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryAllEntities();
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryAllEntities(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryAllEntities(a0
        ,
    a1);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryAllEntities(a0
        ,
    a1
        ,
    a2);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isBool()
        ) /* type: bool */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
     && (
            context->argument(2).isArray()
        ) /* type: QList < RS::EntityType > */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    bool
                    a0 =
                    (bool)
                    
                    context->argument( 0 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
                    // argument isArray
                    QList < RS::EntityType >
                    a2;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(2),
                        a2
                    );
                
    // end of arguments

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryAllEntities(a0
        ,
    a1
        ,
    a2);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryWorkingSetEntities();
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < RUcs::Id >'
    QSet < RUcs::Id > cppResult =
        
               self->queryAllUcs();
        // return type: QSet < RUcs::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < RLayer::Id >'
    QSet < RLayer::Id > cppResult =
        
               self->queryAllLayers();
        // return type: QSet < RLayer::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < RLayerState::Id >'
    QSet < RLayerState::Id > cppResult =
        
               self->queryAllLayerStates();
        // return type: QSet < RLayerState::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < RBlock::Id >'
    QSet < RBlock::Id > cppResult =
        
               self->queryAllBlocks();
        // return type: QSet < RBlock::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < RBlock::Id >'
    QSet < RBlock::Id > cppResult =
        
               self->queryAllLayoutBlocks();
        // return type: QSet < RBlock::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < RBlock::Id >'
    QSet < RBlock::Id > cppResult =
        
               self->queryAllLayoutBlocks(a0);
        // return type: QSet < RBlock::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < RBlock::Id >'
    QSet < RBlock::Id > cppResult =
        
               self->queryAllLayouts();
        // return type: QSet < RBlock::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < RView::Id >'
    QSet < RView::Id > cppResult =
        
               self->queryAllViews();
        // return type: QSet < RView::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < RLinetype::Id >'
    QSet < RLinetype::Id > cppResult =
        
               self->queryAllLinetypes();
        // return type: QSet < RLinetype::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryLayerEntities(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryLayerEntities(a0
        ,
    a1);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->querySelectedLayerEntities(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->querySelectedLayerEntities(a0
        ,
    a1);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryBlockEntities(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryLayerBlockEntities(a0
        ,
    a1);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryChildEntities(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryChildEntities(a0
        ,
    a1);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryBlockReferences(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryAllBlockReferences();
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryAllViewports();
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryContainedEntities(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryInfiniteEntities();
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryIntersectedEntitiesXYFast(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryIntersectedShapesXYFast(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryIntersectedShapesXYFast(a0
        ,
    a1);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryIntersectedEntitiesXY(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryIntersectedEntitiesXY(a0
        ,
    a1);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryIntersectedEntitiesXY(a0
        ,
    a1
        ,
    a2);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryIntersectedEntitiesXY(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RBox */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isNumber()
        ) /* type: RBlock::Id */
     && (
            context->argument(4).isArray()
        ) /* type: QList < RS::EntityType > */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RBox*
                    ap0 =
                    qscriptvalue_cast<
                    RBox*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RBox.",
                               context);                    
                    }
                    RBox 
                    a0 = 
                    *ap0;
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    RBlock::Id
                    a3 =
                    (RBlock::Id)
                    (int)
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isArray
                    QList < RS::EntityType >
                    a4;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(4),
                        a4
                    );
                
    // end of arguments

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryIntersectedEntitiesXY(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


        
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RBox */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isNumber()
        ) /* type: RBlock::Id */
     && (
            context->argument(4).isArray()
        ) /* type: QList < RS::EntityType > */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RBox*
                    ap0 =
                    qscriptvalue_cast<
                    RBox*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RBox.",
                               context);                    
                    }
                    RBox 
                    a0 = 
                    *ap0;
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    RBlock::Id
                    a3 =
                    (RBlock::Id)
                    (int)
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isArray
                    QList < RS::EntityType >
                    a4;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(4),
                        a4
                    );
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryIntersectedEntitiesXY(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


        
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RBox */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isNumber()
        ) /* type: RBlock::Id */
     && (
            context->argument(4).isArray()
        ) /* type: QList < RS::EntityType > */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
     && (
            context->argument(6).isNumber()
        ) /* type: RLayer::Id */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RBox*
                    ap0 =
                    qscriptvalue_cast<
                    RBox*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RBox.",
                               context);                    
                    }
                    RBox 
                    a0 = 
                    *ap0;
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    RBlock::Id
                    a3 =
                    (RBlock::Id)
                    (int)
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isArray
                    QList < RS::EntityType >
                    a4;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(4),
                        a4
                    );
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
                    // argument isStandardType
                    RLayer::Id
                    a6 =
                    (RLayer::Id)
                    (int)
                    context->argument( 6 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryIntersectedEntitiesXY(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

    // call C++ function:
    // return type 'QMap < REntity::Id , QSet < int > >'
    QMap < REntity::Id , QSet < int > > cppResult =
        
               self->queryIntersectedShapesXY(a0);
        // return type: QMap < REntity::Id , QSet < int > >
                // 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: RBox */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RBox*
                    ap0 =
                    qscriptvalue_cast<
                    RBox*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RBox.",
                               context);                    
                    }
                    RBox 
                    a0 = 
                    *ap0;
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QMap < REntity::Id , QSet < int > >'
    QMap < REntity::Id , QSet < int > > cppResult =
        
               self->queryIntersectedShapesXY(a0
        ,
    a1);
        // return type: QMap < REntity::Id , QSet < int > >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

    // call C++ function:
    // return type 'QMap < REntity::Id , QSet < int > >'
    QMap < REntity::Id , QSet < int > > cppResult =
        
               self->queryIntersectedShapesXY(a0
        ,
    a1
        ,
    a2);
        // return type: QMap < REntity::Id , QSet < int > >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

    // call C++ function:
    // return type 'QMap < REntity::Id , QSet < int > >'
    QMap < REntity::Id , QSet < int > > cppResult =
        
               self->queryIntersectedShapesXY(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QMap < REntity::Id , QSet < int > >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RBox */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isNumber()
        ) /* type: RBlock::Id */
     && (
            context->argument(4).isArray()
        ) /* type: QList < RS::EntityType > */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RBox*
                    ap0 =
                    qscriptvalue_cast<
                    RBox*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RBox.",
                               context);                    
                    }
                    RBox 
                    a0 = 
                    *ap0;
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    RBlock::Id
                    a3 =
                    (RBlock::Id)
                    (int)
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isArray
                    QList < RS::EntityType >
                    a4;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(4),
                        a4
                    );
                
    // end of arguments

    // call C++ function:
    // return type 'QMap < REntity::Id , QSet < int > >'
    QMap < REntity::Id , QSet < int > > cppResult =
        
               self->queryIntersectedShapesXY(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4);
        // return type: QMap < REntity::Id , QSet < int > >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RBox */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isNumber()
        ) /* type: RBlock::Id */
     && (
            context->argument(4).isArray()
        ) /* type: QList < RS::EntityType > */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RBox*
                    ap0 =
                    qscriptvalue_cast<
                    RBox*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RBox.",
                               context);                    
                    }
                    RBox 
                    a0 = 
                    *ap0;
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    RBlock::Id
                    a3 =
                    (RBlock::Id)
                    (int)
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isArray
                    QList < RS::EntityType >
                    a4;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(4),
                        a4
                    );
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QMap < REntity::Id , QSet < int > >'
    QMap < REntity::Id , QSet < int > > cppResult =
        
               self->queryIntersectedShapesXY(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
        // return type: QMap < REntity::Id , QSet < int > >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RBox */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
     && (
            context->argument(3).isNumber()
        ) /* type: RBlock::Id */
     && (
            context->argument(4).isArray()
        ) /* type: QList < RS::EntityType > */
     && (
            context->argument(5).isBool()
        ) /* type: bool */
     && (
            context->argument(6).isNumber()
        ) /* type: RLayer::Id */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RBox*
                    ap0 =
                    qscriptvalue_cast<
                    RBox*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RBox.",
                               context);                    
                    }
                    RBox 
                    a0 = 
                    *ap0;
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    RBlock::Id
                    a3 =
                    (RBlock::Id)
                    (int)
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isArray
                    QList < RS::EntityType >
                    a4;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(4),
                        a4
                    );
                
                    // argument isStandardType
                    bool
                    a5 =
                    (bool)
                    
                    context->argument( 5 ).
                    toBool();
                
                    // argument isStandardType
                    RLayer::Id
                    a6 =
                    (RLayer::Id)
                    (int)
                    context->argument( 6 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'QMap < REntity::Id , QSet < int > >'
    QMap < REntity::Id , QSet < int > > cppResult =
        
               self->queryIntersectedShapesXY(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6);
        // return type: QMap < REntity::Id , QSet < int > >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryContainedEntitiesXY(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->querySelectedEntities();
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryConnectedEntities(a0);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryConnectedEntities(a0
        ,
    a1);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < REntity::Id >'
    QSet < REntity::Id > cppResult =
        
               self->queryConnectedEntities(a0
        ,
    a1
        ,
    a2);
        // return type: QSet < REntity::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSet < RObject::Id >'
    QSet < RObject::Id > cppResult =
        
               self->queryPropertyEditorObjects();
        // return type: QSet < RObject::Id >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

    // call C++ function:
    // return type 'QSharedPointer < RDocumentVariables >'
    QSharedPointer < RDocumentVariables > cppResult =
        
               self->queryDocumentVariables();
        // return type: QSharedPointer < RDocumentVariables >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

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

    // call C++ function:
    // return type 'QSharedPointer < RDocumentVariables >'
    QSharedPointer < RDocumentVariables > cppResult =
        
               self->queryDocumentVariablesDirect();
        // return type: QSharedPointer < RDocumentVariables >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

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

    // call C++ function:
    // return type 'QSharedPointer < RObject >'
    QSharedPointer < RObject > cppResult =
        
               self->queryObject(a0);
        // return type: QSharedPointer < RObject >
                // Shared pointer to object, cast to best match:
                result = REcmaHelper::toScriptValue(engine, cppResult);
            
    } else


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

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

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

    // call C++ function:
    // return type 'QSharedPointer < RObject >'
    QSharedPointer < RObject > cppResult =
        
               self->queryObjectDirect(a0);
        // return type: QSharedPointer < RObject >
                // Shared pointer to object, cast to best match:
                result = REcmaHelper::toScriptValue(engine, cppResult);
            
    } else


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

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

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

    // call C++ function:
    // return type 'QSharedPointer < RObject >'
    QSharedPointer < RObject > cppResult =
        
               self->queryObjectByHandle(a0);
        // return type: QSharedPointer < RObject >
                // Shared pointer to object, cast to best match:
                result = REcmaHelper::toScriptValue(engine, cppResult);
            
    } else


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

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

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

    // call C++ function:
    // return type 'QSharedPointer < REntity >'
    QSharedPointer < REntity > cppResult =
        
               self->queryEntity(a0);
        // return type: QSharedPointer < REntity >
                // Shared pointer to entity, cast to best match:
                result = REcmaHelper::toScriptValue(engine, cppResult);
            
    } else


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

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

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

    // call C++ function:
    // return type 'QSharedPointer < REntity >'
    QSharedPointer < REntity > cppResult =
        
               self->queryEntityDirect(a0);
        // return type: QSharedPointer < REntity >
                // Shared pointer to entity, cast to best match:
                result = REcmaHelper::toScriptValue(engine, cppResult);
            
    } else


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

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

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

    // call C++ function:
    // return type 'QSharedPointer < REntity >'
    QSharedPointer < REntity > cppResult =
        
               self->queryVisibleEntityDirect(a0);
        // return type: QSharedPointer < REntity >
                // Shared pointer to entity, cast to best match:
                result = REcmaHelper::toScriptValue(engine, cppResult);
            
    } else


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

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

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

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


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

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


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

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

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

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


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

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


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

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

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

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


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

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

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

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


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

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


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

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

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

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


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

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

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

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


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

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


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

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

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

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


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

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

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

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


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

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


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

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

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

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


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

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


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

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

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

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


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

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


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

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

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

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


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

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


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

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

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

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isArray()
        ) /* type: QSet < REntity::Id > * */
    
    ){
    // prepare arguments:
    
                    // argument is pointer
                    QSet < REntity::Id > * a0 = NULL;

                    a0 = 
                        REcmaHelper::scriptValueTo<QSet < REntity::Id > >(
                            context->argument(0)
                        );
                    
                    if (a0==NULL && 
                        !context->argument(0).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 0 is not of type QSet < REntity::Id > *QSet < REntity::Id > *.", context);                    
                    }
                
    // end of arguments

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isArray()
        ) /* type: QSet < REntity::Id > * */
    
    ){
    // prepare arguments:
    
                    // argument is pointer
                    QSet < REntity::Id > * a0 = NULL;

                    a0 = 
                        REcmaHelper::scriptValueTo<QSet < REntity::Id > >(
                            context->argument(0)
                        );
                    
                    if (a0==NULL && 
                        !context->argument(0).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 0 is not of type QSet < REntity::Id > *QSet < REntity::Id > *.", context);                    
                    }
                
    // end of arguments

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


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

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

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

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


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

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


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: REntity::Id */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
     && (
            context->argument(2).isArray()
        ) /* type: QSet < REntity::Id > * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    REntity::Id
                    a0 =
                    (REntity::Id)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
                    // argument is pointer
                    QSet < REntity::Id > * a2 = NULL;

                    a2 = 
                        REcmaHelper::scriptValueTo<QSet < REntity::Id > >(
                            context->argument(2)
                        );
                    
                    if (a2==NULL && 
                        !context->argument(2).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 2 is not of type QSet < REntity::Id > *QSet < REntity::Id > *.", context);                    
                    }
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->selectEntity(a0
        ,
    a1
        ,
    a2);
    } else


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

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

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

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


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: REntity::Id */
     && (
            context->argument(1).isArray()
        ) /* type: QSet < REntity::Id > * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    REntity::Id
                    a0 =
                    (REntity::Id)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is pointer
                    QSet < REntity::Id > * a1 = NULL;

                    a1 = 
                        REcmaHelper::scriptValueTo<QSet < REntity::Id > >(
                            context->argument(1)
                        );
                    
                    if (a1==NULL && 
                        !context->argument(1).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 1 is not of type QSet < REntity::Id > *QSet < REntity::Id > *.", context);                    
                    }
                
    // end of arguments

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


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isArray()
        ) /* type: QSet < REntity::Id > */
    
    ){
    // prepare arguments:
    
                    // argument isArray
                    QSet < REntity::Id >
                    a0;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(0),
                        a0
                    );
                
    // end of arguments

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


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isArray()
        ) /* type: QSet < REntity::Id > */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isArray
                    QSet < REntity::Id >
                    a0;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(0),
                        a0
                    );
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
    // end of arguments

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


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isArray()
        ) /* type: QSet < REntity::Id > */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
     && (
            context->argument(2).isArray()
        ) /* type: QSet < REntity::Id > * */
    
    ){
    // prepare arguments:
    
                    // argument isArray
                    QSet < REntity::Id >
                    a0;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(0),
                        a0
                    );
                
                    // argument isStandardType
                    bool
                    a1 =
                    (bool)
                    
                    context->argument( 1 ).
                    toBool();
                
                    // argument is pointer
                    QSet < REntity::Id > * a2 = NULL;

                    a2 = 
                        REcmaHelper::scriptValueTo<QSet < REntity::Id > >(
                            context->argument(2)
                        );
                    
                    if (a2==NULL && 
                        !context->argument(2).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 2 is not of type QSet < REntity::Id > *QSet < REntity::Id > *.", context);                    
                    }
                
    // end of arguments

    // call C++ function:
    // return type 'int'
    int cppResult =
        
               self->selectEntities(a0
        ,
    a1
        ,
    a2);
        // return type: int
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isArray()
        ) /* type: QSet < REntity::Id > */
    
    ){
    // prepare arguments:
    
                    // argument isArray
                    QSet < REntity::Id >
                    a0;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(0),
                        a0
                    );
                
    // end of arguments

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


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isArray()
        ) /* type: QSet < REntity::Id > */
     && (
            context->argument(1).isArray()
        ) /* type: QSet < REntity::Id > * */
    
    ){
    // prepare arguments:
    
                    // argument isArray
                    QSet < REntity::Id >
                    a0;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(0),
                        a0
                    );
                
                    // argument is pointer
                    QSet < REntity::Id > * a1 = NULL;

                    a1 = 
                        REcmaHelper::scriptValueTo<QSet < REntity::Id > >(
                            context->argument(1)
                        );
                    
                    if (a1==NULL && 
                        !context->argument(1).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 1 is not of type QSet < REntity::Id > *QSet < REntity::Id > *.", context);                    
                    }
                
    // end of arguments

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


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

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

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

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


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

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

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

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RLayer */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RLayer*
                    ap0 =
                    qscriptvalue_cast<
                    RLayer*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RLayer*.",
                               context);                    
                    }
                    RLayer& a0 = *ap0;
                
    // end of arguments

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RLayer */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RLayer*
                    ap0 =
                    qscriptvalue_cast<
                    RLayer*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RLayer*.",
                               context);                    
                    }
                    RLayer& a0 = *ap0;
                
    // end of arguments

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


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

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

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

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


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

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

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

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RLayer */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RLayer*
                    ap0 =
                    qscriptvalue_cast<
                    RLayer*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RLayer*.",
                               context);                    
                    }
                    RLayer& a0 = *ap0;
                
    // end of arguments

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RLayer */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RLayer*
                    ap0 =
                    qscriptvalue_cast<
                    RLayer*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RLayer*.",
                               context);                    
                    }
                    RLayer& a0 = *ap0;
                
    // end of arguments

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RLayer */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RLayer*
                    ap0 =
                    qscriptvalue_cast<
                    RLayer*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RLayer*.",
                               context);                    
                    }
                    RLayer& a0 = *ap0;
                
    // end of arguments

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RLayer */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RLayer*
                    ap0 =
                    qscriptvalue_cast<
                    RLayer*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RLayer*.",
                               context);                    
                    }
                    RLayer& a0 = *ap0;
                
    // end of arguments

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RLayer */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RLayer*
                    ap0 =
                    qscriptvalue_cast<
                    RLayer*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RLayer*.",
                               context);                    
                    }
                    RLayer& a0 = *ap0;
                
    // end of arguments

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RLayer */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RLayer*
                    ap0 =
                    qscriptvalue_cast<
                    RLayer*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RLayer*.",
                               context);                    
                    }
                    RLayer& a0 = *ap0;
                
    // end of arguments

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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


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

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RLayer */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RLayer*
                    ap0 =
                    qscriptvalue_cast<
                    RLayer*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RLayer*.",
                               context);                    
                    }
                    RLayer& a0 = *ap0;
                
    // end of arguments

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RLayer */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RLayer*
                    ap0 =
                    qscriptvalue_cast<
                    RLayer*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type RLayer*.",
                               context);                    
                    }
                    RLayer& a0 = *ap0;
                
    // end of arguments

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


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

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

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

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


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

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

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

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


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

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


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

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


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

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

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

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


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isArray()
        ) /* type: QSet < REntity::Id > */
    
    ){
    // prepare arguments:
    
                    // argument isArray
                    QSet < REntity::Id >
                    a0;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(0),
                        a0
                    );
                
    // end of arguments

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


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

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

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

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


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

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

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

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


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("addToSpatialIndex", 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: QSharedPointer < REntity > */
    
    ){
    // prepare arguments:
    
                    // argument is SharedPointer
                    QSharedPointer < REntity > 
                    a0;

                    // argument might be a simple pointer:
                     REntity * o0 = 
                    qscriptvalue_cast < REntity * > (context->argument(0));

                    if (o0!=NULL) {
                        a0 =
                        
                          // never clone RObject based object:
                          QSharedPointer < REntity >(o0);
                        
                    }
                    else {
                        // qscriptvalue_cast to QSharedPointer<BaseClass> does not work
                        QSharedPointer < REntity >*
                        p0;

                        p0 =
                        qscriptvalue_cast <QSharedPointer < REntity >* > (context->argument(0));

                        if (p0==NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type  REntity .", context);                    
                        }

                        a0 = *p0;

                           //return REcmaHelper::throwError("RDocument: Argument 0 is not of type  REntity .",
                           //    context);                    
                    }

                    //QSharedPointer < REntity > 
                    //a0 =
                    //QSharedPointer < REntity >(o0->clone());
                
    // end of arguments

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


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

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

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

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


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

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

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

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


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

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

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

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


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("removeFromSpatialIndex", 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: QSharedPointer < REntity > */
    
    ){
    // prepare arguments:
    
                    // argument is SharedPointer
                    QSharedPointer < REntity > 
                    a0;

                    // argument might be a simple pointer:
                     REntity * o0 = 
                    qscriptvalue_cast < REntity * > (context->argument(0));

                    if (o0!=NULL) {
                        a0 =
                        
                          // never clone RObject based object:
                          QSharedPointer < REntity >(o0);
                        
                    }
                    else {
                        // qscriptvalue_cast to QSharedPointer<BaseClass> does not work
                        QSharedPointer < REntity >*
                        p0;

                        p0 =
                        qscriptvalue_cast <QSharedPointer < REntity >* > (context->argument(0));

                        if (p0==NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type  REntity .", context);                    
                        }

                        a0 = *p0;

                           //return REcmaHelper::throwError("RDocument: Argument 0 is not of type  REntity .",
                           //    context);                    
                    }

                    //QSharedPointer < REntity > 
                    //a0 =
                    //QSharedPointer < REntity >(o0->clone());
                
    // end of arguments

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


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: QSharedPointer < REntity > */
     && (
            context->argument(1).isArray()
        ) /* type: QList < RBox > */
    
    ){
    // prepare arguments:
    
                    // argument is SharedPointer
                    QSharedPointer < REntity > 
                    a0;

                    // argument might be a simple pointer:
                     REntity * o0 = 
                    qscriptvalue_cast < REntity * > (context->argument(0));

                    if (o0!=NULL) {
                        a0 =
                        
                          // never clone RObject based object:
                          QSharedPointer < REntity >(o0);
                        
                    }
                    else {
                        // qscriptvalue_cast to QSharedPointer<BaseClass> does not work
                        QSharedPointer < REntity >*
                        p0;

                        p0 =
                        qscriptvalue_cast <QSharedPointer < REntity >* > (context->argument(0));

                        if (p0==NULL) {
                           return REcmaHelper::throwError("RDocument: Argument 0 is not of type  REntity .", context);                    
                        }

                        a0 = *p0;

                           //return REcmaHelper::throwError("RDocument: Argument 0 is not of type  REntity .",
                           //    context);                    
                    }

                    //QSharedPointer < REntity > 
                    //a0 =
                    //QSharedPointer < REntity >(o0->clone());
                
                    // argument isArray
                    QList < RBox >
                    a1;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(1),
                        a1
                    );
                
    // end of arguments

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("setAutoTransactionGroup", 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->setAutoTransactionGroup(a0);
    } else


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: RLayer::Id */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RTransaction * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RLayer::Id
                    a0 =
                    (RLayer::Id)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is pointer
                    RTransaction * a1 = NULL;

                    a1 = 
                        REcmaHelper::scriptValueTo<RTransaction >(
                            context->argument(1)
                        );
                    
                    if (a1==NULL && 
                        !context->argument(1).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 1 is not of type RTransaction *RTransaction *.", context);                    
                    }
                
    // end of arguments

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


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

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


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isString()
        ) /* type: QString */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RTransaction * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
                    // argument is pointer
                    RTransaction * a1 = NULL;

                    a1 = 
                        REcmaHelper::scriptValueTo<RTransaction >(
                            context->argument(1)
                        );
                    
                    if (a1==NULL && 
                        !context->argument(1).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 1 is not of type RTransaction *RTransaction *.", context);                    
                    }
                
    // end of arguments

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


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

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

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

    // call C++ function:
    // return type 'RLayer::Id'
    RLayer::Id cppResult =
        
               self->getCurrentLayerId();
        // return type: RLayer::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'RLineweight::Lineweight'
    RLineweight::Lineweight cppResult =
        
               self->getCurrentLineweight();
        // return type: RLineweight::Lineweight
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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


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

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

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


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

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

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

    // call C++ function:
    // return type 'RLinetype::Id'
    RLinetype::Id cppResult =
        
               self->getCurrentLinetypeId();
        // return type: RLinetype::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'QSharedPointer < RBlock >'
    QSharedPointer < RBlock > cppResult =
        
               self->queryCurrentBlock();
        // return type: QSharedPointer < RBlock >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

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

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


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

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


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

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

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

    // call C++ function:
    // return type 'RBlock::Id'
    RBlock::Id cppResult =
        
               self->getCurrentBlockId();
        // return type: RBlock::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'RObject::Id'
    RObject::Id cppResult =
        
               self->getCurrentViewportId();
        // return type: RObject::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'QSharedPointer < RView >'
    QSharedPointer < RView > cppResult =
        
               self->queryCurrentView();
        // return type: QSharedPointer < RView >
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


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

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

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

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


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

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


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

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

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

    // call C++ function:
    // return type 'RView::Id'
    RView::Id cppResult =
        
               self->getCurrentViewId();
        // return type: RView::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

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


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

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

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

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


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

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


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

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

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

    // call C++ function:
    // return type 'QSet < QString >'
    QSet < QString > cppResult =
        
               self->getBlockNames();
        // return type: QSet < QString >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < QString >'
    QSet < QString > cppResult =
        
               self->getBlockNames(a0);
        // return type: QSet < QString >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isArray()
        ) /* type: QList < RBlock::Id > */
    
    ){
    // prepare arguments:
    
                    // argument isArray
                    QList < RBlock::Id >
                    a0;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(0),
                        a0
                    );
                
    // end of arguments

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


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isArray()
        ) /* type: QList < RLayer::Id > */
    
    ){
    // prepare arguments:
    
                    // argument isArray
                    QList < RLayer::Id >
                    a0;
                    REcmaHelper::fromScriptValue(
                        engine,
                        context->argument(0),
                        a0
                    );
                
    // end of arguments

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


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'QSet < QString >'
    QSet < QString > cppResult =
        
               self->getLayerNames();
        // return type: QSet < QString >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < QString >'
    QSet < QString > cppResult =
        
               self->getLayerNames(a0);
        // return type: QSet < QString >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'QSet < QString >'
    QSet < QString > cppResult =
        
               self->getLayerStateNames();
        // return type: QSet < QString >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

    // call C++ function:
    // return type 'QSet < QString >'
    QSet < QString > cppResult =
        
               self->getLayerStateNames(a0);
        // return type: QSet < QString >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'QSet < QString >'
    QSet < QString > cppResult =
        
               self->getViewNames();
        // return type: QSet < QString >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'RLayer::Id'
    RLayer::Id cppResult =
        
               self->getLayer0Id();
        // return type: RLayer::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'RBlock::Id'
    RBlock::Id cppResult =
        
               self->getModelSpaceBlockId();
        // return type: RBlock::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'RLinetype::Id'
    RLinetype::Id cppResult =
        
               self->getLinetypeByLayerId();
        // return type: RLinetype::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

    // call C++ function:
    // return type 'RLinetype::Id'
    RLinetype::Id cppResult =
        
               self->getLinetypeByBlockId();
        // return type: RLinetype::Id
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'QSet < QString >'
    QSet < QString > cppResult =
        
               self->getLinetypeNames();
        // return type: QSet < QString >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'RLineweight::Lineweight'
    RLineweight::Lineweight cppResult =
        
               self->getMaxLineweight();
        // return type: RLineweight::Lineweight
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isString()
        ) /* type: QString */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNumber() || 
            context->argument(1).isString() || 
            context->argument(1).isBool() || 
            context->argument(1).isArray() || 
            context->argument(1).isNull() || 
            context->argument(1).isUndefined()
        ) /* type: QVariant */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
                    // argument isCopyable or pointer
                    QVariant
                    a1 =
                    qscriptvalue_cast<
                    QVariant
                        >(
                        context->argument(
                        1
                        )
                    );
                
    // end of arguments

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


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isString()
        ) /* type: QString */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNumber() || 
            context->argument(1).isString() || 
            context->argument(1).isBool() || 
            context->argument(1).isArray() || 
            context->argument(1).isNull() || 
            context->argument(1).isUndefined()
        ) /* type: QVariant */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
                    // argument isCopyable or pointer
                    QVariant
                    a1 =
                    qscriptvalue_cast<
                    QVariant
                        >(
                        context->argument(
                        1
                        )
                    );
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->setVariable(a0
        ,
    a1
        ,
    a2);
    } else


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

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

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

    // call C++ function:
    // return type 'QVariant'
    QVariant cppResult =
        
               self->getVariable(a0);
        // return type: QVariant
                // QVariant:
                result = REcmaHelper::toScriptValue(engine, cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isString()
        ) /* type: QString */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNumber() || 
            context->argument(1).isString() || 
            context->argument(1).isBool() || 
            context->argument(1).isArray() || 
            context->argument(1).isNull() || 
            context->argument(1).isUndefined()
        ) /* type: QVariant */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
                    // argument isCopyable or pointer
                    QVariant
                    a1 =
                    qscriptvalue_cast<
                    QVariant
                        >(
                        context->argument(
                        1
                        )
                    );
                
    // end of arguments

    // call C++ function:
    // return type 'QVariant'
    QVariant cppResult =
        
               self->getVariable(a0
        ,
    a1);
        // return type: QVariant
                // QVariant:
                result = REcmaHelper::toScriptValue(engine, cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isString()
        ) /* type: QString */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNumber() || 
            context->argument(1).isString() || 
            context->argument(1).isBool() || 
            context->argument(1).isArray() || 
            context->argument(1).isNull() || 
            context->argument(1).isUndefined()
        ) /* type: QVariant */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
                    // argument isCopyable or pointer
                    QVariant
                    a1 =
                    qscriptvalue_cast<
                    QVariant
                        >(
                        context->argument(
                        1
                        )
                    );
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QVariant'
    QVariant cppResult =
        
               self->getVariable(a0
        ,
    a1
        ,
    a2);
        // return type: QVariant
                // QVariant:
                result = REcmaHelper::toScriptValue(engine, cppResult);
            
    } else


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

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

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

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


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

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

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

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


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: RS::KnownVariable */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNumber() || 
            context->argument(1).isString() || 
            context->argument(1).isBool() || 
            context->argument(1).isArray() || 
            context->argument(1).isNull() || 
            context->argument(1).isUndefined()
        ) /* type: QVariant */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RS::KnownVariable
                    a0 =
                    (RS::KnownVariable)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isCopyable or pointer
                    QVariant
                    a1 =
                    qscriptvalue_cast<
                    QVariant
                        >(
                        context->argument(
                        1
                        )
                    );
                
    // end of arguments

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


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isNumber()
        ) /* type: RS::KnownVariable */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNumber() || 
            context->argument(1).isString() || 
            context->argument(1).isBool() || 
            context->argument(1).isArray() || 
            context->argument(1).isNull() || 
            context->argument(1).isUndefined()
        ) /* type: QVariant */
     && (
            context->argument(2).isVariant() || 
            context->argument(2).isQObject() || 
            context->argument(2).isNull()
        ) /* type: RTransaction * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RS::KnownVariable
                    a0 =
                    (RS::KnownVariable)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isCopyable or pointer
                    QVariant
                    a1 =
                    qscriptvalue_cast<
                    QVariant
                        >(
                        context->argument(
                        1
                        )
                    );
                
                    // argument is pointer
                    RTransaction * a2 = NULL;

                    a2 = 
                        REcmaHelper::scriptValueTo<RTransaction >(
                            context->argument(2)
                        );
                    
                    if (a2==NULL && 
                        !context->argument(2).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 2 is not of type RTransaction *RTransaction *.", context);                    
                    }
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->setKnownVariable(a0
        ,
    a1
        ,
    a2);
    } else


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

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


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

                    a2 = 
                        REcmaHelper::scriptValueTo<RTransaction >(
                            context->argument(2)
                        );
                    
                    if (a2==NULL && 
                        !context->argument(2).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 2 is not of type RTransaction *RTransaction *.", context);                    
                    }
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->setKnownVariable(a0
        ,
    a1
        ,
    a2);
    } else


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

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

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

    // call C++ function:
    // return type 'QVariant'
    QVariant cppResult =
        
               self->getKnownVariable(a0);
        // return type: QVariant
                // QVariant:
                result = REcmaHelper::toScriptValue(engine, cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: RS::KnownVariable */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNumber() || 
            context->argument(1).isString() || 
            context->argument(1).isBool() || 
            context->argument(1).isArray() || 
            context->argument(1).isNull() || 
            context->argument(1).isUndefined()
        ) /* type: QVariant */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RS::KnownVariable
                    a0 =
                    (RS::KnownVariable)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isCopyable or pointer
                    QVariant
                    a1 =
                    qscriptvalue_cast<
                    QVariant
                        >(
                        context->argument(
                        1
                        )
                    );
                
    // end of arguments

    // call C++ function:
    // return type 'QVariant'
    QVariant cppResult =
        
               self->getKnownVariable(a0
        ,
    a1);
        // return type: QVariant
                // QVariant:
                result = REcmaHelper::toScriptValue(engine, cppResult);
            
    } else


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

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

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

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


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: RS::Unit */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RTransaction * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RS::Unit
                    a0 =
                    (RS::Unit)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is pointer
                    RTransaction * a1 = NULL;

                    a1 = 
                        REcmaHelper::scriptValueTo<RTransaction >(
                            context->argument(1)
                        );
                    
                    if (a1==NULL && 
                        !context->argument(1).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 1 is not of type RTransaction *RTransaction *.", context);                    
                    }
                
    // end of arguments

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


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

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

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

    // call C++ function:
    // return type 'RS::Unit'
    RS::Unit cppResult =
        
               self->getUnit();
        // return type: RS::Unit
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: RS::Measurement */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RTransaction * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    RS::Measurement
                    a0 =
                    (RS::Measurement)
                    (int)
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is pointer
                    RTransaction * a1 = NULL;

                    a1 = 
                        REcmaHelper::scriptValueTo<RTransaction >(
                            context->argument(1)
                        );
                    
                    if (a1==NULL && 
                        !context->argument(1).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 1 is not of type RTransaction *RTransaction *.", context);                    
                    }
                
    // end of arguments

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


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

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

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

    // call C++ function:
    // return type 'RS::Measurement'
    RS::Measurement cppResult =
        
               self->getMeasurement();
        // return type: RS::Measurement
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isString()
        ) /* type: QString */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RTransaction * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
                    // argument is pointer
                    RTransaction * a1 = NULL;

                    a1 = 
                        REcmaHelper::scriptValueTo<RTransaction >(
                            context->argument(1)
                        );
                    
                    if (a1==NULL && 
                        !context->argument(1).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 1 is not of type RTransaction *RTransaction *.", context);                    
                    }
                
    // end of arguments

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


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

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

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

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


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

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

                //Q_ASSERT(self!=NULL);
                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:
    // return type 'void'
    
               self->setLinetypeScale(a0);
    } else


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isVariant() || 
            context->argument(1).isQObject() || 
            context->argument(1).isNull()
        ) /* type: RTransaction * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument is pointer
                    RTransaction * a1 = NULL;

                    a1 = 
                        REcmaHelper::scriptValueTo<RTransaction >(
                            context->argument(1)
                        );
                    
                    if (a1==NULL && 
                        !context->argument(1).isNull()) {
                        return REcmaHelper::throwError("RDocument: Argument 1 is not of type RTransaction *RTransaction *.", context);                    
                    }
                
    // end of arguments

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


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

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

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

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


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

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

                //Q_ASSERT(self!=NULL);
                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:
    // return type 'QString'
    QString cppResult =
        
               self->formatLinear(a0);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

                //Q_ASSERT(self!=NULL);
                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:
    // return type 'QString'
    QString cppResult =
        
               self->formatAngle(a0);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'RS::LinearFormat'
    RS::LinearFormat cppResult =
        
               self->getLinearFormat();
        // return type: RS::LinearFormat
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

    // call C++ function:
    // return type 'RS::AngleFormat'
    RS::AngleFormat cppResult =
        
               self->getAngleFormat();
        // return type: RS::AngleFormat
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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

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


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

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

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

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


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.getDecimalSeparator().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::getDecimalSeparator", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::isModified
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::isModified", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::isModified";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("isModified", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'bool'
    bool cppResult =
        
               self->isModified();
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.isModified().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::isModified", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::getLastModifiedDateTime
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::getLastModifiedDateTime", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::getLastModifiedDateTime";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("getLastModifiedDateTime", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'QDateTime'
    QDateTime cppResult =
        
               self->getLastModifiedDateTime();
        // return type: QDateTime
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.getLastModifiedDateTime().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::getLastModifiedDateTime", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::getLastModified
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::getLastModified", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::getLastModified";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("getLastModified", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        
               self->getLastModified();
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.getLastModified().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::getLastModified", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::setModified
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::setModified", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::setModified";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("setModified", 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->setModified(a0);
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.setModified().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::setModified", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::copyVariablesFrom
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::copyVariablesFrom", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::copyVariablesFrom";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("copyVariablesFrom", 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("RDocument: Argument 0 is not of type RDocument*.",
                               context);                    
                    }
                    RDocument& a0 = *ap0;
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->copyVariablesFrom(a0);
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.copyVariablesFrom().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::copyVariablesFrom", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::addAutoVariable
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::addAutoVariable", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::addAutoVariable";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("addAutoVariable", context);
                  

                //Q_ASSERT(self!=NULL);
                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:
    // return type 'QString'
    QString cppResult =
        
               self->addAutoVariable(a0);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.addAutoVariable().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::addAutoVariable", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::getAutoVariables
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::getAutoVariables", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::getAutoVariables";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("getAutoVariables", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'QStringList'
    QStringList cppResult =
        
               self->getAutoVariables();
        // return type: QStringList
                // not standard type nor reference
                result = qScriptValueFromValue(engine, cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.getAutoVariables().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::getAutoVariables", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::substituteAutoVariables
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::substituteAutoVariables", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::substituteAutoVariables";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("substituteAutoVariables", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isString()
        ) /* type: QString */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
    // end of arguments

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        
               self->substituteAutoVariables(a0);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.substituteAutoVariables().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::substituteAutoVariables", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::eval
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::eval", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::eval";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("eval", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isString()
        ) /* type: QString */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
    // end of arguments

    // call C++ function:
    // return type 'double'
    double cppResult =
        
               self->eval(a0);
        // return type: double
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isString()
        ) /* type: QString */
     && (
            context->argument(1).isBool()
        ) /* type: bool * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    QString
                    a0 =
                    (QString)
                    
                    context->argument( 0 ).
                    toString();
                
                    // argument isStandardType
                    bool *
                    a1 =
                    (bool *)
                    
                    context->argument( 1 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'double'
    double cppResult =
        
               self->eval(a0
        ,
    a1);
        // return type: double
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.eval().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::eval", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::isEditingWorkingSet
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::isEditingWorkingSet", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::isEditingWorkingSet";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("isEditingWorkingSet", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'bool'
    bool cppResult =
        
               self->isEditingWorkingSet();
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.isEditingWorkingSet().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::isEditingWorkingSet", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::setIgnoreWorkingSet
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::setIgnoreWorkingSet", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::setIgnoreWorkingSet";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("setIgnoreWorkingSet", 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->setIgnoreWorkingSet(a0);
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.setIgnoreWorkingSet().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::setIgnoreWorkingSet", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::getClipboard
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::getClipboard", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::getClipboard";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'RDocument &'
    RDocument & cppResult =
        RDocument::
       getClipboard();
        // return type: RDocument &
                // reference
                result = engine->newVariant(
                QVariant::fromValue(&cppResult));
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.getClipboard().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::getClipboard", context, engine);
            return result;
        }
         QScriptValue
        REcmaDocument::dump
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaDocument::dump", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaDocument::dump";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RDocument* self = 
                        getSelf("dump", context);
                  

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    0
    ){
    // prepare arguments:
    
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->dump();
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RDocument.dump().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaDocument::dump", context, engine);
            return result;
        }
         QScriptValue REcmaDocument::toString
    (QScriptContext *context, QScriptEngine *engine)
    
    {

    RDocument* self = getSelf("toString", context);
    
    QString result;
    
            result = QString("RDocument(0x%1)").arg((unsigned long int)self, 0, 16);
        
    return QScriptValue(result);
    }
     QScriptValue REcmaDocument::destroy(QScriptContext *context, QScriptEngine *engine)
    
    {

        RDocument* self = getSelf("RDocument", 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();
    }
    RDocument* REcmaDocument::getSelf(const QString& fName, QScriptContext* context)
    
        {
            RDocument* 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<RDocument >(context->thisObject())
                
                ;
            //}

            if (self == NULL){
                // avoid recursion (toString is used by the backtrace):
                if (fName!="toString") {
                    REcmaHelper::throwError(QString("RDocument.%1(): "
                        "This object is not a RDocument").arg(fName),
                        context);
                }
                return NULL;
            }

            return self;
        }
        RDocument* REcmaDocument::getSelfShell(const QString& fName, QScriptContext* context)
    
        {
          RDocument* selfBase = getSelf(fName, context);
                RDocument* self = dynamic_cast<RDocument*>(selfBase);
                //return REcmaHelper::scriptValueTo<RDocument >(context->thisObject());
            if(self == NULL){
                REcmaHelper::throwError(QString("RDocument.%1(): "
                    "This object is not a RDocument").arg(fName),
                    context);
            }

            return self;
            


        }
        