Examples of IRObject


Examples of com.dtrules.interpreter.IRObject

    static class  Xdef extends ROperator {
        Xdef(){super("xdef");}

        public void execute(DTState state) throws RulesException {
            RName    name  = state.datapop().rNameValue();
            IRObject value = state.datapop();
            boolean f = state.def(name, value, true);
            if(!f)
                if(state.find(name)==null){
                    throw new RulesException("Undefined",
                            "xdef",
View Full Code Here

Examples of com.dtrules.interpreter.IRObject

     */
    static class  Cvi   extends ROperator {
        Cvi(){super("cvi");}
       
        public void execute(DTState state) throws RulesException {
            IRObject o = state.datapop();
            IRObject v = RNull.getRNull();
            try{
                v = o.rIntegerValue();
            }catch(Exception e){}
            state.datapush(v);
        }
View Full Code Here

Examples of com.dtrules.interpreter.IRObject

     */
    static class  Cvr   extends ROperator {
        Cvr(){super("cvr"); }
       
        public void execute(DTState state) throws RulesException {
            IRObject o = state.datapop();
            IRObject v = RNull.getRNull();
            try{
                v = o.rDoubleValue();
            }catch(Exception e){}
            state.datapush(v);
        }
View Full Code Here

Examples of com.dtrules.interpreter.IRObject

     */
    static class  Cvb   extends ROperator {
        Cvb(){super("cvb");}
       
        public void execute(DTState state) throws RulesException {
            IRObject o = state.datapop();
            IRObject v = RNull.getRNull();
            try{
                v = o.rBooleanValue();
            }catch(Exception e){}
            state.datapush(v);   
        }
View Full Code Here

Examples of com.dtrules.interpreter.IRObject

     */
    static class  Cve   extends ROperator {
        Cve(){super("cve");}
       
        public void execute(DTState state) throws RulesException {
            IRObject o = state.datapop();
            IRObject v = RNull.getRNull();
            try{
                v = o.rEntityValue();
            }catch(Exception e){}
            state.datapush(v);
        }
View Full Code Here

Examples of com.dtrules.interpreter.IRObject

     */
    static class  Cvs   extends ROperator {
        Cvs(){super("cvs");}
       
        public void execute(DTState state) throws RulesException {
            IRObject o = state.datapop();
            if(o.type() == iNull){
                state.datapush(o);
            }else{
                state.datapush(RString.newRString(o.stringValue()));
            }
        }
View Full Code Here

Examples of com.dtrules.interpreter.IRObject

     */
    static class  Cvn   extends ROperator {
        Cvn(){super("cvn");}
       
        public void execute(DTState state) throws RulesException {
            IRObject o = state.datapop();
            IRObject v = RNull.getRNull();
            try{
                v = o.rNameValue();
            }catch(Exception e){}
            state.datapush(v);
        }
View Full Code Here

Examples of com.dtrules.interpreter.IRObject

     */
    static class  Cvd   extends ROperator {
        Cvd(){super("cvd");}
       
        public void execute(DTState state) throws RulesException {
            IRObject o = state.datapop();
            IRObject v = RNull.getRNull();
            try{
                v = o.rTimeValue();
            }catch(Exception e){
                Date d =    state.getSession().getDateParser().getDate(o.stringValue());
                if(d!=null){
View Full Code Here

Examples of com.dtrules.interpreter.IRObject

    static class If extends ROperator {
        If(){super("if");}

        public void execute(DTState state) throws RulesException {
            boolean  test = state.datapop().booleanValue();
            IRObject body = state.datapop();
            if(test)body.execute(state);
        }
View Full Code Here

Examples of com.dtrules.interpreter.IRObject

    static class Ifelse extends ROperator {
        Ifelse(){super("ifelse");}

        public void execute(DTState state) throws RulesException {
            boolean  test      = state.datapop().booleanValue();
            IRObject falsebody = state.datapop();
            IRObject truebody  = state.datapop();
            if(test){
                truebody.execute(state);
            }else{
                falsebody.execute(state);
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.