MADNESS 0.10.1
|
Wraps an archive around a binary filestream for input. More...
#include <binary_fstream_archive.h>
Public Member Functions | |
BinaryFstreamInputArchive (const char *filename=nullptr, std::ios_base::openmode mode=std::ios_base::binary|std::ios_base::in) | |
Default constructor. | |
BinaryFstreamInputArchive (const std::string name, std::ios_base::openmode mode=std::ios_base::binary|std::ios_base::in) | |
Default constructor. | |
void | close () |
Close the filestream. | |
template<class T > | |
std::enable_if< is_trivially_serializable< T >::value, void >::type | load (T *t, long n) const |
Load from the filestream. | |
void | open (const char *filename, std::ios_base::openmode mode=std::ios_base::binary|std::ios_base::in) |
Open the filestream. | |
![]() | |
BaseArchive () | |
Private Attributes | |
std::shared_ptr< char > | iobuf |
Buffer. | |
std::ifstream | is |
The filestream. | |
Static Private Attributes | |
static const std::size_t | IOBUFSIZE = 4*1024*1024 |
Buffer size. | |
Additional Inherited Members | |
![]() | |
using | is_loading = std::true_type |
Type used by Boost.Serialization to determine if this object is an input archive. | |
![]() | |
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 constexpr bool | is_input_archive = true |
Flag to determine if this object is an input archive. | |
![]() | |
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 a binary filestream for input.
madness::archive::BinaryFstreamInputArchive::BinaryFstreamInputArchive | ( | const char * | filename = nullptr , |
std::ios_base::openmode | mode = std::ios_base::binary | std::ios_base::in |
||
) |
Default constructor.
The filename and open modes are optional here; they can be specified later by calling open()
.
[in] | filename | Name of the file to read from. |
[in] | mode | I/O attributes for opening the file. |
References madness::filename, madness::nonlinear_vector_solver(), and open().
|
inline |
Default constructor.
The filename and open modes are optional here; they can be specified later by calling open()
.
[in] | filename | Name of the file to read from. |
[in] | mode | I/O attributes for opening the file. |
void madness::archive::BinaryFstreamInputArchive::close | ( | ) |
void madness::archive::BinaryFstreamInputArchive::open | ( | const char * | filename, |
std::ios_base::openmode | mode = std::ios_base::binary | std::ios_base::in |
||
) |
Open the filestream.
[in] | filename | Name of the file to read from. |
[in] | mode | I/O attributes for opening the file. |
References ARCHIVE_COOKIE, madness::filename, iobuf, IOBUFSIZE, is, load(), MADNESS_EXCEPTION, and madness::nonlinear_vector_solver().
Referenced by BinaryFstreamInputArchive().
|
private |
|
staticprivate |
Buffer size.
Referenced by open().
|
mutableprivate |