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

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

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

    
        // primary base class RObject:
        
            proto->setPrototype(engine.defaultPrototype(
            qMetaTypeId<RObjectPointer>()));
          
        /*
        
        */
    

    QScriptValue fun;

    // toString:
    REcmaHelper::registerFunction(&engine, proto, toString, "toString");
    
        // shared pointer support:
        REcmaHelper::registerFunction(&engine, proto, data, "data");
        

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

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

    // 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, getType, "getType");
            
            REcmaHelper::registerFunction(&engine, proto, clone, "clone");
            
            REcmaHelper::registerFunction(&engine, proto, getParentLayerId, "getParentLayerId");
            
            REcmaHelper::registerFunction(&engine, proto, getName, "getName");
            
            REcmaHelper::registerFunction(&engine, proto, setName, "setName");
            
            REcmaHelper::registerFunction(&engine, proto, isOffOrFrozen, "isOffOrFrozen");
            
            REcmaHelper::registerFunction(&engine, proto, isOff, "isOff");
            
            REcmaHelper::registerFunction(&engine, proto, setOff, "setOff");
            
            REcmaHelper::registerFunction(&engine, proto, isFrozen, "isFrozen");
            
            REcmaHelper::registerFunction(&engine, proto, setFrozen, "setFrozen");
            
            REcmaHelper::registerFunction(&engine, proto, isLocked, "isLocked");
            
            REcmaHelper::registerFunction(&engine, proto, setLocked, "setLocked");
            
            REcmaHelper::registerFunction(&engine, proto, isCollapsed, "isCollapsed");
            
            REcmaHelper::registerFunction(&engine, proto, setCollapsed, "setCollapsed");
            
            REcmaHelper::registerFunction(&engine, proto, isPlottable, "isPlottable");
            
            REcmaHelper::registerFunction(&engine, proto, setPlottable, "setPlottable");
            
            REcmaHelper::registerFunction(&engine, proto, isSnappable, "isSnappable");
            
            REcmaHelper::registerFunction(&engine, proto, setSnappable, "setSnappable");
            
            REcmaHelper::registerFunction(&engine, proto, isOffIsFreeze, "isOffIsFreeze");
            
            REcmaHelper::registerFunction(&engine, proto, setOffIsFreeze, "setOffIsFreeze");
            
            REcmaHelper::registerFunction(&engine, proto, getColor, "getColor");
            
            REcmaHelper::registerFunction(&engine, proto, setColor, "setColor");
            
            REcmaHelper::registerFunction(&engine, proto, getLinetypeId, "getLinetypeId");
            
            REcmaHelper::registerFunction(&engine, proto, setLinetypeId, "setLinetypeId");
            
            REcmaHelper::registerFunction(&engine, proto, getLineweight, "getLineweight");
            
            REcmaHelper::registerFunction(&engine, proto, setLineweight, "setLineweight");
            
            REcmaHelper::registerFunction(&engine, proto, getProperty, "getProperty");
            
            REcmaHelper::registerFunction(&engine, proto, setProperty, "setProperty");
            
            REcmaHelper::registerFunction(&engine, proto, hasChildLayers, "hasChildLayers");
            
            REcmaHelper::registerFunction(&engine, proto, getChildLayerNames, "getChildLayerNames");
            
            REcmaHelper::registerFunction(&engine, proto, getParentLayerName, "getParentLayerName");
            
            REcmaHelper::registerFunction(&engine, proto, getShortLayerName, "getShortLayerName");
            
            REcmaHelper::registerFunction(&engine, proto, getLayerNameHierarchy, "getLayerNameHierarchy");
            
            REcmaHelper::registerFunction(&engine, proto, isChildLayerOf, "isChildLayerOf");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RLayerPointer>(), *proto);
      
    

    QScriptValue ctor = engine.newFunction(createEcma, *proto, 2);
    
    // static methods:
    
            REcmaHelper::registerFunction(&engine, &ctor, init, "init");
            
            REcmaHelper::registerFunction(&engine, &ctor, getHierarchySeparator, "getHierarchySeparator");
            
            REcmaHelper::registerFunction(&engine, &ctor, hasChildLayersStatic, "hasChildLayersStatic");
            
            REcmaHelper::registerFunction(&engine, &ctor, getChildLayerNamesStatic, "getChildLayerNamesStatic");
            
            REcmaHelper::registerFunction(&engine, &ctor, getParentLayerNameStatic, "getParentLayerNameStatic");
            
            REcmaHelper::registerFunction(&engine, &ctor, getShortLayerNameStatic, "getShortLayerNameStatic");
            
            REcmaHelper::registerFunction(&engine, &ctor, getLayerNameHierarchyStatic, "getLayerNameHierarchyStatic");
            
            REcmaHelper::registerFunction(&engine, &ctor, isChildLayerOfStatic, "isChildLayerOfStatic");
            
            REcmaHelper::registerFunction(&engine, &ctor, hasProxy, "hasProxy");
            

    // static properties:
    
            ctor.setProperty("PropertyCustom",
                qScriptValueFromValue(&engine, RLayer::PropertyCustom),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyType",
                qScriptValueFromValue(&engine, RLayer::PropertyType),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyHandle",
                qScriptValueFromValue(&engine, RLayer::PropertyHandle),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyProtected",
                qScriptValueFromValue(&engine, RLayer::PropertyProtected),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertySelected",
                qScriptValueFromValue(&engine, RLayer::PropertySelected),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyName",
                qScriptValueFromValue(&engine, RLayer::PropertyName),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyOff",
                qScriptValueFromValue(&engine, RLayer::PropertyOff),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyFrozen",
                qScriptValueFromValue(&engine, RLayer::PropertyFrozen),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyLocked",
                qScriptValueFromValue(&engine, RLayer::PropertyLocked),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyCollapsed",
                qScriptValueFromValue(&engine, RLayer::PropertyCollapsed),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyPlottable",
                qScriptValueFromValue(&engine, RLayer::PropertyPlottable),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertySnappable",
                qScriptValueFromValue(&engine, RLayer::PropertySnappable),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyOffIsFreeze",
                qScriptValueFromValue(&engine, RLayer::PropertyOffIsFreeze),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyColor",
                qScriptValueFromValue(&engine, RLayer::PropertyColor),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyLinetype",
                qScriptValueFromValue(&engine, RLayer::PropertyLinetype),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyLineweight",
                qScriptValueFromValue(&engine, RLayer::PropertyLineweight),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            

    // enum values:
    

    ctor.setProperty("Off",
    QScriptValue(RLayer::Off),
    QScriptValue::ReadOnly);


    ctor.setProperty("Frozen",
    QScriptValue(RLayer::Frozen),
    QScriptValue::ReadOnly);


    ctor.setProperty("Locked",
    QScriptValue(RLayer::Locked),
    QScriptValue::ReadOnly);


    ctor.setProperty("Collapsed",
    QScriptValue(RLayer::Collapsed),
    QScriptValue::ReadOnly);


    ctor.setProperty("Plottable",
    QScriptValue(RLayer::Plottable),
    QScriptValue::ReadOnly);


    ctor.setProperty("Snappable",
    QScriptValue(RLayer::Snappable),
    QScriptValue::ReadOnly);


    ctor.setProperty("OffIsFreeze",
    QScriptValue(RLayer::OffIsFreeze),
    QScriptValue::ReadOnly);


    // enum conversions:
    
    qScriptRegisterMetaType<RLayer::LayerFlag>(
        &engine,
        toScriptValueEnumLayerFlag,
        fromScriptValueEnumLayerFlag,
        ctor.property(QString::fromLatin1("prototype"))
    );

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

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

    // call C++ constructor:
    
            // non-copyable class:
            RLayer
                    * cppResult =
                    new
                    RLayer
                    ();
                
                    // TODO: triggers: Warning: QScriptEngine::newVariant(): changing class of non-QScriptObject not supported:
                    result = engine->newVariant(context->thisObject(), qVariantFromValue(cppResult));
                
    } else 

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

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

    // call C++ constructor:
    
            // non-copyable class:
            RLayer
                    * cppResult =
                    new
                    RLayer
                    (
                    a0
        ,
    a1
                    );
                
                    // TODO: triggers: Warning: QScriptEngine::newVariant(): changing class of non-QScriptObject not supported:
                    result = engine->newVariant(context->thisObject(), qVariantFromValue(cppResult));
                
    } else 

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

                    a0 = 
                        REcmaHelper::scriptValueTo<RDocument >(
                            context->argument(0)
                        );
                    
                    if (a0==NULL && 
                        !context->argument(0).isNull()) {
                        return REcmaHelper::throwError("RLayer: Argument 0 is not of type RDocument *RDocument *.", context);                    
                    }
                
                    // argument isStandardType
                    QString
                    a1 =
                    (QString)
                    
                    context->argument( 1 ).
                    toString();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
    // end of arguments

    // call C++ constructor:
    
            // non-copyable class:
            RLayer
                    * cppResult =
                    new
                    RLayer
                    (
                    a0
        ,
    a1
        ,
    a2
                    );
                
                    // TODO: triggers: Warning: QScriptEngine::newVariant(): changing class of non-QScriptObject not supported:
                    result = engine->newVariant(context->thisObject(), qVariantFromValue(cppResult));
                
    } else 

    if( context->argumentCount() ==
        4
                && (
                
                        context->argument(
                        0
                        ).isVariant()
                        ||
                    
                        context->argument(
                        0
                        ).isQObject()
                        ||
                    
                        context->argument(
                        0
                        ).isNull()
                ) /* type: RDocument * */
            
                && (
                
                        context->argument(
                        1
                        ).isString()
                ) /* type: QString */
            
                && (
                
                        context->argument(
                        2
                        ).isBool()
                ) /* type: bool */
            
                && (
                
                        context->argument(
                        3
                        ).isBool()
                ) /* type: bool */
            
    ){
    // prepare arguments:
    
                    // argument is pointer
                    RDocument * a0 = NULL;

                    a0 = 
                        REcmaHelper::scriptValueTo<RDocument >(
                            context->argument(0)
                        );
                    
                    if (a0==NULL && 
                        !context->argument(0).isNull()) {
                        return REcmaHelper::throwError("RLayer: Argument 0 is not of type RDocument *RDocument *.", context);                    
                    }
                
                    // argument isStandardType
                    QString
                    a1 =
                    (QString)
                    
                    context->argument( 1 ).
                    toString();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
    // end of arguments

    // call C++ constructor:
    
            // non-copyable class:
            RLayer
                    * cppResult =
                    new
                    RLayer
                    (
                    a0
        ,
    a1
        ,
    a2
        ,
    a3
                    );
                
                    // TODO: triggers: Warning: QScriptEngine::newVariant(): changing class of non-QScriptObject not supported:
                    result = engine->newVariant(context->thisObject(), qVariantFromValue(cppResult));
                
    } else 

    if( context->argumentCount() ==
        5
                && (
                
                        context->argument(
                        0
                        ).isVariant()
                        ||
                    
                        context->argument(
                        0
                        ).isQObject()
                        ||
                    
                        context->argument(
                        0
                        ).isNull()
                ) /* type: RDocument * */
            
                && (
                
                        context->argument(
                        1
                        ).isString()
                ) /* type: QString */
            
                && (
                
                        context->argument(
                        2
                        ).isBool()
                ) /* type: bool */
            
                && (
                
                        context->argument(
                        3
                        ).isBool()
                ) /* type: bool */
            
                && (
                
                        context->argument(
                        4
                        ).isVariant()
                        ||
                    
                        context->argument(
                        4
                        ).isQObject()
                        ||
                    
                        context->argument(
                        4
                        ).isNull()
                ) /* type: RColor */
            
    ){
    // prepare arguments:
    
                    // argument is pointer
                    RDocument * a0 = NULL;

                    a0 = 
                        REcmaHelper::scriptValueTo<RDocument >(
                            context->argument(0)
                        );
                    
                    if (a0==NULL && 
                        !context->argument(0).isNull()) {
                        return REcmaHelper::throwError("RLayer: Argument 0 is not of type RDocument *RDocument *.", context);                    
                    }
                
                    // argument isStandardType
                    QString
                    a1 =
                    (QString)
                    
                    context->argument( 1 ).
                    toString();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap4 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        4
                        )
                    );
                    if (ap4 == NULL) {
                           return REcmaHelper::throwError("RLayer: Argument 4 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a4 = 
                    *ap4;
                
    // end of arguments

    // call C++ constructor:
    
            // non-copyable class:
            RLayer
                    * cppResult =
                    new
                    RLayer
                    (
                    a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
                    );
                
                    // TODO: triggers: Warning: QScriptEngine::newVariant(): changing class of non-QScriptObject not supported:
                    result = engine->newVariant(context->thisObject(), qVariantFromValue(cppResult));
                
    } else 

    if( context->argumentCount() ==
        6
                && (
                
                        context->argument(
                        0
                        ).isVariant()
                        ||
                    
                        context->argument(
                        0
                        ).isQObject()
                        ||
                    
                        context->argument(
                        0
                        ).isNull()
                ) /* type: RDocument * */
            
                && (
                
                        context->argument(
                        1
                        ).isString()
                ) /* type: QString */
            
                && (
                
                        context->argument(
                        2
                        ).isBool()
                ) /* type: bool */
            
                && (
                
                        context->argument(
                        3
                        ).isBool()
                ) /* type: bool */
            
                && (
                
                        context->argument(
                        4
                        ).isVariant()
                        ||
                    
                        context->argument(
                        4
                        ).isQObject()
                        ||
                    
                        context->argument(
                        4
                        ).isNull()
                ) /* type: RColor */
            
                && (
                
                        context->argument(
                        5
                        ).isNumber()
                ) /* type: RLinetype::Id */
            
    ){
    // prepare arguments:
    
                    // argument is pointer
                    RDocument * a0 = NULL;

                    a0 = 
                        REcmaHelper::scriptValueTo<RDocument >(
                            context->argument(0)
                        );
                    
                    if (a0==NULL && 
                        !context->argument(0).isNull()) {
                        return REcmaHelper::throwError("RLayer: Argument 0 is not of type RDocument *RDocument *.", context);                    
                    }
                
                    // argument isStandardType
                    QString
                    a1 =
                    (QString)
                    
                    context->argument( 1 ).
                    toString();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap4 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        4
                        )
                    );
                    if (ap4 == NULL) {
                           return REcmaHelper::throwError("RLayer: Argument 4 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a4 = 
                    *ap4;
                
                    // argument isStandardType
                    RLinetype::Id
                    a5 =
                    (RLinetype::Id)
                    (int)
                    context->argument( 5 ).
                    toNumber();
                
    // end of arguments

    // call C++ constructor:
    
            // non-copyable class:
            RLayer
                    * cppResult =
                    new
                    RLayer
                    (
                    a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
                    );
                
                    // TODO: triggers: Warning: QScriptEngine::newVariant(): changing class of non-QScriptObject not supported:
                    result = engine->newVariant(context->thisObject(), qVariantFromValue(cppResult));
                
    } else 

    if( context->argumentCount() ==
        7
                && (
                
                        context->argument(
                        0
                        ).isVariant()
                        ||
                    
                        context->argument(
                        0
                        ).isQObject()
                        ||
                    
                        context->argument(
                        0
                        ).isNull()
                ) /* type: RDocument * */
            
                && (
                
                        context->argument(
                        1
                        ).isString()
                ) /* type: QString */
            
                && (
                
                        context->argument(
                        2
                        ).isBool()
                ) /* type: bool */
            
                && (
                
                        context->argument(
                        3
                        ).isBool()
                ) /* type: bool */
            
                && (
                
                        context->argument(
                        4
                        ).isVariant()
                        ||
                    
                        context->argument(
                        4
                        ).isQObject()
                        ||
                    
                        context->argument(
                        4
                        ).isNull()
                ) /* type: RColor */
            
                && (
                
                        context->argument(
                        5
                        ).isNumber()
                ) /* type: RLinetype::Id */
            
                && (
                
                        context->argument(
                        6
                        ).isNumber()
                ) /* type: RLineweight::Lineweight */
            
    ){
    // prepare arguments:
    
                    // argument is pointer
                    RDocument * a0 = NULL;

                    a0 = 
                        REcmaHelper::scriptValueTo<RDocument >(
                            context->argument(0)
                        );
                    
                    if (a0==NULL && 
                        !context->argument(0).isNull()) {
                        return REcmaHelper::throwError("RLayer: Argument 0 is not of type RDocument *RDocument *.", context);                    
                    }
                
                    // argument isStandardType
                    QString
                    a1 =
                    (QString)
                    
                    context->argument( 1 ).
                    toString();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap4 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        4
                        )
                    );
                    if (ap4 == NULL) {
                           return REcmaHelper::throwError("RLayer: Argument 4 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a4 = 
                    *ap4;
                
                    // argument isStandardType
                    RLinetype::Id
                    a5 =
                    (RLinetype::Id)
                    (int)
                    context->argument( 5 ).
                    toNumber();
                
                    // argument isStandardType
                    RLineweight::Lineweight
                    a6 =
                    (RLineweight::Lineweight)
                    (int)
                    context->argument( 6 ).
                    toNumber();
                
    // end of arguments

    // call C++ constructor:
    
            // non-copyable class:
            RLayer
                    * cppResult =
                    new
                    RLayer
                    (
                    a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6
                    );
                
                    // TODO: triggers: Warning: QScriptEngine::newVariant(): changing class of non-QScriptObject not supported:
                    result = engine->newVariant(context->thisObject(), qVariantFromValue(cppResult));
                
    } else 

    if( context->argumentCount() ==
        8
                && (
                
                        context->argument(
                        0
                        ).isVariant()
                        ||
                    
                        context->argument(
                        0
                        ).isQObject()
                        ||
                    
                        context->argument(
                        0
                        ).isNull()
                ) /* type: RDocument * */
            
                && (
                
                        context->argument(
                        1
                        ).isString()
                ) /* type: QString */
            
                && (
                
                        context->argument(
                        2
                        ).isBool()
                ) /* type: bool */
            
                && (
                
                        context->argument(
                        3
                        ).isBool()
                ) /* type: bool */
            
                && (
                
                        context->argument(
                        4
                        ).isVariant()
                        ||
                    
                        context->argument(
                        4
                        ).isQObject()
                        ||
                    
                        context->argument(
                        4
                        ).isNull()
                ) /* type: RColor */
            
                && (
                
                        context->argument(
                        5
                        ).isNumber()
                ) /* type: RLinetype::Id */
            
                && (
                
                        context->argument(
                        6
                        ).isNumber()
                ) /* type: RLineweight::Lineweight */
            
                && (
                
                        context->argument(
                        7
                        ).isBool()
                ) /* type: bool */
            
    ){
    // prepare arguments:
    
                    // argument is pointer
                    RDocument * a0 = NULL;

                    a0 = 
                        REcmaHelper::scriptValueTo<RDocument >(
                            context->argument(0)
                        );
                    
                    if (a0==NULL && 
                        !context->argument(0).isNull()) {
                        return REcmaHelper::throwError("RLayer: Argument 0 is not of type RDocument *RDocument *.", context);                    
                    }
                
                    // argument isStandardType
                    QString
                    a1 =
                    (QString)
                    
                    context->argument( 1 ).
                    toString();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
                    // argument isStandardType
                    bool
                    a3 =
                    (bool)
                    
                    context->argument( 3 ).
                    toBool();
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RColor*
                    ap4 =
                    qscriptvalue_cast<
                    RColor*
                        >(
                        context->argument(
                        4
                        )
                    );
                    if (ap4 == NULL) {
                           return REcmaHelper::throwError("RLayer: Argument 4 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a4 = 
                    *ap4;
                
                    // argument isStandardType
                    RLinetype::Id
                    a5 =
                    (RLinetype::Id)
                    (int)
                    context->argument( 5 ).
                    toNumber();
                
                    // argument isStandardType
                    RLineweight::Lineweight
                    a6 =
                    (RLineweight::Lineweight)
                    (int)
                    context->argument( 6 ).
                    toNumber();
                
                    // argument isStandardType
                    bool
                    a7 =
                    (bool)
                    
                    context->argument( 7 ).
                    toBool();
                
    // end of arguments

    // call C++ constructor:
    
            // non-copyable class:
            RLayer
                    * cppResult =
                    new
                    RLayer
                    (
                    a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6
        ,
    a7
                    );
                
                    // TODO: triggers: Warning: QScriptEngine::newVariant(): changing class of non-QScriptObject not supported:
                    result = engine->newVariant(context->thisObject(), qVariantFromValue(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("RLayer: Argument 0 is not of type RLayer*.",
                               context);                    
                    }
                    RLayer& a0 = *ap0;
                
    // end of arguments

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

    // conversion functions for base classes:
     QScriptValue REcmaSharedPointerLayer::getRObject(QScriptContext *context,
            QScriptEngine *engine)
        
            {
                RObject* cppResult =
                    qscriptvalue_cast<RLayer*> (context->thisObject());
                QScriptValue result = qScriptValueFromValue(engine, cppResult);
                return result;
            }
            

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

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

        return qScriptValueFromSequence(engine, list);
    }
    

    // properties:
    

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

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

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


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

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


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

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


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

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


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

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

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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RLayer* self = 
                        getSelf("setColor", 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("RLayer: Argument 0 is not of type RColor.",
                               context);                    
                    }
                    RColor 
                    a0 = 
                    *ap0;
                
    // end of arguments

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


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

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


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

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


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

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


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

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


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

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

    // call C++ function:
    // return type 'QPair < QVariant , RPropertyAttributes >'
    QPair < QVariant , RPropertyAttributes > cppResult =
        
               self->getProperty(a0);
        // return type: QPair < QVariant , RPropertyAttributes >
                // Pair of ...:
                //result = REcmaHelper::pairToScriptValue(engine, cppResult);
                QVariantList vl;
                QVariant v;
                
                    // first type of pair is variant:
                    if (QString(cppResult.first.typeName())=="RLineweight::Lineweight") {
                        v.setValue((int)cppResult.first.value<RLineweight::Lineweight>());
                    }
                    else {
                        v.setValue(cppResult.first);
                    }
                  

                vl.append(v);
                v.setValue(cppResult.second);
                vl.append(v);
                result = qScriptValueFromValue(engine, vl);
            
    } else


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

    // call C++ function:
    // return type 'QPair < QVariant , RPropertyAttributes >'
    QPair < QVariant , RPropertyAttributes > cppResult =
        
               self->getProperty(a0
        ,
    a1);
        // return type: QPair < QVariant , RPropertyAttributes >
                // Pair of ...:
                //result = REcmaHelper::pairToScriptValue(engine, cppResult);
                QVariantList vl;
                QVariant v;
                
                    // first type of pair is variant:
                    if (QString(cppResult.first.typeName())=="RLineweight::Lineweight") {
                        v.setValue((int)cppResult.first.value<RLineweight::Lineweight>());
                    }
                    else {
                        v.setValue(cppResult.first);
                    }
                  

                vl.append(v);
                v.setValue(cppResult.second);
                vl.append(v);
                result = qScriptValueFromValue(engine, vl);
            
    } else


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RPropertyTypeId */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RPropertyTypeId*
                    ap0 =
                    qscriptvalue_cast<
                    RPropertyTypeId*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RLayer: Argument 0 is not of type RPropertyTypeId.",
                               context);                    
                    }
                    RPropertyTypeId 
                    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 'QPair < QVariant , RPropertyAttributes >'
    QPair < QVariant , RPropertyAttributes > cppResult =
        
               self->getProperty(a0
        ,
    a1
        ,
    a2);
        // return type: QPair < QVariant , RPropertyAttributes >
                // Pair of ...:
                //result = REcmaHelper::pairToScriptValue(engine, cppResult);
                QVariantList vl;
                QVariant v;
                
                    // first type of pair is variant:
                    if (QString(cppResult.first.typeName())=="RLineweight::Lineweight") {
                        v.setValue((int)cppResult.first.value<RLineweight::Lineweight>());
                    }
                    else {
                        v.setValue(cppResult.first);
                    }
                  

                vl.append(v);
                v.setValue(cppResult.second);
                vl.append(v);
                result = qScriptValueFromValue(engine, vl);
            
    } else


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

    // call C++ function:
    // return type 'QPair < QVariant , RPropertyAttributes >'
    QPair < QVariant , RPropertyAttributes > cppResult =
        
               self->getProperty(a0
        ,
    a1
        ,
    a2
        ,
    a3);
        // return type: QPair < QVariant , RPropertyAttributes >
                // Pair of ...:
                //result = REcmaHelper::pairToScriptValue(engine, cppResult);
                QVariantList vl;
                QVariant v;
                
                    // first type of pair is variant:
                    if (QString(cppResult.first.typeName())=="RLineweight::Lineweight") {
                        v.setValue((int)cppResult.first.value<RLineweight::Lineweight>());
                    }
                    else {
                        v.setValue(cppResult.first);
                    }
                  

                vl.append(v);
                v.setValue(cppResult.second);
                vl.append(v);
                result = qScriptValueFromValue(engine, vl);
            
    } else


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RPropertyTypeId */
     && (
            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 isCopyable and has default constructor and isSimpleClass 
                    RPropertyTypeId*
                    ap0 =
                    qscriptvalue_cast<
                    RPropertyTypeId*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RLayer: Argument 0 is not of type RPropertyTypeId.",
                               context);                    
                    }
                    RPropertyTypeId 
                    a0 = 
                    *ap0;
                
                    // argument isCopyable or pointer
                    QVariant
                    a1 =
                    qscriptvalue_cast<
                    QVariant
                        >(
                        context->argument(
                        1
                        )
                    );
                
    // end of arguments

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


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RPropertyTypeId */
     && (
            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 isCopyable and has default constructor and isSimpleClass 
                    RPropertyTypeId*
                    ap0 =
                    qscriptvalue_cast<
                    RPropertyTypeId*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if (ap0 == NULL) {
                           return REcmaHelper::throwError("RLayer: Argument 0 is not of type RPropertyTypeId.",
                               context);                    
                    }
                    RPropertyTypeId 
                    a0 = 
                    *ap0;
                
                    // 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("RLayer: Argument 2 is not of type RTransaction *RTransaction *.", context);                    
                    }
                
    // end of arguments

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


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

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


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RLayer* self = 
                        getSelf("getChildLayerNames", 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 < QString >'
    QList < QString > cppResult =
        
               self->getChildLayerNames();
        // return type: QList < QString >
                // List of ...:
                result = REcmaHelper::listToScriptValue(engine, cppResult);
            
    } else


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

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


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

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


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

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


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RLayer* self = 
                        getSelf("getLayerNameHierarchy", 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 < QString >'
    QList < QString > cppResult =
        
               self->getLayerNameHierarchy();
        // return type: QList < QString >
                // List of ...:
                result = REcmaHelper::listToScriptValue(engine, cppResult);
            
    } else


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

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


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

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

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RLayer::
       getHierarchySeparator();
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RDocument * */
     && (
            context->argument(1).isString()
        ) /* type: QString */
    
    ){
    // prepare arguments:
    
                    // argument is pointer
                    RDocument * a0 = NULL;

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

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


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

            QScriptValue result = engine->undefinedValue();
            
    
    if( context->argumentCount() ==
    2 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RDocument * */
     && (
            context->argument(1).isString()
        ) /* type: QString */
    
    ){
    // prepare arguments:
    
                    // argument is pointer
                    RDocument * a0 = NULL;

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

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


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

                    a0 = 
                        REcmaHelper::scriptValueTo<RDocument >(
                            context->argument(0)
                        );
                    
                    if (a0==NULL && 
                        !context->argument(0).isNull()) {
                        return REcmaHelper::throwError("RLayer: Argument 0 is not of type RDocument *RDocument *.", context);                    
                    }
                
                    // argument isStandardType
                    QString
                    a1 =
                    (QString)
                    
                    context->argument( 1 ).
                    toString();
                
                    // argument isStandardType
                    bool
                    a2 =
                    (bool)
                    
                    context->argument( 2 ).
                    toBool();
                
    // end of arguments

    // call C++ function:
    // return type 'QList < QString >'
    QList < QString > cppResult =
        RLayer::
       getChildLayerNamesStatic(a0
        ,
    a1
        ,
    a2);
        // return type: QList < QString >
                // List of ...:
                result = REcmaHelper::listToScriptValue(engine, cppResult);
            
    } else


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

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

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RLayer::
       getParentLayerNameStatic(a0);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

    // call C++ function:
    // return type 'QString'
    QString cppResult =
        RLayer::
       getShortLayerNameStatic(a0);
        // return type: QString
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

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

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


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

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

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


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

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

    // call C++ function:
    // return type 'bool'
    bool cppResult =
        RLayer::
       hasProxy();
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


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

    RLayer* self = getSelf("toString", context);
    
    QString result;
    
            QDebug d(&result);
            if (self!=NULL) {
                d << *self;
            }
            else {
                d << "NULL";
            }
        
    return QScriptValue(result);
    }
     QScriptValue REcmaSharedPointerLayer::destroy(QScriptContext *context, QScriptEngine *engine)
    
    {

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

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

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

            return self;
            


        }
         QScriptValue REcmaSharedPointerLayer::data
    (QScriptContext *context, QScriptEngine *engine)
    
    {

    RLayer* self = getSelf("data", context);
    return qScriptValueFromValue(engine, self);
    }
     QScriptValue REcmaSharedPointerLayer::isNull
    (QScriptContext *context, QScriptEngine *engine)
    
    {

    RLayerPointer* self = REcmaHelper::scriptValueTo<RLayerPointer >(context->thisObject());

    //RLayer* self = getSelf("isNull", context);
    //Q_ASSERT(self!=NULL);
    if (self==NULL) {
        return REcmaHelper::throwError("self is NULL", context);
    }
    return qScriptValueFromValue(engine, self->isNull());
    }
     QScriptValue REcmaSharedPointerLayer::toScriptValueEnumLayerFlag(QScriptEngine* engine, const RLayer::LayerFlag& value)
    
        {
            return QScriptValue(engine, (int)value);
        }
         void REcmaSharedPointerLayer::fromScriptValueEnumLayerFlag(const QScriptValue& value, RLayer::LayerFlag& out)
    
        {
            out = qvariant_cast<RLayer::LayerFlag>(value.toVariant());
        }
        