|
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. | |
| void | close () |
| Close the archive. | |
| 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. | |
| std::size_t | nbyte_avail () const |
Get the amount of space left to be read from the vector. | |
| void | open () |
| Open the archive. | |
| void | rewind () const |
Reset the read location to the beginning of the vector. | |
Public Member Functions inherited from madness::archive::BaseArchive | |
| BaseArchive () | |
Private Attributes | |
| std::size_t | i |
| Current input location. | |
| std::vector< unsigned char > * | v |
| The STL vector being wrapped. | |
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. | |
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. | |
| using | is_saving = std::false_type |
| Type used by Boost.Serialization to determine if this object is an output archive. | |
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. | |
Static Public Attributes inherited from madness::archive::BaseArchive | |
| static constexpr bool | is_archive = true |
| Flag to determine if this object is an archive. | |
| static constexpr bool | is_input_archive = false |
| Flag to determine if this object is an input archive. | |
| static constexpr bool | is_output_archive = false |
| Flag to determine if this object is an output archive. | |
| static constexpr bool | is_parallel_archive = false |
| Flag to determine if this object is a parallel archive. | |
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().