Skip to content

HexStringDecoder

class HexStringDecoder

A helper class to decode hexadecimal strings.

DEFINITION
class HexStringDecoder;

method decode

Decode a single hexadecimal character, ignoring whitespace characters.

DEFINITION
void  decode ( char  character );
PARAMETERDESCRIPTION
character

The character to decode.

THROWSDESCRIPTION
Exception

If the character is not a valid character.

method decode

Decode a partial hexadecimal string, ignoring whitespace characters.

DEFINITION
void  decode ( const std::string & string );
PARAMETERDESCRIPTION
string

The string to decode.

THROWSDESCRIPTION
Exception

If the string contains an invalid character.

method end

Finish decoding and return the resulting string.

DEFINITION
std::string  end ( );
RETURNSDESCRIPTION
std::string

The decoded string.

THROWSDESCRIPTION
Exception

If there is a partial hexadecimal left.