Text reader. More...
Text reader.
Public Member Methods | |
TextReader (Stream &stream) | |
Constructor. More... | |
bool | Peek (Char8 &value, Int32 offset=0) |
Peek the current character without removing it. More... | |
bool | Peek (BaseStaticString &value, Char8 separator= '\0') |
Peek the current character without removing it. More... | |
bool | PeekToken (BaseStaticString &value) |
Peek token. More... | |
bool | SkipChar () |
Skip character. More... | |
bool | SkipLine () |
Skip line. More... | |
bool | SkipWhiteSpace () |
Skip white space. More... | |
bool | Read (Char8 &value) |
Reads. More... | |
bool | Read (BaseStaticString &value, Char8 separator= '\0', bool skipSeparator=false) |
Reads. More... | |
bool | Read (BaseStaticString &value, bool &allDataRead, Char8 separator= '\0', bool skipSeparator=false) |
Reads. More... | |
bool | Read (Stream &stream, Char8 separator= '\0', bool skipSeparator=false) |
Reads. More... | |
bool | ReadToken (BaseStaticString &value) |
Reads a token. More... | |
bool | ReadToken (BaseStaticString &value, bool &tokenCompleted) |
Reads a token. More... | |
Int32 | ReadFixedLength (BaseStaticString &value, Int32 length) |
Reads a fixed length. More... | |
bool | Read (bool &value) |
Reads. More... | |
bool | Read (Int16 &value) |
Reads. More... | |
bool | Read (Int32 &value) |
Reads. More... | |
bool | Read (Float32 &value) |
Reads. More... | |
bool | Read (Float64 &value) |
Reads. More... | |
bool | EndOfStream () const |
Query if end of stream reached. More... | |
Int32 | GetPosition () const |
Gets the position. More... | |
Int32 | GetLineIndex () const |
Gets the line index. More... | |
Int32 | GetLineCharacterIndex () const |
Gets the line character index. More... | |
TextReader | ( | Stream & | stream | ) |
Constructor.
stream | [in,out] The stream. |
bool EndOfStream | ( | ) | const |
Query if end of stream reached.
Int32 GetLineCharacterIndex | ( | ) | const |
Gets the line character index.
Int32 GetLineIndex | ( | ) | const |
Gets the line index.
Int32 GetPosition | ( | ) | const |
Gets the position.
Peek the current character without removing it.
value | [in,out] The returned character. |
offset | (optional) the offset. |
bool Peek | ( | BaseStaticString & | value, |
Char8 | separator = '\0' |
||
) |
Peek the current character without removing it.
value | [in,out] The returned character. |
separator | (optional) the separator. |
bool PeekToken | ( | BaseStaticString & | value | ) |
Peek token.
value | [in,out] The returned token. |
bool Read | ( | Char8 & | value | ) |
Reads.
value | [in,out] The returned character. |
bool Read | ( | BaseStaticString & | value, |
Char8 | separator = '\0' , |
||
bool | skipSeparator = false |
||
) |
Reads.
value | [in,out] The returned character. |
separator | (optional) the separator. Default is '\0'. |
skipSeparator | (optional) skip separator after reading. Default is false. |
bool Read | ( | BaseStaticString & | value, |
bool & | allDataRead, | ||
Char8 | separator = '\0' , |
||
bool | skipSeparator = false |
||
) |
Reads.
value | [in,out] The returned character. |
allDataRead | return true if all data has been read (the separator has been found or end of stream reached). |
separator | (optional) the separator. Default is '\0'. |
skipSeparator | (optional) skip separator after reading. Default is false. |
Reads.
stream | [in,out] the destination stream. |
separator | (optional) the separator. Default is '\0'. |
skipSeparator | (optional) skip separator after reading. Default is false. |
bool Read | ( | bool & | value | ) |
Reads.
value | [in,out] The returned value. |
bool Read | ( | Int16 & | value | ) |
Reads.
value | [in,out] The returned value. |
bool Read | ( | Int32 & | value | ) |
Reads.
value | [in,out] The returned value. |
bool Read | ( | Float32 & | value | ) |
Reads.
value | [in,out] The returned value. |
bool Read | ( | Float64 & | value | ) |
Reads.
value | [in,out] The returned value. |
Int32 ReadFixedLength | ( | BaseStaticString & | value, |
Int32 | length | ||
) |
Reads a fixed length.
value | [in,out] The returned string. |
length | The length. |
bool ReadToken | ( | BaseStaticString & | value | ) |
Reads a token.
value | [in,out] The return character. |
bool ReadToken | ( | BaseStaticString & | value, |
bool & | tokenCompleted | ||
) |
Reads a token.
value | [in,out] The return character. |
tokenCompleted | (optional) return true if the token is entirely read. |
bool SkipChar | ( | ) |
Skip character.
bool SkipLine | ( | ) |
Skip line.
bool SkipWhiteSpace | ( | ) |
Skip white space.