コード例 #1
0
        //
        //	 * (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);
                }
            }
        }
コード例 #2
0
        //
        //	 * (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);
                }
            }
        }
コード例 #3
0
 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);
         }
     }
 }
コード例 #4
0
        ///
        ///	 <summary> * Sets the ValueUsage attribute of the iSkip'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 setValueValueUsage(int iSkip, EnumFitsValue @value)
        {
            JDFValue e = (JDFValue)getElement(ElementName.VALUE, null, iSkip);

            e.setValueUsage(EnumValueUsage.getEnum(@value.getName()));
        }