Exemplo n.º 1
0
         QScriptValue
        REcmaRefPoint::setCenter
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaRefPoint::setCenter", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaRefPoint::setCenter";
            //QCoreApplication::processEvents();

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

                //Q_ASSERT(self!=NULL);
                if (self==NULL) {
                    return REcmaHelper::throwError("self is NULL", context);
                }
                
    
    if( context->argumentCount() ==
    1 && (
            context->argument(0).isBool()
        ) /* type: bool */
    
    ){
    // prepare arguments:
    
                    // argument isStandardType
                    bool
                    a0 =
                    (bool)
                    
                    context->argument( 0 ).
                    toBool();
                
    // end of arguments

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


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RRefPoint.setCenter().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaRefPoint::setCenter", context, engine);
            return result;
        }
Exemplo n.º 2
0
         QScriptValue
        REcmaRefPoint::isIgnore
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaRefPoint::isIgnore", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaRefPoint::isIgnore";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RRefPoint* self = 
                        getSelf("isIgnore", 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 'bool'
    bool cppResult =
        
               self->isIgnore();
        // return type: bool
                // standard Type
                result = QScriptValue(cppResult);
            
    } else


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RRefPoint.isIgnore().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaRefPoint::isIgnore", context, engine);
            return result;
        }
Exemplo n.º 3
0
QCADCORE_EXPORT QDebug operator<<(QDebug dbg, const RRefPoint& v) {
    dbg.nospace() << "RRefPoint(" << v.x << ", " << v.y << ", " << v.z << ", " << v.valid << ", " << v.getFlags() << ")";
    return dbg;
}
Exemplo n.º 4
0
         QScriptValue
        REcmaRefPoint::getFlag
        (QScriptContext* context, QScriptEngine* engine) 
        
        {
            //REcmaHelper::functionStart("REcmaRefPoint::getFlag", context, engine);
            //qDebug() << "ECMAScript WRAPPER: REcmaRefPoint::getFlag";
            //QCoreApplication::processEvents();

            QScriptValue result = engine->undefinedValue();
            
                    // public function: can be called from ECMA wrapper of ECMA shell:
                    RRefPoint* self = 
                        getSelf("getFlag", 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: RRefPoint::Flag */
    
    ){
    // prepare arguments:
    
                    // argument is reference
                    RRefPoint::Flag*
                    ap0 =
                    qscriptvalue_cast<
                    RRefPoint::Flag*
                        >(
                        context->argument(
                        0
                        )
                    );
                    if( ap0 == NULL ){
                           return REcmaHelper::throwError("RRefPoint: Argument 0 is not of type RRefPoint::Flag*.",
                               context);                    
                    }
                    RRefPoint::Flag& a0 = *ap0;
                
    // end of arguments

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


        
            {
               return REcmaHelper::throwError("Wrong number/types of arguments for RRefPoint.getFlag().",
                   context);
            }
            //REcmaHelper::functionEnd("REcmaRefPoint::getFlag", context, engine);
            return result;
        }