MADNESS
0.10.1
|
Wraps an archive around an STL vector
for input.
More...
#include <vector_archive.h>
Public Member Functions | |
VectorInputArchive (std::vector< unsigned char > &v) | |
Create a buffer to wrap the specified vector . More... | |
void | close () |
Close the archive. More... | |
template<class T > | |
std::enable_if< madness::is_trivially_serializable< T >::value, void >::type | load (T *t, long n) const |
Load data from the vector. More... | |
std::size_t | nbyte_avail () const |
Get the amount of space left to be read from the vector . More... | |
void | open () |
Open the archive. More... | |
void | rewind () const |
Reset the read location to the beginning of the vector . More... | |
Public Member Functions inherited from madness::archive::BaseArchive | |
BaseArchive () | |
Private Attributes | |
std::size_t | i |
Current input location. More... | |
std::vector< unsigned char > * | v |
The STL vector being wrapped. More... | |
Additional Inherited Members | |
Public Types inherited from madness::archive::BaseInputArchive | |
using | is_loading = std::true_type |
Type used by Boost.Serialization to determine if this object is an input 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::BaseInputArchive | |
static constexpr bool | is_input_archive = true |
Flag to determine if this object is an input 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 input.
|
inline |
Create a buffer to wrap the specified vector
.
[in] | v | The vector . |
|
inline |
Close the archive.
Referenced by main().
|
inline |
Load data from the vector.
The function only appears (due to enable_if
) if T
is serializable.
T | The type of data to be loaded. |
[out] | t | Where to store the loaded data. |
[in] | n | The number of data items to be loaded. |
References i, m, MADNESS_EXCEPTION, T(), and v.
Referenced by madness::archive::MPIInputArchive::load(), and madness::archive::ContainerRecordInputArchive::load().
|
inline |
Get the amount of space left to be read from the vector
.
vector
. Referenced by madness::archive::MPIInputArchive::load().
|
inline |
Open the archive.
|
inline |
Reset the read location to the beginning of the vector
.
References i.
Referenced by madness::archive::MPIInputArchive::load().
|
mutableprivate |
Current input location.
Referenced by load(), nbyte_avail(), and rewind().
|
mutableprivate |
The STL vector being wrapped.
Referenced by load(), and nbyte_avail().