class final
BinaryWriterContents
Binary serializer
Base classes
- class IDataOutputStream
Constructors, destructors, conversion operators
-
BinaryWriter(IOutputStream& stream,
system::
EPlatformEndianess order = system:: PLATFORM_LITTLEENDIAN, bool buffered = true) explicit - ~BinaryWriter() final
Public functions
- void SetStringSerializer(EStringSerializer ser)
- void Flush() final
- auto Write(const void* buf, fsize bufsize) -> fsize final
- 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:: BinaryWriter:: BinaryWriter(IOutputStream& stream,
system:: EPlatformEndianess order = system:: PLATFORM_LITTLEENDIAN,
bool buffered = true) explicit
Parameters | |
---|---|
stream | the stream to write to |
order | what byte order to use when writing data to this stream |
buffered | true to allow buffering, false otherwise |
Creates a BinaryWriter
void bpf:: io:: BinaryWriter:: SetStringSerializer(EStringSerializer ser)
Parameters | |
---|---|
ser | the new string serializing function |
Sets the string serializing function to use for reading strings
void bpf:: io:: BinaryWriter:: Flush() final
Write all the content currently stored in buffer to the underlying stream Only usefull for buffered serializers
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(uint8 u) final
Parameters | |
---|---|
u | uint8 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(uint16 u) final
Parameters | |
---|---|
u | uint16 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(uint32 u) final
Parameters | |
---|---|
u | uint32 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(uint64 u) final
Parameters | |
---|---|
u | uint64 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(int8 i) final
Parameters | |
---|---|
i | int8 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(int16 i) final
Parameters | |
---|---|
i | int16 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(fint i) final
Parameters | |
---|---|
i | int32 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(int64 i) final
Parameters | |
---|---|
i | int64 to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(float f) final
Parameters | |
---|---|
f | float to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(double d) final
Parameters | |
---|---|
d | double to serialize |
Returns | IDataOutputStream& |
Serialize a number
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(bool b) final
Parameters | |
---|---|
b | value to serialize |
Returns | IDataOutputStream& |
Serialize a boolean
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(const bpf:: String& str) final
Parameters | |
---|---|
str | high-level string to serialize |
Returns | IDataOutputStream& |
Serialize a string
IDataOutputStream& bpf:: io:: BinaryWriter:: operator<<(const char* str) final
Parameters | |
---|---|
str | low-level null terminated c-like string to serialize |
Returns | IDataOutputStream& |
Serialize a string