[#BloombergLP-bdlde-QuotedPrintableEncoder]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::QuotedPrintableEncoder
:relfileprefix: ../../
:mrdocs:

This class implements a mechanism capable of converting data of arbitrary length to its corresponding Quoted&hyphen;Printable representation&period;

== Synopsis

Declared in `&lt;bdlde&lowbar;quotedprintableencoder&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class QuotedPrintableEncoder;
----

== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/EquivalenceClass.adoc[`EquivalenceClass`] 
| The input equivalence classes used by the encoder&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/LineBreakMode-0d.adoc[`LineBreakMode`] 
| Configuration governing how various forms of line breaks are interpreted while encoding&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/2constructor-01.adoc[`QuotedPrintableEncoder`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/2destructor.adoc[`&#126;QuotedPrintableEncoder`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/convert.adoc[`convert`] 
| Append to the buffer addressed by the specified `out` all pending output (if there is any) up to the optionally specified `maxNumOut` limit (default is negative, meaning no limit) and, when there is no pending output and `maxNumOut` is still not reached, begin to consume and encode a sequence of input characters starting at the specified `begin` position, up to but not including the specified `end` position, writing any resulting output in the specified `out` buffer up to the (cumulative) `maxNumOut` limit&period; If `maxNumOut` limit is reached, no further input will be consumed&period; Load into the specified `numOut` and `numIn` the number of output bytes produced and input bytes consumed, respectively&period; Return a non&hyphen;negative value on success and a negative value otherwise&period; A successful return status indicates the number of characters that would be output if `endConvert` were called subsequently with no output limit&period; These bytes _may_ be available for output if this method is called with a sufficiently large `maxNumOut`&period; Note that calling this method after `endConvert` has been invoked without an intervening `reset` call will place this instance in an error state, and return an error status&period; Note also that it is recommended that after all calls to `convert` are finished, the `endConvert` method be called to complete the encoding of any unprocessed input characters&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/endConvert.adoc[`endConvert`] 
| Terminate encoding for this encoder&semi; write any retained output (e&period;g&period;, from a previous call to `convert` with a non&hyphen;zero `maxNumOut` argument) to the specified `out` buffer&period; Optionally specify the `maxNumOut` limit on the number of bytes to output&semi; if `maxNumOut` is negative, no limit is imposed&period; Load into the specified `numOut` the number of output bytes produced&period; Return a non&hyphen;negative value on success and a negative value otherwise&period; A successful return status indicates the number of characters that would be output if `endConvert` were called subsequently with no output limit&period; Any retained bytes are available on a subsequent call to `endConvert`&period; Once this method is called, no additional input may be supplied without an intervening call to `reset`&semi; once this method returns a zero status, a subsequent call will place this encoder in the error state, and return an error status&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/isAccepting.adoc[`isAccepting`] 
| Return `true` if the input read so far by this encoder is considered syntactically complete, and `false` otherwise&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/isDone.adoc[`isDone`] 
| Return `true` if this encoder is in the done state (i&period;e&period;, `endConvert` has been called and any additional input will result in an error), and if there is no pending output, and `false` otherwise&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/isError.adoc[`isError`] 
| Return `true` if there is no possibility of achieving an &quot;acceptable&quot; result, and `false` otherwise&period; Note that for an encoder, no input can cause an error&semi; the possible errors result either from a call to the `convert` method after the `endConvert` method is called the first time, or from a call to either the `convert` or the `endConvert` methods after the `endConvert` method has returned successfully&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/isInitialState.adoc[`isInitialState`] 
| Return `true` if this encoder is in the initial state (i&period;e&period;, as if no input had been consumed), and `false` otherwise&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/lineBreakMode-09.adoc[`lineBreakMode`] 
| Return the line break mode configured at the construction of this encoder&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/maxLineLength.adoc[`maxLineLength`] 
| Return the value for the maximum line length configured at the construction of this encoder&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/numOutputPending.adoc[`numOutputPending`] 
| Return the number of characters that would be output if `endConvert` were called with no output limit&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/outputLength.adoc[`outputLength`] 
| Return the total length of the output emitted by this encoder (possibly after one or more calls to the `convert` or the `input` methods) since its initial construction or the latest `reset`&period; Note that soft line breaks are included in the counts if added&period;
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/reset.adoc[`reset`] 
| Reset this encoder to its initial state (i&period;e&period;, as if no input had been consumed)&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlde/QuotedPrintableEncoder/lineBreakModeToAscii.adoc[`lineBreakModeToAscii`] 
| Return the string representation exactly matching the enumerator name corresponding to the specified enumerator `mode`&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
