template<typename Type_, class Pointer_ = std::unique_ptr<Reader>>
class byteme::PerByteSerial< Type_, Pointer_ >
Serial byte-by-byte extraction from a Reader
source.
- Template Parameters
-
Type_ | Type of the output bytes, usually char for text or unsigned char for binary. |
Pointer_ | Pointer to a class that serves as a source of input bytes. The pointed-to class should satisfy the Reader interface; it may also be a concrete Reader subclass to enable devirtualization. Either a smart or raw pointer may be supplied depending on how the caller wants to manage the lifetime of the pointed-to object. |
This wraps a Reader
so that developers can avoid the boilerplate of managing blocks of bytes, when all they want is to iterate over the bytes of the input.