Struct mdbx::to_hex
Hexadecimal encoder which satisfy SliceTranscoder concept.
#include <mdbx.h++>
Public Attributes
| Type | Name |
|---|---|
| const slice | source |
| const bool | uppercase = false |
| const unsigned | wrap_width = 0 |
Public Functions
| Type | Name |
|---|---|
| size_t | envisage_result_length () noexcept const Returns the buffer size in bytes needed for hexadecimal dump of a 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 hexadecimal dump of passed slice to the std::ostream. |
| constexpr | to_hex (const slice & source, bool uppercase=false, unsigned wrap_width=0) noexcept |
| char * | write_bytes (char * dest, size_t dest_size) const Fills the buffer by hexadecimal dump of a passed slice. |
Public Attributes Documentation
variable source
const slice mdbx::to_hex::source;
variable uppercase
const bool mdbx::to_hex::uppercase;
variable wrap_width
const unsigned mdbx::to_hex::wrap_width;
Public Functions Documentation
function envisage_result_length
Returns the buffer size in bytes needed for hexadecimal dump of a passed slice.
inline size_t mdbx::to_hex::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_hex::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_hex::is_erroneous () noexcept const
function output
Output hexadecimal dump of passed slice to the std::ostream.
::std::ostream & mdbx::to_hex::output (
::std::ostream & out
) const
Exception:
std::ios_base::failurecorresponding to std::ostream::write() behaviour.
function to_hex
inline constexpr mdbx::to_hex::to_hex (
const slice & source,
bool uppercase=false,
unsigned wrap_width=0
) noexcept
function write_bytes
Fills the buffer by hexadecimal dump of a passed slice.
char * mdbx::to_hex::write_bytes (
char * dest,
size_t dest_size
) const
Exception:
std::length_errorif given buffer is too small.
The documentation for this class was generated from the following file docs/mdbx.h++