Package com.dtrules.interpreter

Examples of com.dtrules.interpreter.IRObject.stringValue()


            throw new RulesException("Data Stack Underflow", "datapop()", "Data Stack underflow.");
        }
        IRObject rval = datastk[--datastkptr];
        datastk[datastkptr] = null;
        if (testState(VERBOSE)) {
            traceInfo("datapop", rval.stringValue());
        }
        return (rval);
    }

    /**
 
View Full Code Here


        Allocate(){super("allocate"); alias("cpush");}

        public void execute(DTState state) throws RulesException {
            IRObject v = state.datapop();
            if(state.testState(DTState.TRACE)){
                state.traceInfo("allocate", "value",v.stringValue(),null);
            }
            state.cpush(v);
        }
    } 
   
View Full Code Here

                      e = autoDataMap.getSession().createEntity(null,entity);
                      autoDataMap.getEntities().put(entity,e);   // Remember the one we created, so we
                   }  
               }                                              //   don't create another one.
           }else {
               String skey = entity+"$"+iKey.stringValue();
               if(key!=null &&
                   !(key instanceof String
                       && ((String)key).length()==0)) {                // NOTE: We are NOT allowing "" as a key here!
                                                                         // If so, construct a key for that entity
                   e = (IREntity)autoDataMap.getEntities().get(skey);    //    and look for it.
View Full Code Here

    public void execute(DTState state) throws RulesException {
      IRObject rarray = state.datapop();
      List<IRObject> array = rarray.arrayValue();
      array.clear();
      if (state.testState(DTState.TRACE)) {
        state.traceInfo("clear", "array", rarray.stringValue(), null);
      }
    }
  }

  /**
 
View Full Code Here

        public void execute(DTState state) throws RulesException {
            int      index = state.datapop().intValue();
            IRObject value = state.getFrameValue(index);
            if(state.testState(DTState.TRACE)){
                state.traceInfo("local_fetch", "index",index+"","value",value.stringValue(),null);
            }
            state.datapush(value);
        }
    }
    /**
 
View Full Code Here

        public void execute(DTState state) throws RulesException {
            int      index = state.datapop().intValue();
            IRObject value = state.datapop();
            if(state.testState(DTState.TRACE)){
                state.traceInfo("local_store", "index",index+"","value",value.stringValue(),null);
            }
            state.setFrameValue(index, value);
        }
    }
View Full Code Here

    public static class Newdate extends ROperator {
      Newdate(){super("newdate");}

      public void arrayExecute(DTState state) throws RulesException {
          IRObject obj   = state.datapop();
          String   date  = obj.stringValue();
        try{
          RDate rdate = RDate.getRDate(state.getSession(), date);
          state.datapush(rdate);
        }catch(RulesException e){
          state.datapush(RNull.getRNull());
View Full Code Here

    static class Newdate extends ROperator {
      Newdate(){super("newdate");}

      public void execute(DTState state) throws RulesException {
          IRObject obj = state.datapop();
        state.datapush(RTime.getRDate(state.getSession(), obj.stringValue()));
      }
    }

        /**
         * Days( number -- Date )
View Full Code Here

      String pattern = state.datapop().stringValue();
      IRObject obj1 = state.datapop();
      String v = "";
      if (obj1.type().getId() != IRObject.iNull) {
        v = obj1.stringValue().trim();
      }
      String[] results = v.split(pattern);

      RArray r = new RArray(state.getSession().getUniqueID(), false,
          false);
View Full Code Here

    public void arrayExecute(DTState state) throws RulesException {
      IRObject rarray = state.datapop();
      ArrayList<IRObject> array = rarray.arrayValue();
      array.clear();
      if (state.testState(DTState.TRACE)) {
        state.traceInfo("clear", "array", rarray.stringValue(), null);
      }
    }
  }

  /**
 
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.