


	// ***** AUTOGENERATED CODE, DO NOT EDIT *****
    
        #include "REcmaShellFocusListenerAdapter.h"
        #include "RMetaTypes.h"
        #include "../REcmaHelper.h"

        // forwards declarations mapped to includes
        
                #include "RDocumentInterface.h"
            
            
        // includes for base ecma wrapper classes
        
            #include "REcmaFocusListener.h"
          

            #define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000)
            #define QTSCRIPT_IS_FUNCTION_IN_CALL(fun) ((fun.data().toUInt32() & 0x0000F000) == 0x0000B000)

        
    // Destructor:
    REcmaShellFocusListenerAdapter::~REcmaShellFocusListenerAdapter() {}
        RFocusListenerAdapter* REcmaShellFocusListenerAdapter::getSelf(const QString& fName, QScriptContext* context)
    
        {
            RFocusListenerAdapter* 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<RFocusListenerAdapter >(context->thisObject())
                
                ;
            //}

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

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

            return self;
            


        }
        
    
    
      void REcmaShellFocusListenerAdapter::updateFocus(
                RDocumentInterface * di
            ) {
                QScriptEngine* engine = __qtscript_self.engine();
                //REcmaHelper::shellFunctionStart("REcmaShellFocusListenerAdapter::updateFocus", engine);
                QScriptValue _q_function = __qtscript_self.property("updateFocus");



                if (!_q_function.isFunction() || 
                    QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) ||
                    QTSCRIPT_IS_FUNCTION_IN_CALL(_q_function)
                    
                    /* function might have more arguments than expected:
                    || _q_function.property("length").toInt32()!=1*/
                    /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/
                    ) {
                    //QString cppSig = "RFocusListenerAdapter::updateFocus";
                    
                        // re-enable recursion for calls from C++ into ECMAScript functions
                        // leave it marked as generated though if appropriate:
                        
                        quint32 prev = _q_function.data().toUInt32();
                        //if (cppSig!="RGraphicsViewQt::event") {
                            _q_function.setData(QScriptValue(engine, prev & 0xFFFF0000));
                        //}
                        RFocusListenerAdapter::updateFocus(
                            di
                        );

                        // block recursion again:
                        _q_function.setData(QScriptValue(engine, prev));

                        //REcmaHelper::shellFunctionEnd("REcmaShellFocusListenerAdapter::updateFocus", engine);

                        
                } else {
                    // prevent recursion if script implementation calls base implementation
                    // mark function as 'in call':
                    quint32 prev = _q_function.data().toUInt32();
                    _q_function.setData(QScriptValue(engine, uint(prev | 0x0000B000)));
                    
                            _q_function.call(__qtscript_self,
                                QScriptValueList()
                                



    // type: RDocumentInterface *, copyable: false
        << qScriptValueFromValue(engine, 

        di
        )
      
                            )
                        
                    ;
                    _q_function.setData(QScriptValue(engine, prev));

                    //REcmaHelper::shellFunctionEnd("REcmaShellFocusListenerAdapter::updateFocus", engine);

                    
                }
            }
        
    
  
        // methods of 1st level base class RFocusListener:
        

    // protected methods (only available for ECMA shell classes) (generated by xsl2xpp.xsl):
	