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

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

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

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

    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 REntity
        REcmaHelper::registerFunction(&engine, proto, getREntity, "getREntity");
        
        // 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, clone, "clone");
            
            REcmaHelper::registerFunction(&engine, proto, setProperty, "setProperty");
            
            REcmaHelper::registerFunction(&engine, proto, getProperty, "getProperty");
            
            REcmaHelper::registerFunction(&engine, proto, exportEntity, "exportEntity");
            
            REcmaHelper::registerFunction(&engine, proto, getData, "getData");
            
            REcmaHelper::registerFunction(&engine, proto, setData, "setData");
            
            REcmaHelper::registerFunction(&engine, proto, getViewportId, "getViewportId");
            
            REcmaHelper::registerFunction(&engine, proto, setViewportId, "setViewportId");
            
            REcmaHelper::registerFunction(&engine, proto, getStatus, "getStatus");
            
            REcmaHelper::registerFunction(&engine, proto, setStatus, "setStatus");
            
            REcmaHelper::registerFunction(&engine, proto, getCenter, "getCenter");
            
            REcmaHelper::registerFunction(&engine, proto, setCenter, "setCenter");
            
            REcmaHelper::registerFunction(&engine, proto, getViewCenter, "getViewCenter");
            
            REcmaHelper::registerFunction(&engine, proto, setViewCenter, "setViewCenter");
            
            REcmaHelper::registerFunction(&engine, proto, getViewTarget, "getViewTarget");
            
            REcmaHelper::registerFunction(&engine, proto, setViewTarget, "setViewTarget");
            
            REcmaHelper::registerFunction(&engine, proto, getWidth, "getWidth");
            
            REcmaHelper::registerFunction(&engine, proto, setWidth, "setWidth");
            
            REcmaHelper::registerFunction(&engine, proto, getHeight, "getHeight");
            
            REcmaHelper::registerFunction(&engine, proto, setHeight, "setHeight");
            
            REcmaHelper::registerFunction(&engine, proto, getScale, "getScale");
            
            REcmaHelper::registerFunction(&engine, proto, setScale, "setScale");
            
            REcmaHelper::registerFunction(&engine, proto, getRotation, "getRotation");
            
            REcmaHelper::registerFunction(&engine, proto, setRotation, "setRotation");
            
            REcmaHelper::registerFunction(&engine, proto, isOverall, "isOverall");
            
            REcmaHelper::registerFunction(&engine, proto, setOverall, "setOverall");
            
            REcmaHelper::registerFunction(&engine, proto, isOff, "isOff");
            
            REcmaHelper::registerFunction(&engine, proto, setOff, "setOff");
            
            REcmaHelper::registerFunction(&engine, proto, getViewOffset, "getViewOffset");
            
            REcmaHelper::registerFunction(&engine, proto, getPosition, "getPosition");
            
            REcmaHelper::registerFunction(&engine, proto, setPosition, "setPosition");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RViewportEntityPointer>(), *proto);
      
    

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

    // static properties:
    
            ctor.setProperty("PropertyCustom",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyCustom),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyHandle",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyHandle),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyType",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyType),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyBlock",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyBlock),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyLayer",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyLayer),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyLinetype",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyLinetype),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyLinetypeScale",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyLinetypeScale),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyLineweight",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyLineweight),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyColor",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyColor),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyDisplayedColor",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyDisplayedColor),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyDrawOrder",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyDrawOrder),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyCenterX",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyCenterX),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyCenterY",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyCenterY),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyCenterZ",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyCenterZ),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyWidth",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyWidth),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyHeight",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyHeight),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyScale",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyScale),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyRotation",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyRotation),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyOn",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyOn),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyViewCenterX",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyViewCenterX),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyViewCenterY",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyViewCenterY),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyViewTargetX",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyViewTargetX),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyViewTargetY",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyViewTargetY),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyViewTargetZ",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyViewTargetZ),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            
            ctor.setProperty("PropertyOverall",
                qScriptValueFromValue(&engine, RViewportEntity::PropertyOverall),
                QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
            

    // enum values:
    

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

    QScriptValue result;
        
            // generate constructor variants:
            
    if( context->argumentCount() ==
        2
                && (
                
                        context->argument(
                        0
                        ).isVariant()
                        ||
                    
                        context->argument(
                        0
                        ).isQObject()
                        ||
                    
                        context->argument(
                        0
                        ).isNull()
                ) /* type: RDocument * */
            
                && (
                
                        context->argument(
                        1
                        ).isVariant()
                        ||
                    
                        context->argument(
                        1
                        ).isQObject()
                        ||
                    
                        context->argument(
                        1
                        ).isNull()
                ) /* type: RViewportData */
            
    ){
    // 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("RViewportEntity: Argument 0 is not of type RDocument *RDocument *.", context);                    
                    }
                
                    // argument isCopyable and has default constructor and isSimpleClass 
                    RViewportData*
                    ap1 =
                    qscriptvalue_cast<
                    RViewportData*
                        >(
                        context->argument(
                        1
                        )
                    );
                    if (ap1 == NULL) {
                           return REcmaHelper::throwError("RViewportEntity: Argument 1 is not of type RViewportData.",
                               context);                    
                    }
                    RViewportData 
                    a1 = 
                    *ap1;
                
    // end of arguments

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

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

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

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

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

        return qScriptValueFromSequence(engine, list);
    }
    

    // properties:
    

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

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

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


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

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

    // call C++ function:
    // return type 'QSet < RPropertyTypeId >'
    QSet < RPropertyTypeId > cppResult =
        RViewportEntity::
       getStaticPropertyTypeIds();
        // return type: QSet < RPropertyTypeId >
                // QSet (convert to QVariantList):
                result = REcmaHelper::setToScriptValue(engine, cppResult);

                
    } else


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

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


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RViewportEntity* 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("RViewportEntity: 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("RViewportEntity: 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("RViewportEntity: 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 RViewportEntity.setProperty().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaSharedPointerViewportEntity::setProperty", context, engine);
            return result;
        }
         QScriptValue
        REcmaSharedPointerViewportEntity::getProperty
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaSharedPointerViewportEntity::getProperty", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaSharedPointerViewportEntity::getProperty";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RViewportEntity* 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("RViewportEntity: 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("RViewportEntity: 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("RViewportEntity: 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("RViewportEntity: 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 RViewportEntity.getProperty().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaSharedPointerViewportEntity::getProperty", context, engine);
            return result;
        }
         QScriptValue
        REcmaSharedPointerViewportEntity::exportEntity
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaSharedPointerViewportEntity::exportEntity", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaSharedPointerViewportEntity::exportEntity";
            //QCoreApplication::processEvents();

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

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


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

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


        
    
    if( context->argumentCount() ==
    3 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RExporter */
     && (
            context->argument(1).isBool()
        ) /* type: bool */
     && (
            context->argument(2).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RExporter*
                    ap0 =
                    qscriptvalue_cast<
                    RExporter*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RViewportEntity: Argument 0 is not of type RExporter*.",
                               context);                    
                    }
                    RExporter& 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 'void'
    
               self->exportEntity(a0
        ,
    a1
        ,
    a2);
    } else


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RViewportEntity* self = 
                        getSelf("getData", 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 'RViewportData &'
    RViewportData & cppResult =
        
               self->getData();
        // return type: RViewportData &
                // reference
                result = engine->newVariant(
                QVariant::fromValue(&cppResult));
            
    } else


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

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


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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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


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

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

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


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

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


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

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

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


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

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


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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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

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

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


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

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


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

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


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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RViewportEntity* 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 RViewportEntity.isOff().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaSharedPointerViewportEntity::isOff", context, engine);
            return result;
        }
         QScriptValue
        REcmaSharedPointerViewportEntity::setOff
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaSharedPointerViewportEntity::setOff", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaSharedPointerViewportEntity::setOff";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RViewportEntity* 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 RViewportEntity.setOff().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaSharedPointerViewportEntity::setOff", context, engine);
            return result;
        }
         QScriptValue
        REcmaSharedPointerViewportEntity::getViewOffset
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaSharedPointerViewportEntity::getViewOffset", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaSharedPointerViewportEntity::getViewOffset";
            //QCoreApplication::processEvents();

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


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

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


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

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

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


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

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

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

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

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

            return self;
            


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

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

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

    //RViewportEntity* self = getSelf("isNull", context);
    //Q_ASSERT(self!=NULL);
    if (self==NULL) {
        return REcmaHelper::throwError("self is NULL", context);
    }
    return qScriptValueFromValue(engine, self->isNull());
    }
    