pstore2
Public Types | Public Member Functions | List of all members
pstore::serialize::archive::buffer_writer Class Referencefinal
Inheritance diagram for pstore::serialize::archive::buffer_writer:
Inheritance graph
[legend]
Collaboration diagram for pstore::serialize::archive::buffer_writer:
Collaboration graph
[legend]

Public Types

using const_iterator = policy_type::const_iterator
 
- Public Types inherited from pstore::serialize::archive::writer_base< details::buffer_writer_policy >
using policy_type = details::buffer_writer_policy
 
using result_type = typename policy_type::result_type
 

Public Member Functions

 buffer_writer (void *const first, void *const last)
 Constructs the writer using the range [first, last). More...
 
 buffer_writer (buffer_writer const &)=delete
 
 buffer_writer (buffer_writer &&)=delete
 
 buffer_writer (void *const first, std::size_t const size)
 Constructs the writer starting at the address given by 'first' and with a number of bytes 'size'. More...
 
template<typename T >
 buffer_writer (T *t)
 Constructs a buffer_writer from a pointer to allocated uninitialized storage. More...
 
buffer_writeroperator= (buffer_writer const &)=delete
 
buffer_writeroperator= (buffer_writer &&)=delete
 
const_iterator begin () const
 Returns a const_iterator for the beginning of the byte vector managed by the object. More...
 
const_iterator end () const
 Returns a const_iterator for the end of the byte vector managed by the object.
 
- Public Member Functions inherited from pstore::serialize::archive::writer_base< details::buffer_writer_policy >
 writer_base (writer_base const &)=delete
 
 writer_base (writer_base &&) noexcept=default
 
writer_baseoperator= (writer_base &&) noexcept=default
 
writer_baseoperator= (writer_base const &)=delete
 
void flush ()
 Flushes the stream to the output.
 
std::size_t bytes_consumed () const
 Returns the number of bytes that have been written via this archive.
 
std::size_t bytes_produced () const
 Returns the number of bytes that the policy object wrote to its final destination. More...
 
auto put (Ty const &t) -> result_type
 Writes one or more instances of a standard-layout type Ty to the output. Must not be used once the stream has been flushed. More...
 
auto putn (Span sp) -> result_type
 Writes a span of values to the output. More...
 
details::buffer_writer_policywriter_policy () noexcept
 
details::buffer_writer_policy const & writer_policy () const noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from pstore::serialize::archive::writer_base< details::buffer_writer_policy >
 writer_base (details::buffer_writer_policy policy=details::buffer_writer_policy())
 

Constructor & Destructor Documentation

◆ buffer_writer() [1/3]

pstore::serialize::archive::buffer_writer::buffer_writer ( void *const  first,
void *const  last 
)
inline

Constructs the writer using the range [first, last).

Parameters
firstThe start address of the buffer to which the buffer_writer will write data.
lastThe end of the range of address to which the buffer_writer will write data.

◆ buffer_writer() [2/3]

pstore::serialize::archive::buffer_writer::buffer_writer ( void *const  first,
std::size_t const  size 
)
inline

Constructs the writer starting at the address given by 'first' and with a number of bytes 'size'.

Parameters
firstThe start address of the buffer to which buffer_writer will write data.
sizeThe size, in bytes, of the buffer pointed to by 'first'.

◆ buffer_writer() [3/3]

template<typename T >
pstore::serialize::archive::buffer_writer::buffer_writer ( T *  t)
inlineexplicit

Constructs a buffer_writer from a pointer to allocated uninitialized storage.

Member Function Documentation

◆ begin()

const_iterator pstore::serialize::archive::buffer_writer::begin ( ) const
inline

Returns a const_iterator for the beginning of the byte vector managed by the object.


The documentation for this class was generated from the following files: