MADNESS
0.10.1
|
Wraps an archive around an STL vector
for output.
More...
#include <vector_archive.h>
Public Member Functions | |
VectorOutputArchive (std::vector< unsigned char > &v, std::size_t hint=262144) | |
Create a buffer to wrap the specified vector . More... | |
void | close () |
Close the archive. More... | |
void | flush () |
Flush the archive. More... | |
void | open (std::size_t hint=262144) |
Clear any data in the vector and ensure its capacity is at least hint . More... | |
template<class T > | |
std::enable_if< madness::is_trivially_serializable< T >::value, void >::type | store (const T *t, long n) const |
Appends data to the end of the vector. More... | |
Public Member Functions inherited from madness::archive::BaseArchive | |
BaseArchive () | |
Public Attributes | |
std::vector< unsigned char > * | v |
The STL vector being wrapped. More... | |
Additional Inherited Members | |
Public Types inherited from madness::archive::BaseOutputArchive | |
using | is_saving = std::true_type |
Type used by Boost.Serialization to determine if this object is an output archive. More... | |
Public Types inherited from madness::archive::BaseArchive | |
using | is_loading = std::false_type |
Type used by Boost.Serialization to determine if this object is an input archive. More... | |
using | is_saving = std::false_type |
Type used by Boost.Serialization to determine if this object is an output archive. More... | |
Static Public Attributes inherited from madness::archive::BaseOutputArchive | |
static constexpr bool | is_output_archive = true |
Flag to determine if this object is an output archive. More... | |
Static Public Attributes inherited from madness::archive::BaseArchive | |
static constexpr bool | is_archive = true |
Flag to determine if this object is an archive. More... | |
static constexpr bool | is_input_archive = false |
Flag to determine if this object is an input archive. More... | |
static constexpr bool | is_output_archive = false |
Flag to determine if this object is an output archive. More... | |
static constexpr bool | is_parallel_archive = false |
Flag to determine if this object is a parallel archive. More... | |
Wraps an archive around an STL vector
for output.
|
inline |
Create a buffer to wrap the specified vector
.
[in] | v | The vector . |
[in] | hint | The minimum capacity of the vector. |
References open().
|
inline |
Close the archive.
Referenced by main().
|
inline |
Flush the archive.
|
inline |
Clear any data in the vector and ensure its capacity is at least hint
.
[in] | hint | The minimum capacity for the vector. |
References v.
Referenced by VectorOutputArchive().
|
inline |
Appends data to the end of the vector.
T | The type of data to be appended. |
[in] | t | Pointer to the data to be appended. |
[in] | n | The number of data items to be appended. |
Referenced by madness::archive::MPIOutputArchive::store(), and madness::archive::ContainerRecordOutputArchive::store().
|
mutable |