示例#1
0
  private void initialise(YVariable variable, boolean isInputOutput, String decompositionID) {
    startValues = new Values();
    startValues.name = variable.getName();
    startValues.dataType = variable.getDataTypeName();
    startValues.index = variable.getOrdering();
    startValues.attributes = variable.getAttributes();
    startValues.logPredicate = variable.getLogPredicate();
    startValues.value = null;
    if (isInputOutput) {
      startValues.scope = YDataHandler.INPUT_OUTPUT;
    } else if (variable instanceof YParameter) {
      if (((YParameter) variable).getParamType() == YParameter._INPUT_PARAM_TYPE) {
        startValues.scope = YDataHandler.INPUT;
      } else {
        startValues.scope = YDataHandler.OUTPUT;
        startValues.value = variable.getDefaultValue();
      }
    } else {
      startValues.scope = YDataHandler.LOCAL;
      startValues.value = variable.getInitialValue();
    }

    endValues = startValues.copy();
    setDecompositionID(decompositionID);
    initialiseValidity();
  }
示例#2
0
 // new row added at runtime, so no starting values
 public VariableRow(int scope) {
   startValues = new Values(); // just to avoid NPEs
   endValues = new Values();
   endValues.name = "";
   endValues.dataType = "string";
   endValues.scope = scope;
   endValues.value = "";
   endValues.attributes = new YAttributeMap();
   initialiseValidity();
 }
示例#3
0
 public Values copy() {
   Values copy = new Values();
   copy.name = name;
   copy.dataType = dataType;
   copy.scope = scope;
   copy.index = index;
   copy.value = value;
   copy.inputBinding = inputBinding;
   copy.outputBinding = outputBinding;
   copy.attributes = new YAttributeMap(attributes);
   copy.logPredicate = cloneLogPredicate();
   return copy;
 }
示例#4
0
 public void setUsage(int scope) {
   endValues.scope = scope;
 }