Exemple #1
0
        /*
         * Abstract Methods
         */
        /// <summary>
        /// Makes a copy of this PUCValue object.  Inherited from the
        /// ICloneable interface.
        /// </summary>
        /// <returns>a shallow copy of this PUCValue object</returns>
        public object Clone()
        {
            PUCValue val = new PUCValue(this._valueSpace);

            val._value        = this._value;
            val._definedValue = this._definedValue;

            return(val);
        }
Exemple #2
0
 /// <summary>
 /// Compares the values within two value spaces, and returns a result
 /// based on a comparison of the values stored within the space objects.
 /// The function returns 0 if the values are equal, and non-zero if the
 /// values are not equal.  If greater-than and less-than relations make
 /// sense for the space (NumberSpaces), -1 is returned when this.value &lt;
 /// val and 1 is returned when this.value &gt; val.
 ///
 /// This function assumes that the ValueSpaces are equivalent.  The
 /// results of this function are not meaningful otherwise, and an
 /// exception may be thrown if the spaces are significantly different.
 /// </summary>
 /// <param name="space">a ValueSpace to compare to this one</param>
 /// <returns>an integer describing how the values of these spaces are related</returns>
 public int CompareValues(PUCValue val)
 {
     return(this._valueSpace.CompareValues(this, val));
 }