Formatter that exposes a value's bytes as hexadecimal text.
More...
#include <src/utility.h>
|
|
typedef T | elem_type |
| | Integral type used for one formatted hex element.
|
| |
|
| char * | begin () |
| | Return an iterator to the first byte in the buffer view.
|
| |
| const char * | begin () const |
| | Return an iterator to the first byte in the buffer view.
|
| |
| const char * | cbegin () const |
| | Return a const iterator to the first byte in the view.
|
| |
| const char * | cend () const |
| | Return a const iterator one past the last byte in the view.
|
| |
| char * | end () |
| | Return an iterator one past the final byte in the buffer view.
|
| |
| const char * | end () const |
| | Return an iterator one past the final byte in the buffer view.
|
| |
| | Hex (const elem_type &elem, bool rev) |
| | Construct a hexadecimal byte view for the supplied value.
|
| |
| std::string | to_string () const |
| | Convert to string.
|
| |
| std::string_view | to_string_view () const |
| | Convert to string view.
|
| |
template<class T>
class util::Hex< T >
Formatter that exposes a value's bytes as hexadecimal text.
◆ Hex()
Construct a hexadecimal byte view for the supplied value.
- Parameters
-
| elem | Element value being serialized as bytes. |
| rev | Whether bytes should be emitted in reverse order. |
◆ begin() [1/2]
Return an iterator to the first byte in the buffer view.
- Returns
- Iterator to the first element.
◆ begin() [2/2]
Return an iterator to the first byte in the buffer view.
- Returns
- Iterator to the first element.
◆ cbegin()
template<class T >
| const char * util::Hex< T >::cbegin |
( |
| ) |
const |
|
inline |
Return a const iterator to the first byte in the view.
- Returns
- Pointer to the first formatted hexadecimal character.
◆ cend()
Return a const iterator one past the last byte in the view.
- Returns
- Pointer one past the last formatted hexadecimal character.
◆ end() [1/2]
Return an iterator one past the final byte in the buffer view.
- Returns
- Iterator one past the last element.
◆ end() [2/2]
Return an iterator one past the final byte in the buffer view.
- Returns
- Iterator one past the last element.
◆ to_string()
template<class T >
| std::string util::Hex< T >::to_string |
( |
| ) |
const |
|
inline |
Convert to string.
- Returns
- Value converted to string.
◆ to_string_view()
template<class T >
| std::string_view util::Hex< T >::to_string_view |
( |
| ) |
const |
|
inline |
Convert to string view.
- Returns
- Value converted to string view.
The documentation for this class was generated from the following file: