BloombergLP::bdlde::HexDecoder

This class implements a mechanism capable of converting data of arbitrary length from its corresponding Hex representation.

Synopsis

Declared in <bdlde_hexdecoder.h>

class HexDecoder;

Member Functions

NameDescription
HexDecoder [constructor]Create a Hex decoder in the initial state.
convert convert overloads
endConvert Terminate encoding for this decoder. Return 0 on success, and a negative value otherwise.
isAcceptable Return true if the input read so far by this decoder is considered syntactically complete and all resulting output has been emitted; return false otherwise. Note that there must not be any unprocessed characters accumulated in the input buffer of this decoder.
isDone Return true if this decoder is in the done state (i.e., endConvert has been called and any additional input will result in an error), and if there is no pending output; return false otherwise.
isError Return true if this decoder has encountered an irrecoverable error and false otherwise. An irrecoverable error is one for which there is no subsequent possibility of achieving an "acceptable" result (as defined by the isAcceptable method).
isInitialState Return true if this decoder is in the initial state (i.e., as if no input had been consumed) and false otherwise.
isMaximal Return true if the input to this decoder is maximal (i.e., the input contains an end-of-input sentinel, signaling that no further input should be expected). Always returns false for Hex decoders since the encoding scheme does not specify an end-of-input sentinel.
outputLength Return the total length of the output emitted by this decoder (possibly after several calls to the convert or the input methods) since its initial construction or the latest reset.
reset Reset this decoder to its initial state (i.e., as if no input had been consumed).