16 #ifndef INCLUDE_NN_NLIB_INPUTCONVERTERSTREAM_H_ 17 #define INCLUDE_NN_NLIB_INPUTCONVERTERSTREAM_H_ 26 virtual ~InputTransform() {}
35 virtual errno_t Transform(InputStream* is,
void* p,
size_t size,
size_t* n) = 0;
39 virtual void* GetWorkBuffer(
size_t* n) = 0;
42 virtual errno_t OnSetStream(InputStream* is) = 0;
51 : stream_(
nullptr), cvtr_(
nullptr), ics_bufsize_(0), ics_buf_(
nullptr) {}
71 InputTransform* cvtr_;
73 unsigned char* ics_buf_;
78 template <
class TRANSFORM>
81 typedef TRANSFORM TransformType;
89 errno_t e = InputConverterStream::SetTransform(cvtr);
90 if (e != 0) this->SetError(e);
94 TRANSFORM m_Transform;
102 #endif // INCLUDE_NN_NLIB_INPUTCONVERTERSTREAM_H_ #define NLIB_OVERRIDE
Defines override if it is available for use. If not, holds an empty string.
#define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
#define NLIB_CEXPR
Defines constexpr if it is available for use. If not, holds an empty string.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.