Public Member Functions | |
| constexpr | IntervalReader (Status status) |
| constexpr | IntervalReader (SeekableReader &source_reader, size_t start, size_t end) |
| IntervalReader & | Reset () |
| IntervalReader & | Exhaust () |
| SeekableReader & | source_reader () |
| size_t | start () const |
| size_t | end () const |
| size_t | current () const |
| size_t | interval_size () const |
| bool | ok () const |
| Status | status () const |
| bool | operator== (const IntervalReader &other) const |
Public Member Functions inherited from pw::stream::Stream | |
| constexpr bool | readable () const |
| constexpr bool | writable () const |
| constexpr bool | seekable () const |
| constexpr bool | seekable (Whence origin) const |
| True if the stream supports seeking from the specified origin. | |
| Result< ByteSpan > | Read (ByteSpan dest) |
| Result< ByteSpan > | Read (void *dest, size_t size_bytes) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Result< ByteSpan > | ReadExact (ByteSpan const buffer) |
| Status | Write (ConstByteSpan data) |
| Status | Write (const void *data, size_t size_bytes) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Status | Write (const std::byte b) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Status | Seek (ptrdiff_t offset, Whence origin=kBeginning) |
| size_t | Tell () |
| size_t | ConservativeReadLimit () const |
| size_t | ConservativeWriteLimit () const |
Private Member Functions | |
| StatusWithSize | DoRead (ByteSpan destination) final |
| Virtual Read() function implemented by derived classes. | |
| Status | DoSeek (ptrdiff_t offset, Whence origin) final |
| Virtual Seek() function implemented by derived classes. | |
| size_t | DoTell () final |
| size_t | ConservativeLimit (LimitType limit) const override |
Additional Inherited Members | |
Public Types inherited from pw::stream::Stream | |
| enum | Whence : uint8_t { kBeginning = 0b001 , kCurrent = 0b010 , kEnd = 0b100 } |
| Positions from which to seek. More... | |
Static Public Attributes inherited from pw::stream::Stream | |
| static constexpr size_t | kUnlimited = std::numeric_limits<size_t>::max() |
| Value returned from read/write limit if unlimited. | |
| static constexpr size_t | kUnknownPosition = std::numeric_limits<size_t>::max() |
| Returned by Tell() if getting the position is not supported. | |
Protected Types inherited from pw::stream::Stream | |
| enum class | LimitType : bool { kRead , kWrite } |
|
inlineoverrideprivatevirtual |
Virtual function optionally implemented by derived classes that is used for ConservativeReadLimit() and ConservativeWriteLimit().
The default implementation returns kUnlimited or 0 depending on whether the stream is readable/writable.
Reimplemented from pw::stream::Stream.
|
finalprivatevirtual |
Virtual Read() function implemented by derived classes.
Implements pw::stream::Stream.
Virtual Seek() function implemented by derived classes.
Implements pw::stream::Stream.
|
inlinefinalprivatevirtual |
Virtual Tell() function optionally implemented by derived classes. The default implementation always returns kUnknownPosition.
Reimplemented from pw::stream::Stream.