Search Results for

    Show / Hide Table of Contents

    Class ParticleAttribute_String

    ParticleAttribute<T> subclass representing strings.

    Inheritance
    object
    ParticleAttributeBase
    ParticleAttribute<string>
    ParticleAttributeWithHistory<string>
    ParticleAttribute_String
    Implements
    IParticleAttribute
    IReplayHistory
    Namespace: AS2.Sim
    Assembly: .dll
    Syntax
    public class ParticleAttribute_String : ParticleAttributeWithHistory<string>, IParticleAttribute, IReplayHistory

    Constructors

    | Edit this page View Source

    ParticleAttribute_String(Particle, string, string)

    Declaration
    public ParticleAttribute_String(Particle particle, string name, string value = "")
    Parameters
    Type Name Description
    Particle particle
    string name
    string value

    Methods

    | Edit this page View Source

    Equals(ParticleAttribute<string>)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public override bool Equals(ParticleAttribute<string> other)
    Parameters
    Type Name Description
    ParticleAttribute<string> 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<string>.Equals(ParticleAttribute<string>)
    | 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 string GetCurrentValue()
    Returns
    Type Description
    string

    The latest value of this attribute.

    Overrides
    ParticleAttribute<string>.GetCurrentValue()
    | 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 string GetValue()
    Returns
    Type Description
    string

    The attribute value at the beginning of the current round.

    Overrides
    ParticleAttribute<string>.GetValue()
    | Edit this page View Source

    SetValue(string)

    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(string value)
    Parameters
    Type Name Description
    string value

    The new value assigned to this attribute.

    Overrides
    ParticleAttribute<string>.SetValue(string)
    | 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