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

        // forwards declarations mapped to includes
        
            
        // includes for base ecma wrapper classes
         void REcmaSpatialIndexVisitor::initEcma(QScriptEngine& engine, QScriptValue* proto 
    
    ) 
    
    {

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

    

    QScriptValue fun;

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

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

    // 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, visitNode, "visitNode");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RSpatialIndexVisitor*>(), *proto);

        
    

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

    // static properties:
    

    // enum values:
    

    // enum conversions:
    
        
    // init class:
    engine.globalObject().setProperty("RSpatialIndexVisitor",
    ctor, QScriptValue::SkipInEnumeration);
    
    if( protoCreated ){
       delete proto;
    }
    
    }
     QScriptValue REcmaSpatialIndexVisitor::createEcma(QScriptContext* context, QScriptEngine* engine) 
    
    {
           return REcmaHelper::throwError("Abstract class RSpatialIndexVisitor: Cannot be constructed.",
               context); 
    }
    

    // conversion functions for base classes:
    

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

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

        return qScriptValueFromSequence(engine, list);
    }
    

    // properties:
    

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

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RSpatialIndexVisitor* self = 
                        getSelf("visitNode", 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 'void'
    
               self->visitNode(a0
        ,
    a1
        ,
    a2
        ,
    a3
        ,
    a4
        ,
    a5);
    } else


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

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

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

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

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

            return self;
            


        }
        