|
MADNESS 0.10.1
|
Wraps an archive around a binary filestream for output. More...
#include <binary_fstream_archive.h>


Public Member Functions | |
| BinaryFstreamOutputArchive (const char *filename=nullptr, std::ios_base::openmode mode=std::ios_base::binary|std::ios_base::out|std::ios_base::trunc) | |
| Default constructor. | |
| BinaryFstreamOutputArchive (const std::string name, std::ios_base::openmode mode=std::ios_base::binary|std::ios_base::out|std::ios_base::trunc) | |
| void | close () |
| Close the filestream. | |
| void | flush () |
| Flush the filestream. | |
| void | open (const char *filename, std::ios_base::openmode mode=std::ios_base::binary|std::ios_base::out|std::ios_base::trunc) |
| Open the filestream. | |
| template<class T > | |
| std::enable_if< is_trivially_serializable< T >::value, void >::type | store (const T *t, long n) const |
| Write to the filestream. | |
Public Member Functions inherited from madness::archive::BaseArchive | |
| BaseArchive () | |
Private Attributes | |
| std::shared_ptr< char > | iobuf |
| Buffer. | |
| std::ofstream | os |
| The filestream. | |
Static Private Attributes | |
| static const std::size_t | IOBUFSIZE = 4*1024*1024 |
| Buffer size. | |
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. | |
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::BaseOutputArchive | |
| static constexpr bool | is_output_archive = true |
| Flag to determine if this object is an output 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 a binary filestream for output.
| madness::archive::BinaryFstreamOutputArchive::BinaryFstreamOutputArchive | ( | const char * | filename = nullptr, |
| std::ios_base::openmode | mode = std::ios_base::binary | std::ios_base::out | std::ios_base::trunc |
||
| ) |
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 write to. |
| [in] | mode | I/O attributes for opening the file. |
References madness::filename, madness::nonlinear_vector_solver(), and open().
|
inline |
| void madness::archive::BinaryFstreamOutputArchive::close | ( | ) |
| void madness::archive::BinaryFstreamOutputArchive::open | ( | const char * | filename, |
| std::ios_base::openmode | mode = std::ios_base::binary | std::ios_base::out | std::ios_base::trunc |
||
| ) |
Open the filestream.
| [in] | filename | The name of the file. |
| [in] | mode | I/O attributes for opening the file. |
References ARCHIVE_COOKIE, madness::filename, iobuf, IOBUFSIZE, madness::nonlinear_vector_solver(), os, and store().
Referenced by BinaryFstreamOutputArchive().
|
private |
|
staticprivate |
Buffer size.
Referenced by open().
|
mutableprivate |