Hexadecimal encoder which satisfy SliceTranscoder concept.
More...
#include <mdbx.h++>
|
MDBX_CXX11_CONSTEXPR | to_hex (const slice &source, bool uppercase=false, unsigned wrap_width=0) noexcept |
|
template<class ALLOCATOR = legacy_allocator> |
string< ALLOCATOR > | as_string (const ALLOCATOR &allocator=ALLOCATOR()) const |
| Returns a string with a hexadecimal dump of a passed slice. More...
|
|
template<class ALLOCATOR = legacy_allocator, typename CAPACITY_POLICY = default_capacity_policy> |
buffer< ALLOCATOR, CAPACITY_POLICY > | as_buffer (const ALLOCATOR &allocator=ALLOCATOR()) const |
| Returns a buffer with a hexadecimal dump of a passed slice. More...
|
|
MDBX_CXX11_CONSTEXPR size_t | envisage_result_length () const noexcept |
| Returns the buffer size in bytes needed for hexadecimal dump of a passed slice. More...
|
|
char * | write_bytes (char *dest, size_t dest_size) const |
| Fills the buffer by hexadecimal dump of a passed slice. More...
|
|
::std::ostream & | output (::std::ostream &out) const |
| Output hexadecimal dump of passed slice to the std::ostream. More...
|
|
bool | is_empty () const noexcept |
| Checks whether a passed slice is empty, and therefore there will be no output bytes. More...
|
|
bool | is_erroneous () const noexcept |
| Checks whether the content of a passed slice is a valid data and could be encoded or unexpectedly not. More...
|
|
Hexadecimal encoder which satisfy SliceTranscoder concept.
◆ to_hex()
◆ as_buffer()
template<class ALLOCATOR = legacy_allocator, typename CAPACITY_POLICY = default_capacity_policy>
buffer<ALLOCATOR, CAPACITY_POLICY> mdbx::to_hex::as_buffer |
( |
const ALLOCATOR & |
allocator = ALLOCATOR() | ) |
const |
|
inline |
Returns a buffer with a hexadecimal dump of a passed slice.
◆ as_string()
template<class ALLOCATOR = legacy_allocator>
string<ALLOCATOR> mdbx::to_hex::as_string |
( |
const ALLOCATOR & |
allocator = ALLOCATOR() | ) |
const |
|
inline |
Returns a string with a hexadecimal dump of a passed slice.
◆ envisage_result_length()
Returns the buffer size in bytes needed for hexadecimal dump of a passed slice.
◆ is_empty()
bool mdbx::to_hex::is_empty |
( |
| ) |
const |
|
inlinenoexcept |
Checks whether a passed slice is empty, and therefore there will be no output bytes.
◆ is_erroneous()
bool mdbx::to_hex::is_erroneous |
( |
| ) |
const |
|
inlinenoexcept |
Checks whether the content of a passed slice is a valid data and could be encoded or unexpectedly not.
◆ output()
::std::ostream& mdbx::to_hex::output |
( |
::std::ostream & |
out | ) |
const |
Output hexadecimal dump of passed slice to the std::ostream.
- Exceptions
-
std::ios_base::failure | corresponding to std::ostream::write() behaviour. |
◆ write_bytes()
char* mdbx::to_hex::write_bytes |
( |
char * |
dest, |
|
|
size_t |
dest_size |
|
) |
| const |
Fills the buffer by hexadecimal dump of a passed slice.
- Exceptions
-
std::length_error | if given buffer is too small. |
◆ source
const slice mdbx::to_hex::source |
◆ uppercase
◆ wrap_width
const unsigned mdbx::to_hex::wrap_width = 0 |
The documentation for this struct was generated from the following file: