Пример #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;
 }