class final
TextWriterContents
Text serializer
Base classes
- class IDataOutputStream
Constructors, destructors, conversion operators
-
TextWriter(IOutputStream& stream,
const ECharacterEncoding encoder = ECharacterEncoding::
UTF8, bool buffered = true) explicit - ~TextWriter() final
Public functions
- void Flush() final
- auto Write(const void* buf, fsize bufsize) -> fsize final
- void WriteLine(const String& str)
- void Write(const String& str)
- void NewLine()
- auto operator<<(uint8 u) -> IDataOutputStream& final
- auto operator<<(uint16 u) -> IDataOutputStream& final
- auto operator<<(uint32 u) -> IDataOutputStream& final
- auto operator<<(uint64 u) -> IDataOutputStream& final
- auto operator<<(int8 i) -> IDataOutputStream& final
- auto operator<<(int16 i) -> IDataOutputStream& final
- auto operator<<(fint i) -> IDataOutputStream& final
- auto operator<<(int64 i) -> IDataOutputStream& final
- auto operator<<(float f) -> IDataOutputStream& final
- auto operator<<(double d) -> IDataOutputStream& final
- auto operator<<(bool b) -> IDataOutputStream& final
-
auto operator<<(const bpf::
String& str) -> IDataOutputStream& final - auto operator<<(const char* str) -> IDataOutputStream& final
Function documentation
bpf:: io:: TextWriter:: TextWriter(IOutputStream& stream,
const ECharacterEncoding encoder = ECharacterEncoding:: UTF8,
bool buffered = true) explicit
Parameters | |
---|---|
stream | the stream to write to |
encoder | the string encoding to use |
buffered | true to allow buffering, false otherwise |
Creates a TextWriter
void bpf:: io:: TextWriter:: Flush() final
Write all the content currently stored in buffer to the underlying stream Only usefull for buffered serializers
void bpf:: io:: TextWriter:: NewLine()
Writes a platform dependent newline character
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(uint8 u) final
Parameters | |
---|---|
u | uint8 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(uint16 u) final
Parameters | |
---|---|
u | uint16 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(uint32 u) final
Parameters | |
---|---|
u | uint32 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(uint64 u) final
Parameters | |
---|---|
u | uint64 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(int8 i) final
Parameters | |
---|---|
i | int8 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(int16 i) final
Parameters | |
---|---|
i | int16 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(fint i) final
Parameters | |
---|---|
i | int32 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(int64 i) final
Parameters | |
---|---|
i | int64 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(float f) final
Parameters | |
---|---|
f | float to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(double d) final
Parameters | |
---|---|
d | double to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(bool b) final
Parameters | |
---|---|
b | value to serialize |
Returns | IDataOutputStream& |
Serialize a boolean
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(const bpf:: String& str) final
Parameters | |
---|---|
str | high-level string to serialize |
Returns | IDataOutputStream& |
Serialize a string
IDataOutputStream& bpf:: io:: TextWriter:: operator<<(const char* str) final
Parameters | |
---|---|
str | low-level null terminated c-like string to serialize |
Returns | IDataOutputStream& |
Serialize a string