3 #ifndef INCLUDE_NN_NLIB_BASE64OUTPUTSTREAM_H_
4 #define INCLUDE_NN_NLIB_BASE64OUTPUTSTREAM_H_
16 enum NewLineMode { NEWLINEMODE_NONE = 0, NEWLINEMODE_CRLF, NEWLINEMODE_LF };
19 virtual
errno_t Transform(OutputStream* os, const
void* p,
size_t nBytes,
21 virtual
void* GetWorkBuffer(
size_t* n)
NLIB_NOEXCEPT NLIB_OVERRIDE;
25 void SetNewLineMode(NewLineMode mode)
NLIB_NOEXCEPT { m_NewLine = mode; }
30 NewLineMode m_NewLine;
32 unsigned char m_Buf[192];
38 typedef OutputConverterStreamTempl<detail::Base64OutputTransform> Base64OutputStream;
44 enum NewLineMode { NEWLINEMODE_NONE = 0, NEWLINEMODE_CRLF, NEWLINEMODE_LF };
49 static_cast<int>(TransformType::NEWLINEMODE_NONE));
51 static_cast<int>(TransformType::NEWLINEMODE_CRLF));
53 static_cast<int>(TransformType::NEWLINEMODE_LF));
54 m_Transform.SetNewLineMode(static_cast<TransformType::NewLineMode>(mode));
61 #endif // INCLUDE_NN_NLIB_BASE64OUTPUTSTREAM_H_
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
#define NLIB_OVERRIDE
Defines override if it is available for use. If not, holds an empty string.
void SetNewLineMode(NewLineMode mode) noexcept
Sets the newline mode.
The class for holding the OutputTransform derived class.
#define NLIB_STATIC_ASSERT(exp)
Defines a static assertion. Uses static_assert if it is available for use.
NewLineMode
The newline options for the output Base64 text. The default is NEWLINEMODE_NONE.
The class for writing data after encoding it in Base64.