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

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

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

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

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

    QScriptValue fun;

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

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

    // get class name
    REcmaHelper::registerFunction(&engine, proto, getClassName, "getClassName");
    

    // conversion to all base classes (multiple inheritance):
    REcmaHelper::registerFunction(&engine, proto, getBaseClasses, "getBaseClasses");
    

    // properties:
    

    // methods:
    
            REcmaHelper::registerFunction(&engine, proto, create, "create");
            
            REcmaHelper::registerFunction(&engine, proto, clear, "clear");
            
            REcmaHelper::registerFunction(&engine, proto, bulkLoad, "bulkLoad");
            
            REcmaHelper::registerFunction(&engine, proto, addToIndex, "addToIndex");
            
            REcmaHelper::registerFunction(&engine, proto, removeFromIndex, "removeFromIndex");
            
            REcmaHelper::registerFunction(&engine, proto, queryIntersected, "queryIntersected");
            
            REcmaHelper::registerFunction(&engine, proto, queryIntersectedSimple, "queryIntersectedSimple");
            
            REcmaHelper::registerFunction(&engine, proto, queryContained, "queryContained");
            
            REcmaHelper::registerFunction(&engine, proto, queryNearestNeighbor, "queryNearestNeighbor");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RSpatialIndexNavel*>(), *proto);

        
    

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

    // static properties:
    

    // enum values:
    

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

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

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

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

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

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

        return qScriptValueFromSequence(engine, list);
    }
    

    // properties:
    

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

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

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

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


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

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

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

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


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

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

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

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


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    8 && (
            context->argument(0).isNumber()
        ) /* type: int */
     && (
            context->argument(1).isNumber()
        ) /* type: int */
     && (
            context->argument(2).isNumber()
        ) /* type: double */
     && (
            context->argument(3).isNumber()
        ) /* type: double */
     && (
            context->argument(4).isNumber()
        ) /* type: double */
     && (
            context->argument(5).isNumber()
        ) /* type: double */
     && (
            context->argument(6).isNumber()
        ) /* type: double */
     && (
            context->argument(7).isNumber()
        ) /* type: double */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    int
                    a0 =
                    (int)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a1 =
                    (int)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a2 =
                    (double)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a3 =
                    (double)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a4 =
                    (double)
                    
                    context->argument( 4 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a5 =
                    (double)
                    
                    context->argument( 5 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a6 =
                    (double)
                    
                    context->argument( 6 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a7 =
                    (double)
                    
                    context->argument( 7 ).
                    toNumber();
                
    // end of arguments

    // call C++ function:
    // return type 'void'
    
               self->addToIndex(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5
        ,
    a6
        ,
    a7);
    } else


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

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


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

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

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

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


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

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


        
    
    if( context->argumentCount() ==
    8 && (
            context->argument(0).isNumber()
        ) /* type: int */
     && (
            context->argument(1).isNumber()
        ) /* type: int */
     && (
            context->argument(2).isNumber()
        ) /* type: double */
     && (
            context->argument(3).isNumber()
        ) /* type: double */
     && (
            context->argument(4).isNumber()
        ) /* type: double */
     && (
            context->argument(5).isNumber()
        ) /* type: double */
     && (
            context->argument(6).isNumber()
        ) /* type: double */
     && (
            context->argument(7).isNumber()
        ) /* type: double */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    int
                    a0 =
                    (int)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    int
                    a1 =
                    (int)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a2 =
                    (double)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a3 =
                    (double)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a4 =
                    (double)
                    
                    context->argument( 4 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a5 =
                    (double)
                    
                    context->argument( 5 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a6 =
                    (double)
                    
                    context->argument( 6 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a7 =
                    (double)
                    
                    context->argument( 7 ).
                    toNumber();
                
    // end of arguments

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


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: double */
     && (
            context->argument(2).isNumber()
        ) /* type: double */
     && (
            context->argument(3).isNumber()
        ) /* type: double */
     && (
            context->argument(4).isNumber()
        ) /* type: double */
     && (
            context->argument(5).isNumber()
        ) /* type: double */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a1 =
                    (double)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a2 =
                    (double)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a3 =
                    (double)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a4 =
                    (double)
                    
                    context->argument( 4 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a5 =
                    (double)
                    
                    context->argument( 5 ).
                    toNumber();
                
    // end of arguments

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


        
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: double */
     && (
            context->argument(2).isNumber()
        ) /* type: double */
     && (
            context->argument(3).isNumber()
        ) /* type: double */
     && (
            context->argument(4).isNumber()
        ) /* type: double */
     && (
            context->argument(5).isNumber()
        ) /* type: double */
     && (
            context->argument(6).isVariant() || 
            context->argument(6).isQObject() || 
            context->argument(6).isNull()
        ) /* type: RSpatialIndexVisitor * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a1 =
                    (double)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a2 =
                    (double)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a3 =
                    (double)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a4 =
                    (double)
                    
                    context->argument( 4 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a5 =
                    (double)
                    
                    context->argument( 5 ).
                    toNumber();
                
                    // argument is pointer
                    RSpatialIndexVisitor * a6 = NULL;

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

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


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

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

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

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


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

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    6 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: double */
     && (
            context->argument(2).isNumber()
        ) /* type: double */
     && (
            context->argument(3).isNumber()
        ) /* type: double */
     && (
            context->argument(4).isNumber()
        ) /* type: double */
     && (
            context->argument(5).isNumber()
        ) /* type: double */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a1 =
                    (double)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a2 =
                    (double)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a3 =
                    (double)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a4 =
                    (double)
                    
                    context->argument( 4 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a5 =
                    (double)
                    
                    context->argument( 5 ).
                    toNumber();
                
    // end of arguments

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


        
    
    if( context->argumentCount() ==
    7 && (
            context->argument(0).isNumber()
        ) /* type: double */
     && (
            context->argument(1).isNumber()
        ) /* type: double */
     && (
            context->argument(2).isNumber()
        ) /* type: double */
     && (
            context->argument(3).isNumber()
        ) /* type: double */
     && (
            context->argument(4).isNumber()
        ) /* type: double */
     && (
            context->argument(5).isNumber()
        ) /* type: double */
     && (
            context->argument(6).isVariant() || 
            context->argument(6).isQObject() || 
            context->argument(6).isNull()
        ) /* type: RSpatialIndexVisitor * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    double
                    a0 =
                    (double)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a1 =
                    (double)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a2 =
                    (double)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a3 =
                    (double)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a4 =
                    (double)
                    
                    context->argument( 4 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a5 =
                    (double)
                    
                    context->argument( 5 ).
                    toNumber();
                
                    // argument is pointer
                    RSpatialIndexVisitor * a6 = NULL;

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

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


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

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

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

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


        
    
    if( context->argumentCount() ==
    5 && (
            context->argument(0).isNumber()
        ) /* type: int */
     && (
            context->argument(1).isNumber()
        ) /* type: double */
     && (
            context->argument(2).isNumber()
        ) /* type: double */
     && (
            context->argument(3).isNumber()
        ) /* type: double */
     && (
            context->argument(4).isVariant() || 
            context->argument(4).isQObject() || 
            context->argument(4).isNull()
        ) /* type: RSpatialIndexVisitor * */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    int
                    a0 =
                    (int)
                    
                    context->argument( 0 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a1 =
                    (double)
                    
                    context->argument( 1 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a2 =
                    (double)
                    
                    context->argument( 2 ).
                    toNumber();
                
                    // argument isStandardType
                    double
                    a3 =
                    (double)
                    
                    context->argument( 3 ).
                    toNumber();
                
                    // argument is pointer
                    RSpatialIndexVisitor * a4 = NULL;

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

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


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

    // call C++ function:
    // return type 'QPair < int , int >'
    QPair < int , int > cppResult =
        
               self->queryNearestNeighbor(a0
        ,
    a1
        ,
    a2);
        // return type: QPair < int , int >
                // Pair of ...:
                //result = REcmaHelper::pairToScriptValue(engine, cppResult);
                QVariantList vl;
                QVariant v;
                
                     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 RSpatialIndexNavel.queryNearestNeighbor().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaSpatialIndexNavel::queryNearestNeighbor", context, engine);
            return result;
        }
         QScriptValue REcmaSpatialIndexNavel::toString
    (QScriptContext *context, QScriptEngine *engine)
    
    {

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

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

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

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

            return self;
            


        }
        