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

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

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

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

            if (dpt.isValid()) {
                proto->setPrototype(dpt);
            }
          
        /*
        REcmaInterTransactionListener::initEcma(engine, proto);
          
        */
    

    QScriptValue fun;

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

    // destroy:
    REcmaHelper::registerFunction(&engine, proto, destroy, "destroy");
    
        // conversion for base class QObject
        REcmaHelper::registerFunction(&engine, proto, getQObject, "getQObject");
        
        // conversion for base class RInterTransactionListener
        REcmaHelper::registerFunction(&engine, proto, getRInterTransactionListener, "getRInterTransactionListener");
        

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

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

        // properties of secondary base class RInterTransactionListener:
        

        // methods of secondary base class RInterTransactionListener:
        

    // properties:
    

    // methods:
    
            REcmaHelper::registerFunction(&engine, proto, updateInterTransactionListener, "updateInterTransactionListener");
            
        engine.setDefaultPrototype(
            qMetaTypeId<RInterTransactionListenerAdapter*>(), *proto);

        
                        qScriptRegisterMetaType<
                        RInterTransactionListenerAdapter*>(
                        &engine, toScriptValue, fromScriptValue, *proto);
                    
    

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

    // static properties:
    

    // enum values:
    

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

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

    // call C++ constructor:
    
            // non-copyable class:
            RInterTransactionListenerAdapter
                    * cppResult =
                    new
                    RInterTransactionListenerAdapter
                    ();
                
                    result = engine->newQObject(context->thisObject(), cppResult, QScriptEngine::QtOwnership);
                
    } else 

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

    // conversion functions for base classes:
     QScriptValue REcmaInterTransactionListenerAdapter::getQObject(QScriptContext *context,
            QScriptEngine *engine)
        
            {
                QObject* cppResult =
                    qscriptvalue_cast<RInterTransactionListenerAdapter*> (context->thisObject());
                QScriptValue result = qScriptValueFromValue(engine, cppResult);
                return result;
            }
             QScriptValue REcmaInterTransactionListenerAdapter::getRInterTransactionListener(QScriptContext *context,
            QScriptEngine *engine)
        
            {
                RInterTransactionListener* cppResult =
                    qscriptvalue_cast<RInterTransactionListenerAdapter*> (context->thisObject());
                QScriptValue result = qScriptValueFromValue(engine, cppResult);
                return result;
            }
            

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

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

        return qScriptValueFromSequence(engine, list);
    }
    
        // properties of secondary base class RInterTransactionListener:
        

        // methods of secondary base class RInterTransactionListener:
        

    // properties:
    

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

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


        
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isVariant() || 
            context->argument(0).isQObject() || 
            context->argument(0).isNull()
        ) /* type: RDocument * */
    
    ){
    // 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("RInterTransactionListenerAdapter: Argument 0 is not of type RDocument *RDocument *.", context);                    
                    }
                
    // end of arguments

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


        
    
    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: RTransaction * */
    
    ){
    // 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("RInterTransactionListenerAdapter: Argument 0 is not of type RDocument *RDocument *.", context);                    
                    }
                
                    // argument is pointer
                    RTransaction * a1 = NULL;

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

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


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

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

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

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

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

            return self;
            


        }
         void fromScriptValue(const QScriptValue& value,
        RInterTransactionListenerAdapter*
        &out) {
            QObject* o = value.toQObject();
            out = qobject_cast<
            RInterTransactionListenerAdapter*>(o);
        }
     QScriptValue toScriptValue(QScriptEngine *engine,
        RInterTransactionListenerAdapter*
        const &in){
            QScriptValue s = engine->newQObject(in, QScriptEngine::QtOwnership,
            QScriptEngine::PreferExistingWrapperObject);
            /*
            if(s.isNull()){
               REcmaHelper::throwError("This object is null.", engine->currentContext());
            }
            */
            return s;
        }
    