#include <genesis/utils/io/serializer.hpp>
Definition at line 57 of file utils/io/serializer.hpp.
|
| | Serializer (std::ostream &outstream) |
| |
| | Serializer (std::string const &filename) |
| |
| | ~Serializer () |
| |
| bool | bad () const |
| |
| void | close () |
| |
| bool | eof () const |
| |
| bool | fail () const |
| |
| void | flush () |
| |
| bool | good () const |
| |
| bool | is_open () const |
| |
| | operator bool () const |
| |
| template<typename T > |
| void | put_float (const T v) |
| | Write a floating point number to the stream. More...
|
| |
| template<typename T > |
| void | put_int (const T v) |
| | Write an integer number to the stream. More...
|
| |
| void | put_null (const size_t n) |
| | Write n zero bytes (\0) to the stream. More...
|
| |
| template<typename T > |
| void | put_plain (const T v) |
| | Write plain data to the stream, by casting it to a char array. More...
|
| |
| void | put_raw (char const *data, size_t n) |
| | Write raw data, provided as a char array of length n, to the stream. More...
|
| |
| void | put_raw_string (const std::string &v) |
| | Write raw data, provided as a string, to the stream, without writing its length. More...
|
| |
| void | put_string (const std::string &v) |
| | Write a string, preceded by its length, to the stream. Use get_string() to read it. More...
|
| |
◆ Serializer() [1/2]
◆ Serializer() [2/2]
◆ ~Serializer()
◆ bad()
◆ close()
◆ eof()
◆ fail()
◆ flush()
◆ good()
◆ is_open()
◆ operator bool()
◆ put_float()
| void put_float |
( |
const T |
v | ) |
|
|
inline |
Write a floating point number to the stream.
Currently, this simply uses put_plain(), but future versions might change this behaviour and convert it to some machine-independent format.
Definition at line 197 of file utils/io/serializer.hpp.
◆ put_int()
| void put_int |
( |
const T |
v | ) |
|
|
inline |
Write an integer number to the stream.
Currently, this simply uses put_plain(), but future versions might change this behaviour and use specific conversions (litte/big endianness, signed/unsigned) before writing.
Definition at line 185 of file utils/io/serializer.hpp.
◆ put_null()
| void put_null |
( |
const size_t |
n | ) |
|
|
inline |
◆ put_plain()
| void put_plain |
( |
const T |
v | ) |
|
|
inline |
◆ put_raw()
| void put_raw |
( |
char const * |
data, |
|
|
size_t |
n |
|
) |
| |
|
inline |
◆ put_raw_string()
| void put_raw_string |
( |
const std::string & |
v | ) |
|
|
inline |
Write raw data, provided as a string, to the stream, without writing its length.
Definition at line 154 of file utils/io/serializer.hpp.
◆ put_string()
| void put_string |
( |
const std::string & |
v | ) |
|
|
inline |
Write a string, preceded by its length, to the stream. Use get_string() to read it.
Definition at line 162 of file utils/io/serializer.hpp.
◆ outfile
◆ outstream
The documentation for this class was generated from the following file: