Class ParticleAttribute_PinConfiguration
ParticleAttribute<T> subclass representing pin configurations.
To write a value to a variable of this type, the SetValue(PinConfiguration) method must be used. It is not sufficient to apply changes to the PinConfiguration instance.
Inheritance
Namespace: AS2.Sim
Assembly: .dll
Syntax
public class ParticleAttribute_PinConfiguration : ParticleAttributeWithHistory<PinConfiguration>, IParticleAttribute, IReplayHistory
Constructors
| Edit this page View SourceParticleAttribute_PinConfiguration(Particle, string, PinConfiguration)
Declaration
public ParticleAttribute_PinConfiguration(Particle particle, string name, PinConfiguration value = null)
Parameters
Type | Name | Description |
---|---|---|
Particle | particle | |
string | name | |
PinConfiguration | value |
Fields
| Edit this page View SourcepcHistory
Declaration
private ValueHistoryPinConfiguration pcHistory
Field Value
Type | Description |
---|---|
ValueHistoryPinConfiguration |
Methods
| Edit this page View SourceContinueTracking()
Resets the marker to track the latest recorded state and to continue evolving as the simulation progresses.
Declaration
public override void ContinueTracking()
Overrides
| Edit this page View SourceCutOffAtMarker()
Deletes all recorded states after the currently marked round.
Declaration
public override void CutOffAtMarker()
Overrides
| Edit this page View SourceEquals(ParticleAttribute<PinConfiguration>)
Indicates whether the current object is equal to another object of the same type.
Declaration
public override bool Equals(ParticleAttribute<PinConfiguration> other)
Parameters
Type | Name | Description |
---|---|---|
ParticleAttribute<PinConfiguration> | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Overrides
| Edit this page View SourceGenerateSaveData()
Implementation of GenerateSaveData(). Generates data specifically for pin configuration attributes.
Declaration
public override ParticleAttributeSaveDataBase GenerateSaveData()
Returns
Type | Description |
---|---|
ParticleAttributeSaveDataBase | A serializable representation of the attribute's state. |
Overrides
| Edit this page View SourceGetCurrentValue()
Returns the latest value of this attribute.
The return value changes based on value assignments made within this activation. Use GetValue() to get the attribute's value at the beginning of the current round.
Declaration
public override PinConfiguration GetCurrentValue()
Returns
Type | Description |
---|---|
PinConfiguration | The latest value of this attribute. |
Overrides
| Edit this page View SourceGetFirstRecordedRound()
Returns the first round for which a state has been recorded.
The object cannot be reset to a time before this round.
Declaration
public override int GetFirstRecordedRound()
Returns
Type | Description |
---|---|
int | The first round for which a state has been recorded. |
Overrides
| Edit this page View SourceGetMarkedRound()
Returns the round that is currently marked.
If the marker is tracking the object's state, this round will increase every time a new value is recorded.
Declaration
public override int GetMarkedRound()
Returns
Type | Description |
---|---|
int | The round that is currently marked. |
Overrides
| Edit this page View SourceGetObjectValue()
Declaration
public override object GetObjectValue()
Returns
Type | Description |
---|---|
object |
Overrides
| Edit this page View SourceGetValue()
Returns the attribute's value from the snapshot taken at the beginning of the current round.
The return value is not changed by assigning new values to this attribute! To get the latest assigned value, use GetCurrentValue().
Declaration
public override PinConfiguration GetValue()
Returns
Type | Description |
---|---|
PinConfiguration | The attribute value at the beginning of the current round. |
Overrides
| Edit this page View SourceIsTracking()
Checks whether the object is currently tracking the latest recorded state.
If the object is not tracking, it may not be usable in the regular way until the tracking is continued.
Declaration
public override bool IsTracking()
Returns
Type | Description |
---|---|
bool | Whether the marker currently tracks the latest recorded state. |
Overrides
| Edit this page View SourceRestoreFromSaveData(ParticleAttributeSaveDataBase)
Implementation of RestoreFromSaveData(ParticleAttributeSaveDataBase). Uses additional information stored in specific pin configuration attribute save data.
Declaration
public override bool RestoreFromSaveData(ParticleAttributeSaveDataBase data)
Parameters
Type | Name | Description |
---|---|---|
ParticleAttributeSaveDataBase | data | A serializable representation of a particle attribute state. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
| Edit this page View SourceSetMarkerToRound(int)
Sets the tracking marker to the specified round, restores the state recorded for that point in time, and stops the marker from tracking the latest round.
The target round must not be earlier than the round returned by GetFirstRecordedRound().
Declaration
public override void SetMarkerToRound(int round)
Parameters
Type | Name | Description |
---|---|---|
int | round | The round to which the tracking marker should be set. |
Overrides
| Edit this page View SourceSetValue(PinConfiguration)
Assigns the given value to this attribute.
Note that this value will only be visible to other particles in the next round.
Declaration
public override void SetValue(PinConfiguration value)
Parameters
Type | Name | Description |
---|---|---|
PinConfiguration | value | The new value assigned to this attribute. |
Overrides
| Edit this page View SourceShiftTimescale(int)
Shifts all records as well as the marker by the specified amount of rounds.
Declaration
public override void ShiftTimescale(int amount)
Parameters
Type | Name | Description |
---|---|---|
int | amount | The number of rounds to add to each entry. May be negative. |
Overrides
| Edit this page View SourceStepBack()
Moves the marker one round back and restores the object's recorded state for that round. Also stops it from tracking the last round if it was still tracking.
Must not be called when the marker is already at the first recorded round.
Declaration
public override void StepBack()
Overrides
| Edit this page View SourceStepForward()
Moves the marker one round forward and restores the object's recorded state for that round. Also stops it from tracking the last round if it was still tracking.
May be ineffective if the object has a hard limit on the last recorded round.
Declaration
public override void StepForward()
Overrides
| Edit this page View SourceToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |
Overrides
ToString_AttributeValue()
String representation of the attribute's current value.
Declaration
public string ToString_AttributeValue()
Returns
Type | Description |
---|---|
string | A string containing the attribute's current value. |
UpdateAttributeValue(string)
Updates the attribute's value to the one represented by the given string.
Declaration
public bool UpdateAttributeValue(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | String representation of the new value. |
Returns
Type | Description |
---|---|
bool |
|