Interface for serializing and deserializing items.
More...
#include <serde.hpp>
|
| void | serialize (std::ostream &os, const T *items, unsigned num) const |
| | Stream serialization.
|
| |
| void | deserialize (std::istream &is, T *items, unsigned num) const |
| | Stream deserialization.
|
| |
| size_t | serialize (void *ptr, size_t capacity, const T *items, unsigned num) const |
| | Raw bytes serialization.
|
| |
| size_t | deserialize (const void *ptr, size_t capacity, T *items, unsigned num) const |
| | Raw bytes deserialization.
|
| |
| size_t | size_of_item (const T &item) const |
| | Size of the given item.
|
| |
template<typename T, typename Enable = void>
struct datasketches::serde< T, Enable >
Interface for serializing and deserializing items.
◆ serialize() [1/2]
template<typename T , typename Enable = void>
| void serialize |
( |
std::ostream & |
os, |
|
|
const T * |
items, |
|
|
unsigned |
num |
|
) |
| const |
Stream serialization.
- Parameters
-
| os | output stream |
| items | pointer to array of items |
| num | number of items |
◆ deserialize() [1/2]
template<typename T , typename Enable = void>
| void deserialize |
( |
std::istream & |
is, |
|
|
T * |
items, |
|
|
unsigned |
num |
|
) |
| const |
Stream deserialization.
- Parameters
-
| is | input stream |
| items | pointer to array of items (items in the array are allocated but not initialized) |
| num | number of items |
◆ serialize() [2/2]
template<typename T , typename Enable = void>
| size_t serialize |
( |
void * |
ptr, |
|
|
size_t |
capacity, |
|
|
const T * |
items, |
|
|
unsigned |
num |
|
) |
| const |
Raw bytes serialization.
- Parameters
-
| ptr | pointer to output buffer |
| capacity | size of the buffer in bytes |
| items | pointer to array of items |
| num | number of items |
◆ deserialize() [2/2]
template<typename T , typename Enable = void>
| size_t deserialize |
( |
const void * |
ptr, |
|
|
size_t |
capacity, |
|
|
T * |
items, |
|
|
unsigned |
num |
|
) |
| const |
Raw bytes deserialization.
- Parameters
-
| ptr | pointer to input buffer |
| capacity | size of the buffer in bytes |
| items | pointer to array of items (items in the array are allocated but not initialized) |
| num | number of items |
◆ size_of_item()
template<typename T , typename Enable = void>
| size_t size_of_item |
( |
const T & |
item | ) |
const |
Size of the given item.
- Parameters
-
- Returns
- size of the given item in bytes
The documentation for this struct was generated from the following file: