public override int CompareTo(VHDLScalarValue obj)
 {
     if (obj is VHDLPhysicalValue <T> )
     {
         VHDLPhysicalValue <T> els = obj as VHDLPhysicalValue <T>;
         return(mValue.CompareTo(els.mValue));
     }
     throw new ArgumentException(string.Format("Could not cast {0} to VHDLPhysicalValue<{1}>", obj.GetType().Name, GetType().Name));
 }
示例#2
0
 public VHDLPhysicalValue(VHDLPhysicalType <T> physicalType, VHDLPhysicalValue <T> value)
     : base(physicalType)
 {
     this.physicalType = physicalType;
     init(value.mValue);
 }
示例#3
0
 public VHDLPhysicalValue(VHDLPhysicalValue <T> value)
     : this(VHDLPhysicalType <T> .DefPhysicalType, value)
 {
 }
 public bool Equals(VHDLPhysicalValue <T> value)
 {
     return(mValue == value.Value);
 }
 public bool GreaterEquals(VHDLPhysicalValue <T> value)
 {
     return(mValue >= value.Value);
 }
 public bool GreaterThan(VHDLPhysicalValue <T> value)
 {
     return(mValue > value.Value);
 }
 public bool LessThan(VHDLPhysicalValue <T> value)
 {
     return(mValue < value.Value);
 }
 public VHDLPhysicalValue <T> Minus(VHDLPhysicalValue <T> value)
 {
     return(new VHDLPhysicalValue <T>(physicalType, mValue - value.Value));
 }