Class TextValue

java.lang.Object
svm.value.Value
svm.value.TextValue

public class TextValue extends Value

TextValue.

text_value ::= text long_string

Link to GitHub: Source File.

Author:
S-Port: Definition of S-code, Øystein Myhre Andersen
  • Field Details

    • textValue

      public String textValue
      The text value string
  • Constructor Details

    • TextValue

      public TextValue()
      Default Constructor
    • TextValue

      private TextValue(String textValue)
      Construct a new TextValue with the given parameter string
      Parameters:
      textValue - the textValue value string
  • Method Details

    • ofScode

      public static TextValue ofScode()
      Scans the remaining S-Code belonging to this TextValue. Then construct a new TextValue instance.
      Returns:
      that TextValue instance.
    • emitChars

      public ObjectAddress emitChars(DataSegment dseg)
      Emit the characters of this TextValue
      Parameters:
      dseg - the DataSegment to receive the chars
      Returns:
      the address of the emitted value
    • emit

      public void emit(DataSegment dseg)
      Description copied from class: Value
      Add this value to the given DataSegment
      Overrides:
      emit in class Value
      Parameters:
      dseg - the DataSegment
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • write

      public void write(AttributeOutputStream oupt) throws IOException
      Description copied from class: Value
      Writes this Value to the given output.
      Overrides:
      write in class Value
      Parameters:
      oupt - the output stream
      Throws:
      IOException - if IOException occur
    • read

      public static TextValue read(AttributeInputStream inpt) throws IOException
      Reads a TextValue from the given input.
      Parameters:
      inpt - the AttributeInputStream
      Returns:
      the TextValue read
      Throws:
      IOException - if IOException occur