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

Synopsis

Declared in <bdlde_quotedprintabledecoder.h>

class QuotedPrintableDecoder;

Enums

Name

Description

EquivalenceClasses

Input character equivalence classes used by the decoder state machine. Underscored enumerators apply in strict mode; others apply in relaxed mode where noted.

LineBreakMode

Configuration governing how hard line breaks ("rn") are decoded.

Member Functions

Name

Description

QuotedPrintableDecoder [constructor]

Create a Quoted‐Printable decoder in the initial state.

~QuotedPrintableDecoder [destructor]

Destroy this object.

convert

Decode Quoted‐Printable characters from [begin, end)] into out.

endConvert

Complete decoding and flush any retained output to out.

isAccepting

Return whether the input so far is syntactically complete.

isDone

Return whether decoding is finished and no further input is allowed.

isError

Return whether this decoder has encountered an irrecoverable error.

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 whether the input to this decoder is maximal.

isUnrecognizedAnError

Return true if this decoder is currently configured to detect an error when an unrecognizable encoding is encountered, and false otherwise.

lineBreakMode

Return the line break mode specified for this decoder.

numOutputPending

Return the number of output bytes retained by this decoder and not emitted because maxNumOut has been reached.

outputLength

Return the total length of the output emitted thus far.

reset

Reset this decoder to its initial state (i.e., as if no input had been consumed).

Static Member Functions

Name

Description

lineBreakModeToAscii

Return the ASCII name of the specified line‐break mode.

Data Members

Name

Description

d_buffer

Pending input characters awaiting further decoding.

d_bufferLength

Number of valid characters currently stored in d_buffer.

d_equivClass_p

Map of unsigned char to input equivalence class; dynamically allocated because there is no default complete configuration.

d_hexBuffer

First hex digit buffered while decoding an =XX escape sequence.

d_lineBreakMode

How hard line breaks are decoded.

d_outputLength

Total number of output characters produced so far.

d_state

Current decoder state‐machine state.

d_unrecognizedIsErrorFlag

If true, unrecognized characters are treated as errors.

Static Data Members

Name

Description

s_componentName

Name of component used when reporting errors.

s_decodingMap_p

Character map used for converting an ASCII character to the hexadecimal value it is representing.

s_defaultEquivClassCRLF_p

Default map of unsigned char to equivalence class for CRLF line break mode

s_defaultEquivClassStrict_p

Default map of unsigned char to equivalence class for strict mode

s_defaultMaxLineLength

Default maximum line length used when configuring the decoder.

s_defaultUnrecognizedIsErrorFlag

Default error reporting mode

s_lineBreakModeName

ASCII names corresponding to LineBreakMode enumerators.

Created with MrDocs