void REcmaShellSnap::reset( ) { QScriptEngine* engine = __qtscript_self.engine(); //REcmaHelper::shellFunctionStart("REcmaShellSnap::reset", engine); QScriptValue _q_function = __qtscript_self.property("reset"); 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()!=0*/ /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/ ) { //QString cppSig = "RSnap::reset"; // 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)); //} RSnap::reset( ); // block recursion again: _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellSnap::reset", engine); return; } // 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) ; _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellSnap::reset", engine); }
RFileImporter * REcmaShellFileImporterFactoryAdapter::instantiate( RDocument & document, RMessageHandler * messageHandler, RProgressHandler * progressHandler ) { QScriptEngine* engine = __qtscript_self.engine(); //REcmaHelper::shellFunctionStart("REcmaShellFileImporterFactoryAdapter::instantiate", engine); QScriptValue _q_function = __qtscript_self.property("instantiate"); 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()!=3*/ /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/ ) { //QString cppSig = "RFileImporterFactoryAdapter::instantiate"; // 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)); //} RFileImporter * ret = RFileImporterFactoryAdapter::instantiate( document, messageHandler, progressHandler ); // block recursion again: _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellFileImporterFactoryAdapter::instantiate", engine); return ret; } // 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))); RFileImporter * res; res = qscriptvalue_cast< RFileImporter * >( _q_function.call(__qtscript_self, QScriptValueList() // type: RDocument &, copyable: false << qScriptValueFromValue(engine, &document ) // type: RMessageHandler *, copyable: false << qScriptValueFromValue(engine, messageHandler ) // type: RProgressHandler *, copyable: false << qScriptValueFromValue(engine, progressHandler ) ) ) ; _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellFileImporterFactoryAdapter::instantiate", engine); return res; }
RVector REcmaShellSnap::snap( const RVector & position, RGraphicsView & view, double range ) { QScriptEngine* engine = __qtscript_self.engine(); //REcmaHelper::shellFunctionStart("REcmaShellSnap::snap", engine); QScriptValue _q_function = __qtscript_self.property("snap"); 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()!=3*/ /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/ ) { //QString cppSig = "RSnap::snap"; qFatal("RSnap::snap is pure virtual."); } // 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))); RVector res; res = qscriptvalue_cast< RVector >( _q_function.call(__qtscript_self, QScriptValueList() // type: RVector &, copyable: true << qScriptValueFromValue(engine, // const reference argument - make a new object: new RVector(position) ) // type: RGraphicsView &, copyable: false << qScriptValueFromValue(engine, &view ) // type: double, copyable: true << qScriptValueFromValue(engine, range ) ) ) ; _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellSnap::snap", engine); return res; }
int REcmaShellFileExporterFactoryAdapter::canExport( const QString & fileName, const QString & nameFilter ) { QScriptEngine* engine = __qtscript_self.engine(); //REcmaHelper::shellFunctionStart("REcmaShellFileExporterFactoryAdapter::canExport", engine); QScriptValue _q_function = __qtscript_self.property("canExport"); 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()!=2*/ /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/ ) { //QString cppSig = "RFileExporterFactoryAdapter::canExport"; // 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)); //} int ret = RFileExporterFactoryAdapter::canExport( fileName, nameFilter ); // block recursion again: _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellFileExporterFactoryAdapter::canExport", engine); return ret; } 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))); int res = qscriptvalue_cast< int >( _q_function.call(__qtscript_self, QScriptValueList() // type: QString &, copyable: true << qScriptValueFromValue(engine, fileName ) // type: QString &, copyable: true << qScriptValueFromValue(engine, nameFilter ) ) ) ; _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellFileExporterFactoryAdapter::canExport", engine); return res; } }
RVector REcmaShellSnapDistance::snap( const RVector & position, RGraphicsView & view, const QSet < REntity::Id > & candidates, const RBox & queryBox ) { QScriptEngine* engine = __qtscript_self.engine(); //REcmaHelper::shellFunctionStart("REcmaShellSnapDistance::snap", engine); QScriptValue _q_function = __qtscript_self.property("snap"); 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()!=4*/ /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/ ) { //QString cppSig = "RSnapDistance::snap"; // 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)); //} RVector ret = RSnapDistance::snap( position, view, candidates, queryBox ); // block recursion again: _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellSnapDistance::snap", engine); return ret; } // 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))); RVector res; res = qscriptvalue_cast< RVector >( _q_function.call(__qtscript_self, QScriptValueList() // type: RVector &, copyable: true << qScriptValueFromValue(engine, // const reference argument - make a new object: new RVector(position) ) // type: RGraphicsView &, copyable: false << qScriptValueFromValue(engine, &view ) // type: QSet < REntity::Id > &, copyable: false << qScriptValueFromValue(engine, // const reference argument - make a new object: new QSet < REntity::Id >(candidates) ) // type: RBox &, copyable: true << qScriptValueFromValue(engine, // const reference argument - make a new object: new RBox(queryBox) ) ) ) ; _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellSnapDistance::snap", engine); return res; }
QList < RVector > REcmaShellSnapDistance::snapEntity( QSharedPointer < REntity > entity, const RVector & point, const RBox & queryBox, RGraphicsView & view ) { QScriptEngine* engine = __qtscript_self.engine(); //REcmaHelper::shellFunctionStart("REcmaShellSnapDistance::snapEntity", engine); QScriptValue _q_function = __qtscript_self.property("snapEntity"); 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()!=4*/ /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/ ) { //QString cppSig = "RSnapDistance::snapEntity"; // 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)); //} QList < RVector > ret = RSnapDistance::snapEntity( entity, point, queryBox, view ); // block recursion again: _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellSnapDistance::snapEntity", engine); return ret; } // 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))); // temporary make protected function scriptable, only from the context of this function call: QScriptValue proto = engine->defaultPrototype(qMetaTypeId<RSnapDistance*>()); REcmaHelper::registerFunction(engine, &proto, snapEntity, "snapEntity"); QList < RVector > res; REcmaHelper::fromScriptValue(engine, _q_function.call(__qtscript_self, QScriptValueList() // type: QSharedPointer < REntity >, copyable: false << qScriptValueFromValue(engine, entity ) // type: RVector &, copyable: true << qScriptValueFromValue(engine, // const reference argument - make a new object: new RVector(point) ) // type: RBox &, copyable: true << qScriptValueFromValue(engine, // const reference argument - make a new object: new RBox(queryBox) ) // type: RGraphicsView &, copyable: false << qScriptValueFromValue(engine, &view ) ) , res ) ; _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellSnapDistance::snapEntity", engine); return res; }
void REcmaShellSpatialIndexVisitorAdapter::visitData( int id, int pos, double x1, double y1, double z1, double x2, double y2, double z2 ) { QScriptEngine* engine = __qtscript_self.engine(); //REcmaHelper::shellFunctionStart("REcmaShellSpatialIndexVisitorAdapter::visitData", engine); QScriptValue _q_function = __qtscript_self.property("visitData"); 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()!=8*/ /*|| (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)*/ ) { //QString cppSig = "RSpatialIndexVisitorAdapter::visitData"; // 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)); //} RSpatialIndexVisitorAdapter::visitData( id, pos, x1, y1, z1, x2, y2, z2 ); // block recursion again: _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellSpatialIndexVisitorAdapter::visitData", engine); return; } // 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: int, copyable: true << qScriptValueFromValue(engine, id ) // type: int, copyable: true << qScriptValueFromValue(engine, pos ) // type: double, copyable: true << qScriptValueFromValue(engine, x1 ) // type: double, copyable: true << qScriptValueFromValue(engine, y1 ) // type: double, copyable: true << qScriptValueFromValue(engine, z1 ) // type: double, copyable: true << qScriptValueFromValue(engine, x2 ) // type: double, copyable: true << qScriptValueFromValue(engine, y2 ) // type: double, copyable: true << qScriptValueFromValue(engine, z2 ) ) ; _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellSpatialIndexVisitorAdapter::visitData", engine); }
void REcmaShellFileImporterAdapter::setCurrentBlockId( RBlock::Id id ) { QScriptEngine* engine = __qtscript_self.engine(); //REcmaHelper::shellFunctionStart("REcmaShellFileImporterAdapter::setCurrentBlockId", engine); QScriptValue _q_function = __qtscript_self.property("setCurrentBlockId"); 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 = "RFileImporterAdapter::setCurrentBlockId"; // 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)); //} RFileImporterAdapter::setCurrentBlockId( id ); // block recursion again: _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellFileImporterAdapter::setCurrentBlockId", 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: RBlock::Id, copyable: true << qScriptValueFromValue(engine, id ) ) ; _q_function.setData(QScriptValue(engine, prev)); //REcmaHelper::shellFunctionEnd("REcmaShellFileImporterAdapter::setCurrentBlockId", engine); } }