Struct BeamNumber
Represents a unique identifier for a beam of a plan. The identifier is unique within the scope of the plan.
Inherited Members
Namespace: VMS.TPS.Common.Model.Types
Assembly: VMS.TPS.Common.Model.Types.dll
Syntax
public struct BeamNumber : IXmlSerializable, IEquatable<BeamNumber>
Constructors
BeamNumber(Int32)
Constructs a new beam number from a numeric beam number.
Declaration
public BeamNumber(int number)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | number | Make sure that the beam number corresponds to the real beam number, otherwise use NotABeamNumber. |
BeamNumber(BeamNumber)
Constructs a new beam number from another BeamNumber.
Declaration
public BeamNumber(BeamNumber other)
Parameters
Type | Name | Description |
---|---|---|
BeamNumber | other | Another BeamNumber. |
Fields
NotABeamNumber
Represents an undefined BeamNumber that does not have a corresponding beam. The IsValid property of the Invalid BeamNumber always returns false.
Declaration
public static readonly BeamNumber NotABeamNumber
Field Value
Type | Description |
---|---|
BeamNumber |
Properties
IsValid
Returns true if the given BeamNumber is valid. Otherwise false.
Declaration
public bool IsValid { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Number
The beam number.
Declaration
public int Number { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object other)
Parameters
Type | Name | Description |
---|---|---|
System.Object | other | The other object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if this object equals to the other object. Otherwise false. |
Overrides
Equals(BeamNumber)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(BeamNumber other)
Parameters
Type | Name | Description |
---|---|---|
BeamNumber | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | True if the current object is equal to the other object. Otherwise, false. |
GetHashCode()
Provides a hash code for the item, see System.Object.GetHashCode().
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The hash code for this instance. |
Overrides
GetSchema()
This member is internal to the Eclipse Scripting API.
Declaration
public XmlSchema GetSchema()
Returns
Type | Description |
---|---|
System.Xml.Schema.XmlSchema | XmlSchema. |
ReadXml(XmlReader)
This member is internal to the Eclipse Scripting API.
Declaration
public void ReadXml(XmlReader reader)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlReader | reader | The XmlReader stream from which the object is deserialized. |
WriteXml(XmlWriter)
Serialization support.
Declaration
public void WriteXml(XmlWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlWriter | writer | The System.Xml.XmlWriter stream to which the object is serialized. |
Operators
Equality(BeamNumber, BeamNumber)
Compares two beam numbers for equality.
Declaration
public static bool operator ==(BeamNumber a, BeamNumber b)
Parameters
Type | Name | Description |
---|---|---|
BeamNumber | a | The first object to compare. |
BeamNumber | b | The second object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if a and b represent the same beam number. Otherwise, false. |
GreaterThan(BeamNumber, BeamNumber)
Compares two BeamNumbers, a and b, to determine if a is greater than b.
Declaration
public static bool operator>(BeamNumber a, BeamNumber b)
Parameters
Type | Name | Description |
---|---|---|
BeamNumber | a | The first object to compare. |
BeamNumber | b | The second object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if a is greater than b. Otherwise false. |
GreaterThanOrEqual(BeamNumber, BeamNumber)
Compares two BeamNumbers, a and b, to determine if a is greater than or equal to b.
Declaration
public static bool operator >=(BeamNumber a, BeamNumber b)
Parameters
Type | Name | Description |
---|---|---|
BeamNumber | a | The first object to compare. |
BeamNumber | b | The second object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if a is greater than or equal to b. Otherwise false. |
Implicit(BeamNumber to Int32)
Converts a BeamNumber to an int.
Declaration
public static implicit operator int (BeamNumber bn)
Parameters
Type | Name | Description |
---|---|---|
BeamNumber | bn | The converted BeamNumber object. |
Returns
Type | Description |
---|---|
System.Int32 | The beam number as an integer. |
Inequality(BeamNumber, BeamNumber)
Compares two BeamNumbers for inequality.
Declaration
public static bool operator !=(BeamNumber a, BeamNumber b)
Parameters
Type | Name | Description |
---|---|---|
BeamNumber | a | The first object to compare. |
BeamNumber | b | The second object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if a and b represent a different beam number. Otherwise false. |
LessThan(BeamNumber, BeamNumber)
Compares two BeamNumbers, a and b, to determine if a is smaller than b.
Declaration
public static bool operator <(BeamNumber a, BeamNumber b)
Parameters
Type | Name | Description |
---|---|---|
BeamNumber | a | The first object to compare. |
BeamNumber | b | The second object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if a is smaller than b. Otherwise false. |
LessThanOrEqual(BeamNumber, BeamNumber)
Compares two BeamNumbers, a and b, to determine if a is smaller than or equal to b.
Declaration
public static bool operator <=(BeamNumber a, BeamNumber b)
Parameters
Type | Name | Description |
---|---|---|
BeamNumber | a | The first object to compare. |
BeamNumber | b | The second object to compare. |
Returns
Type | Description |
---|---|
System.Boolean | True if a is smaller than or equal to b. Otherwise false. |