class final
TextReaderContents
Text deserializer
Base classes
- class IDataInputStream
Constructors, destructors, conversion operators
-
TextReader(IInputStream& stream,
const ECharacterEncoding encoder = ECharacterEncoding::
UTF8, bool buffered = true) explicit
Public functions
- void SetTokenSeparators(const char* str)
- auto Read(void* buf, fsize bufsize) -> fsize final
- auto ReadLine(String& out) -> bool
- auto Read(String& out) -> bool
- auto ReadAll() -> String
- auto operator>>(uint8& u) -> IDataInputStream& final
- auto operator>>(uint16& u) -> IDataInputStream& final
- auto operator>>(uint32& u) -> IDataInputStream& final
- auto operator>>(uint64& u) -> IDataInputStream& final
- auto operator>>(int8& i) -> IDataInputStream& final
- auto operator>>(int16& i) -> IDataInputStream& final
- auto operator>>(fint& i) -> IDataInputStream& final
- auto operator>>(int64& i) -> IDataInputStream& final
- auto operator>>(float& f) -> IDataInputStream& final
- auto operator>>(double& d) -> IDataInputStream& final
- auto operator>>(bool& b) -> IDataInputStream& final
-
auto operator>>(bpf::
String& str) -> IDataInputStream& final
Function documentation
bpf:: io:: TextReader:: TextReader(IInputStream& stream,
const ECharacterEncoding encoder = ECharacterEncoding:: UTF8,
bool buffered = true) explicit
Parameters | |
---|---|
stream | the stream to read from |
encoder | the string encoding to use |
buffered | true to allow buffering, false otherwise |
Creates a TextReader
void bpf:: io:: TextReader:: SetTokenSeparators(const char* str)
Parameters | |
---|---|
str | a string where each characters represents a character to seach for the end of a token |
Sets the possible characters to find that marks the end of a token. We assume the separators can only be ASCII characters
IDataInputStream& bpf:: io:: TextReader:: operator>>(uint8& u) final
Parameters | |
---|---|
u | deserialized uint8 |
Returns | IDataInputStream& |
Deserialize a number
IDataInputStream& bpf:: io:: TextReader:: operator>>(uint16& u) final
Parameters | |
---|---|
u | deserialized uint16 |
Returns | IDataInputStream& |
Deserialize a number
IDataInputStream& bpf:: io:: TextReader:: operator>>(uint32& u) final
Parameters | |
---|---|
u | deserialized uint21 |
Returns | IDataInputStream& |
Deserialize a number
IDataInputStream& bpf:: io:: TextReader:: operator>>(uint64& u) final
Parameters | |
---|---|
u | deserialized uint64 |
Returns | IDataInputStream& |
Deserialize a number
IDataInputStream& bpf:: io:: TextReader:: operator>>(int8& i) final
Parameters | |
---|---|
i | deserialized int8 |
Returns | IDataInputStream& |
Deserialize a number
IDataInputStream& bpf:: io:: TextReader:: operator>>(int16& i) final
Parameters | |
---|---|
i | deserialized int16 |
Returns | IDataInputStream& |
Deserialize a number
IDataInputStream& bpf:: io:: TextReader:: operator>>(fint& i) final
Parameters | |
---|---|
i | deserialized int32 |
Returns | IDataInputStream& |
Deserialize a number
IDataInputStream& bpf:: io:: TextReader:: operator>>(int64& i) final
Parameters | |
---|---|
i | deserialized int64 |
Returns | IDataInputStream& |
Deserialize a number
IDataInputStream& bpf:: io:: TextReader:: operator>>(float& f) final
Parameters | |
---|---|
f | deserialized float |
Returns | IDataInputStream& |
Deserialize a number
IDataInputStream& bpf:: io:: TextReader:: operator>>(double& d) final
Parameters | |
---|---|
d | deserialized double |
Returns | IDataInputStream& |
Deserialize a number
IDataInputStream& bpf:: io:: TextReader:: operator>>(bool& b) final
Parameters | |
---|---|
b | deserialized bool |
Returns | IDataInputStream& |
Deserialize a boolean
IDataInputStream& bpf:: io:: TextReader:: operator>>(bpf:: String& str) final
Parameters | |
---|---|
str | deserialized high-level string |
Returns | IDataInputStream& |
Deserialize a string