Skip to content

Struct mdbx::to_base64

ClassList > mdbx > to_base64

Base64 encoder which satisfySliceTranscoder concept.

  • #include <mdbx.h++>

Public Attributes

Type Name
const slice source
const unsigned wrap_width = 0

Public Functions

Type Name
size_t envisage_result_length () noexcept const
Returns the buffer size in bytes needed for Base64 dump of passed slice.
bool is_empty () noexcept const
Checks whether a passed slice is empty, and therefore there will be no output bytes.
bool is_erroneous () noexcept const
Checks whether the content of the passed slice could be encoded; this encoder always returns false .
::std::ostream & output (::std::ostream & out) const
Output Base64 dump of passed slice to the std::ostream.
constexpr to_base64 (const slice & source, unsigned wrap_width=0) noexcept
char * write_bytes (char * dest, size_t dest_size) const
Fills the buffer by Base64 dump of passed slice.

Public Attributes Documentation

variable source

const slice mdbx::to_base64::source;

variable wrap_width

const unsigned mdbx::to_base64::wrap_width;

Public Functions Documentation

function envisage_result_length

Returns the buffer size in bytes needed for Base64 dump of passed slice.

inline size_t mdbx::to_base64::envisage_result_length () noexcept const

function is_empty

Checks whether a passed slice is empty, and therefore there will be no output bytes.

inline bool mdbx::to_base64::is_empty () noexcept const

function is_erroneous

Checks whether the content of the passed slice could be encoded; this encoder always returns false .

inline bool mdbx::to_base64::is_erroneous () noexcept const

function output

Output Base64 dump of passed slice to the std::ostream.

::std::ostream & mdbx::to_base64::output (
    ::std::ostream & out
) const

Exception:

  • std::ios_base::failure corresponding to std::ostream::write() behaviour.

function to_base64

inline constexpr mdbx::to_base64::to_base64 (
    const slice & source,
    unsigned wrap_width=0
) noexcept

function write_bytes

Fills the buffer by Base64 dump of passed slice.

char * mdbx::to_base64::write_bytes (
    char * dest,
    size_t dest_size
) const

Exception:

  • std::length_error if given buffer is too small.


The documentation for this class was generated from the following file docs/mdbx.h++