Converts a char string of human readable hexes to a byte array. More...
#include <to_byte_array.hpp>
Public Member Functions | |
std::vector< char > | operator() (const char *input) ecl_debug_throw_decl(StandardException) |
virtual | ~Converter () |
Private Attributes | |
char | byte |
unsigned int | state |
Static Private Attributes | |
static const unsigned int | waiting_first_digit = 2 |
static const unsigned int | waiting_second_digit = 3 |
static const unsigned int | waiting_x = 1 |
static const unsigned int | waiting_zero = 0 |
Converts a char string of human readable hexes to a byte array.
Parses a string of hexes into a character byte array.
Definition at line 263 of file to_byte_array.hpp.
virtual ecl::Converter< std::vector< char >, char * >::~Converter | ( | ) | [inline, virtual] |
Reimplemented in ecl::Converter< std::vector< char >, void >.
Definition at line 391 of file to_byte_array.hpp.
std::vector<char> ecl::Converter< std::vector< char >, char * >::operator() | ( | const char * | input | ) | [inline] |
Converts a string of human readable hexes into a byte array.
The string should contain bytes written as a '0x' followed by two hex digits. e.g.
0x32 0x64 0x64 0x54
This throws an exception and/or configures the error() function if an unexpected char is discovered.
input | : the character string to be converted. |
StandardException | : throws if unexpected char is discovered (debug mode only). |
Definition at line 283 of file to_byte_array.hpp.
char ecl::Converter< std::vector< char >, char * >::byte [private] |
Definition at line 397 of file to_byte_array.hpp.
unsigned int ecl::Converter< std::vector< char >, char * >::state [private] |
Definition at line 396 of file to_byte_array.hpp.
const unsigned int ecl::Converter< std::vector< char >, char * >::waiting_first_digit = 2 [static, private] |
Definition at line 400 of file to_byte_array.hpp.
const unsigned int ecl::Converter< std::vector< char >, char * >::waiting_second_digit = 3 [static, private] |
Definition at line 401 of file to_byte_array.hpp.
const unsigned int ecl::Converter< std::vector< char >, char * >::waiting_x = 1 [static, private] |
Definition at line 399 of file to_byte_array.hpp.
const unsigned int ecl::Converter< std::vector< char >, char * >::waiting_zero = 0 [static, private] |
Definition at line 398 of file to_byte_array.hpp.