Class RecordValue
java.lang.Object
svm.value.Value
svm.value.RecordValue
RecordValue.
record_value
::= c-record structured_type
<attribute_value>+ endrecord
structured_type ::= record_tag:tag
attribute_value
::= attr attribute:tag type repetition_value
Link to GitHub: Source File.
- Author:
- S-Port: Definition of S-code, Øystein Myhre Andersen
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe Record AttributesThe Record Tag -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConstruct a new RecordValue.privateConstruct a RecordValue from reading the given input -
Method Summary
Modifier and TypeMethodDescriptionprivate intAdd characters to 'attrValues'.private intAdd the given value to 'attrValues'.voidemit(DataSegment dseg) Add this value to the given DataSegmentstatic RecordValueofScode()Scans the remaining S-Code belonging to this RecordValue.voidUtility print method.static RecordValueread(AttributeInputStream inpt) Reads a RecordValue from the given input.private static intUpdate the 'attrValues(idx)' with the given value.toString()voidwrite(AttributeOutputStream oupt) Writes this Value to the given output.
-
Field Details
-
tag
The Record Tag -
attrValues
-
-
Constructor Details
-
RecordValue
private RecordValue()Construct a new RecordValue. -
RecordValue
Construct a RecordValue from reading the given input- Parameters:
inpt- the input stream- Throws:
IOException- if IOException occur
-
-
Method Details
-
ofScode
Scans the remaining S-Code belonging to this RecordValue. Then construct a new RecordValue instance.- Returns:
- that RecordValue instance.
-
setValue
-
addValue
Add the given value to 'attrValues'. Note: Some values consists of several basic values- Parameters:
value- the value to be added- Returns:
- the number of basic values added
-
addChars
Add characters to 'attrValues'.- Parameters:
txt- the text value to be added- Returns:
- the number of basic values added
-
emit
Description copied from class:ValueAdd this value to the given DataSegment -
print
-
toString
-
write
Description copied from class:ValueWrites this Value to the given output.- Overrides:
writein classValue- Parameters:
oupt- the output stream- Throws:
IOException- if IOException occur
-
read
Reads a RecordValue from the given input.- Parameters:
inpt- the AttributeInputStream- Returns:
- the RecordValue read
- Throws:
IOException- if IOException occur
-