// // * (non-Javadoc) // * // * @see // * org.cip4.jdflib.resource.devicecapability.JDFAbstractState#addValue(java // * .lang.String, org.cip4.jdflib.datatypes.JDFBaseDataTypes.EnumFitsValue) // public override void addValue(string @value, EnumFitsValue testlists) { if (fitsValue(@value, testlists)) { return; } if (testlists == null || EnumFitsValue.Allowed.Equals(testlists)) { JDFValue v = appendValue(); v.setAllowedValue(@value); if (testlists != null) { v.setValueUsage(EnumValueUsage.Allowed); } } if (EnumFitsValue.Present.Equals(testlists)) { JDFValue v = appendValue(); v.setAllowedValue(@value); if (testlists != null) { v.setValueUsage(EnumValueUsage.Present); } } }
// // * (non-Javadoc) // * // * @see // * org.cip4.jdflib.resource.devicecapability.JDFAbstractState#addValue(java // * .lang.String, org.cip4.jdflib.datatypes.JDFBaseDataTypes.EnumFitsValue) // public override void addValue(string @value, EnumFitsValue testlists) { if (fitsValue(@value, testlists)) { return; } try { new JDFMatrix(@value); } catch (FormatException) { return; // nop for bad values } if (testlists == null || EnumFitsValue.Allowed.Equals(testlists)) { JDFValue v = appendValue(); v.setAllowedValue(@value); if (testlists != null) { v.setValueUsage(EnumValueUsage.Allowed); } } if (EnumFitsValue.Present.Equals(testlists)) { JDFValue v = appendValue(); v.setAllowedValue(@value); if (testlists != null) { v.setValueUsage(EnumValueUsage.Present); } } }
public virtual void appendValue(JDFMatrix @value, EnumFitsValue testlists) { if (testlists == null || EnumFitsValue.Allowed.Equals(testlists)) { JDFValue v = appendValue(); v.setAllowedValue(@value.ToString()); if (testlists != null) { v.setValueUsage(EnumValueUsage.Allowed); } } if (EnumFitsValue.Present.Equals(testlists)) { JDFValue v = appendValue(); v.setAllowedValue(@value.ToString()); if (testlists != null) { v.setValueUsage(EnumValueUsage.Present); } } }
/// /// <summary> * Sets the AllowedValue attribute of the i-th subelement <code>Value</code> /// * </summary> /// * <param name="iSkip"> /// * the number of <code>Value</code> elements to skip </param> /// * <param name="value"> /// * value to set the attribute to </param> /// public virtual void setValueAllowedValue(int iSkip, string @value) { JDFValue e = (JDFValue)getElement(ElementName.VALUE, null, iSkip); e.setAllowedValue(@value); }
/// /// <summary> * Sets the <code>AllowedValue</code> attribute of the iSkip'th subelement /// * <code>Value</code> /// * </summary> /// * <param name="value"> /// * value to set the attribute to </param> /// public virtual void appendValueAllowedValue(string @value) { JDFValue e = (JDFValue)appendElement(ElementName.VALUE, null); e.setAllowedValue(@value); }