Class DirectionMessage
Namespace: AS2.Algos.ChiralityCompass
Assembly: .dll
Syntax
public class DirectionMessage : Message
Constructors
| Edit this page View SourceDirectionMessage()
Declaration
public DirectionMessage()
DirectionMessage(Direction)
Declaration
public DirectionMessage(Direction direction)
Parameters
Type | Name | Description |
---|---|---|
Direction | direction |
Fields
| Edit this page View Sourcedirection
Declaration
public Direction direction
Field Value
Type | Description |
---|---|
Direction |
Methods
| Edit this page View SourceCopy()
Creates a deep copy of this message.
The main purpose of this method is to prevent particles from sharing instances of messages due to reference semantics. Changing data in a message a particle has received (for example to forward the altered message later) can cause errors if this method does not create a deep copy of the original message.
Declaration
public override Message Copy()
Returns
Type | Description |
---|---|
Message | A deep copy of this message. |
Overrides
| Edit this page View SourceEquals(Message)
Checks whether this message is equivalent to the given other message.
This method should only return true
if the two
compared messages are equivalent in the sense that any
particle receiving one of the messages will behave
exactly as if it had received the other message.
In other words, the messages have to be equivalent
with respect to the total order defined on all
possible messages.
Note that this method and GreaterThan(Message)
must not both return true
when comparing the
same instances.
Declaration
public override bool Equals(Message other)
Parameters
Type | Name | Description |
---|---|---|
Message | other | The message that should be compared to this one. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
| Edit this page View SourceGreaterThan(Message)
Checks whether this message has a higher priority than the given other message.
This is the main comparison operator defining the total order on the set of all possible messages. If the order is not strict, the message that is received in the case that multiple messages are sent on the same circuit in the same round may not be well-defined.
Note that this method and Equals(Message)
must not both return true
when comparing the
same instances.
Declaration
public override bool GreaterThan(Message other)
Parameters
Type | Name | Description |
---|---|---|
Message | other | The message that should be compared to this one. |
Returns
Type | Description |
---|---|
bool |
|