Struct handling packing of serialization to a memory buffer.
More...
#include <MemPacker.hpp>
|
| template<class T> |
| std::size_t | packSize (const T &data) const |
| | Calculates the pack size for a variable.
|
| template<class T> |
| std::size_t | packSize (const T *data, std::size_t n) const |
| | Calculates the pack size for an array.
|
| template<class T> |
| void | pack (const T &data, std::vector< char > &buffer, std::size_t &position) const |
| | Pack a variable.
|
| template<class T> |
| void | pack (const T *data, std::size_t n, std::vector< char > &buffer, std::size_t &position) const |
| | Pack an array.
|
| template<class T> |
| void | unpack (T &data, const std::vector< char > &buffer, std::size_t &position) const |
| | Unpack a variable.
|
| template<class T> |
| void | unpack (T *data, std::size_t n, const std::vector< char > &buffer, std::size_t &position) const |
| | Unpack an array.
|
Struct handling packing of serialization to a memory buffer.
◆ pack() [1/2]
template<class T>
| void Opm::Serialization::MemPacker::pack |
( |
const T & | data, |
|
|
std::vector< char > & | buffer, |
|
|
std::size_t & | position ) const |
|
inline |
Pack a variable.
- Template Parameters
-
| T | The type of the data to be packed |
- Parameters
-
| data | The variable to pack |
| buffer | Buffer to pack into |
| position | Position in buffer to use |
◆ pack() [2/2]
template<class T>
| void Opm::Serialization::MemPacker::pack |
( |
const T * | data, |
|
|
std::size_t | n, |
|
|
std::vector< char > & | buffer, |
|
|
std::size_t & | position ) const |
|
inline |
Pack an array.
- Template Parameters
-
| T | The type of the data to be packed |
- Parameters
-
| data | The array to pack |
| n | Length of array |
| buffer | Buffer to pack into |
| position | Position in buffer to use |
◆ packSize() [1/2]
template<class T>
| std::size_t Opm::Serialization::MemPacker::packSize |
( |
const T & | data | ) |
const |
|
inline |
Calculates the pack size for a variable.
- Template Parameters
-
| T | The type of the data to be packed |
- Parameters
-
◆ packSize() [2/2]
template<class T>
| std::size_t Opm::Serialization::MemPacker::packSize |
( |
const T * | data, |
|
|
std::size_t | n ) const |
|
inline |
Calculates the pack size for an array.
- Template Parameters
-
| T | The type of the data to be packed |
- Parameters
-
| data | The array to pack |
| n | Length of array |
◆ unpack() [1/2]
template<class T>
| void Opm::Serialization::MemPacker::unpack |
( |
T & | data, |
|
|
const std::vector< char > & | buffer, |
|
|
std::size_t & | position ) const |
|
inline |
Unpack a variable.
- Template Parameters
-
| T | The type of the data to be unpacked |
- Parameters
-
| data | The variable to unpack |
| buffer | Buffer to unpack from |
| position | Position in buffer to use |
◆ unpack() [2/2]
template<class T>
| void Opm::Serialization::MemPacker::unpack |
( |
T * | data, |
|
|
std::size_t | n, |
|
|
const std::vector< char > & | buffer, |
|
|
std::size_t & | position ) const |
|
inline |
Unpack an array.
- Template Parameters
-
| T | The type of the data to be unpacked |
- Parameters
-
| data | The array to unpack |
| n | Length of array |
| buffer | Buffer to unpack from |
| position | Position in buffer to use |
The documentation for this struct was generated from the following file: