Search Results for

    Show / Hide Table of Contents

    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
    object
    ParticleAttributeBase
    ParticleAttribute<PinConfiguration>
    ParticleAttributeWithHistory<PinConfiguration>
    ParticleAttribute_PinConfiguration
    Implements
    IParticleAttribute
    IReplayHistory
    Namespace: AS2.Sim
    Assembly: .dll
    Syntax
    public class ParticleAttribute_PinConfiguration : ParticleAttributeWithHistory<PinConfiguration>, IParticleAttribute, IReplayHistory

    Constructors

    | Edit this page View Source

    ParticleAttribute_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 Source

    pcHistory

    Declaration
    private ValueHistoryPinConfiguration pcHistory
    Field Value
    Type Description
    ValueHistoryPinConfiguration

    Methods

    | Edit this page View Source

    ContinueTracking()

    Resets the marker to track the latest recorded state and to continue evolving as the simulation progresses.

    Declaration
    public override void ContinueTracking()
    Overrides
    ParticleAttributeWithHistory<PinConfiguration>.ContinueTracking()
    | Edit this page View Source

    CutOffAtMarker()

    Deletes all recorded states after the currently marked round.

    Declaration
    public override void CutOffAtMarker()
    Overrides
    ParticleAttributeWithHistory<PinConfiguration>.CutOffAtMarker()
    | Edit this page View Source

    Equals(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 other parameter; otherwise, false.

    Overrides
    ParticleAttribute<PinConfiguration>.Equals(ParticleAttribute<PinConfiguration>)
    | Edit this page View Source

    GenerateSaveData()

    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
    ParticleAttributeWithHistory<PinConfiguration>.GenerateSaveData()
    | Edit this page View Source

    GetCurrentValue()

    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
    ParticleAttribute<PinConfiguration>.GetCurrentValue()
    | Edit this page View Source

    GetFirstRecordedRound()

    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
    ParticleAttributeWithHistory<PinConfiguration>.GetFirstRecordedRound()
    | Edit this page View Source

    GetMarkedRound()

    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
    ParticleAttributeWithHistory<PinConfiguration>.GetMarkedRound()
    | Edit this page View Source

    GetObjectValue()

    Declaration
    public override object GetObjectValue()
    Returns
    Type Description
    object
    Overrides
    ParticleAttributeWithHistory<PinConfiguration>.GetObjectValue()
    | Edit this page View Source

    GetValue()

    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
    ParticleAttribute<PinConfiguration>.GetValue()
    | Edit this page View Source

    IsTracking()

    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
    ParticleAttributeWithHistory<PinConfiguration>.IsTracking()
    | Edit this page View Source

    RestoreFromSaveData(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

    true if and only if the state update was successful.

    Overrides
    ParticleAttributeWithHistory<PinConfiguration>.RestoreFromSaveData(ParticleAttributeSaveDataBase)
    | Edit this page View Source

    SetMarkerToRound(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
    ParticleAttributeWithHistory<PinConfiguration>.SetMarkerToRound(int)
    | Edit this page View Source

    SetValue(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
    ParticleAttribute<PinConfiguration>.SetValue(PinConfiguration)
    | Edit this page View Source

    ShiftTimescale(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
    ParticleAttributeWithHistory<PinConfiguration>.ShiftTimescale(int)
    | Edit this page View Source

    StepBack()

    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
    ParticleAttributeWithHistory<PinConfiguration>.StepBack()
    | Edit this page View Source

    StepForward()

    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
    ParticleAttributeWithHistory<PinConfiguration>.StepForward()
    | Edit this page View Source

    ToString()

    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
    object.ToString()
    | Edit this page View Source

    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.

    | Edit this page View Source

    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

    true if and only if the given string was parsed successfully.

    Implements

    IParticleAttribute
    IReplayHistory
    • Edit this page
    • View Source
    In this article
    Back to top AmoebotSim 2.0 Documentation v1.11
    Copyright © 2025 AmoebotSim 2.0 Authors
    Generated by DocFX