Wraps an archive around a memory buffer for output.
More...
#include <buffer_archive.h>
|
using | is_saving = std::true_type |
| Type used by Boost.Serialization to determine if this object is an output archive. More...
|
|
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 constexpr bool | is_output_archive = true |
| Flag to determine if this object is an output archive. More...
|
|
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 a memory buffer for output.
- Note
- Type checking is disabled for efficiency.
- Exceptions
-
The default constructor can also be used to count stuff.
◆ BufferOutputArchive() [1/2]
madness::archive::BufferOutputArchive::BufferOutputArchive |
( |
| ) |
|
|
inline |
Default constructor; the buffer will only count data.
◆ BufferOutputArchive() [2/2]
madness::archive::BufferOutputArchive::BufferOutputArchive |
( |
void * |
ptr, |
|
|
std::size_t |
nbyte |
|
) |
| |
|
inline |
Constructor that assigns a buffer.
- Parameters
-
[in] | ptr | Pointer to the buffer. |
[in] | nbyte | Size of the buffer. |
◆ close()
void madness::archive::BufferOutputArchive::close |
( |
| ) |
|
|
inline |
Close the archive.
Referenced by main().
◆ count_only()
bool madness::archive::BufferOutputArchive::count_only |
( |
| ) |
const |
|
inline |
Determine if this buffer is used for counting.
- Returns
- True if this buffer is only used for counting.
References countonly.
◆ flush()
void madness::archive::BufferOutputArchive::flush |
( |
| ) |
|
|
inline |
◆ open()
void madness::archive::BufferOutputArchive::open |
( |
std::size_t |
| ) |
|
|
inline |
Open a buffer with a specific size.
◆ size()
std::size_t madness::archive::BufferOutputArchive::size |
( |
| ) |
const |
|
inline |
◆ store()
◆ countonly
bool madness::archive::BufferOutputArchive::countonly |
|
private |
Current output location.
If true just count, don't copy.
Referenced by count_only(), and store().
std::size_t madness::archive::BufferOutputArchive::i |
|
mutableprivate |
◆ nbyte
const std::size_t madness::archive::BufferOutputArchive::nbyte |
|
private |
Buffer size.
Referenced by store().
◆ ptr
unsigned char* const madness::archive::BufferOutputArchive::ptr |
|
private |
The memory buffer.
Referenced by store().
The documentation for this class was generated from the following file: