pstore2
Public Types | Public Member Functions | List of all members
pstore::serialize::archive::vector_writer Class Referencefinal

An archive-writer which writes data to a std::vector of std::uint8_t bytes. More...

#include <archive.hpp>

Inheritance diagram for pstore::serialize::archive::vector_writer:
Inheritance graph
[legend]
Collaboration diagram for pstore::serialize::archive::vector_writer:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 vector_writer (std::vector< std::uint8_t > &container)
 
 vector_writer (vector_writer const &)=delete
 
 vector_writer (vector_writer &&)=delete
 
vector_writeroperator= (vector_writer const &)=delete
 
vector_writeroperator= (vector_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::vector_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::vector_writer_policywriter_policy () noexcept
 
details::vector_writer_policy const & writer_policy () const noexcept
 

Additional Inherited Members

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

Detailed Description

An archive-writer which writes data to a std::vector of std::uint8_t bytes.

Owns a vector of bytes to which data is appended when the put<>() method is called.

Member Function Documentation

◆ begin()

const_iterator pstore::serialize::archive::vector_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: