Open Rails

STFReader Members

STFReader overview

Public Instance Constructors

STFReader Overloaded. Initializes a new instance of the STFReader class.

Public Instance Properties

EofProperty that returns true when the EOF has been reached
FileNameFilename property for the file being parsed - for reporting purposes
LineNumberLine Number property for the file being parsed - for reporting purposes
SimisSignatureSIMIS header read from the first line of the file being parsed
TreeProperty returning the last {item} read using ReadItem() prefixed with string describing the nested block hierachy. The string returned is formatted 'rootnode(nestednode(childnode(previous_item'.

Public Instance Methods

DisposeOverloaded. Implements the IDisposable interface so this class can be implemented with the 'using(STFReader r = new STFReader(...)) {...}' C# statement.
EndOfBlockReturns true if the next character is the end of block, or end of file. Consuming the closing ")" all other values are not consumed.
EOF
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type.
GetType (inherited from Object)Gets the Type of the current instance.
MustMatchReports a critical error if the next {item} does not match the target.
ParseBlockOverloaded. Parse an STF file until the end of block ')' marker, using the array of lower case tokens, with a processor delegate/lambda
ParseFileOverloaded. Parse an STF file until the EOF, using the array of lower case tokens, with a processor delegate/lambda
PeekPastWhitespace
ReadBoolBlockReads the first item from a block in the STF format '( {double_constant} ... )' and return true if is not-zero or 'true'
ReadDoubleRead an double precision floating point number {constant_item}
ReadDoubleBlockRead an double precision constant from the STF format '( {double_constant} ... )'
ReadFloatRead an single precision floating point number {constant_item}
ReadFloatBlockRead an single precision constant from the STF format '( {float_constant} ... )'
ReadHexRead an hexidecimal encoded number {constant_item}
ReadHexBlockRead an hexidecimal encoded number from the STF format '( {int_constant} ... )'
ReadIntRead an signed integer {constant_item}
ReadIntBlockRead an integer constant from the STF format '( {int_constant} ... )'
ReadItemReturns the next whitespace delimited {item} from the STF file skipping comments, etc.
ReadStringReturn next whitespace delimited string from the STF file.
ReadStringBlockRead an string constant from the STF format '( {string_constant} ... )'
ReadUIntRead an unsigned integer {constant_item}
ReadUIntBlockRead an unsigned integer constant from the STF format '( {uint_constant} ... )'
ReadVector2BlockRead a Vector3 object in the STF format '( {X} {Y} ... )'
ReadVector3BlockRead a Vector3 object in the STF format '( {X} {Y} {Z} ... )'
ReadVector4BlockRead a Vector4 object in the STF format '( {X} {Y} {Z} {W} ... )'
SkipBlockRead a block open (, and then consume the rest of the block without processing. If we find an immediate close ), then produce a warning, and return without consuming the parenthesis.
SkipRestOfBlockSkip to the end of this block, ignoring any nested blocks
StepBackOneItemCalling this function causes ReadItem() to repeat the last {item} that was read from the STF file
ToString (inherited from Object)Returns a String that represents the current Object.
VerifyStartOfBlock

Protected Instance Methods

DisposeOverloaded. Releases the resources used by the STFReader.
Finalize
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

See Also

STFReader Class | Orts.Parsers.Msts Namespace