18 ISubStream() : std::istream(&_buf) {
25 ISubStream(
IStreamWrapper *source, std::streampos start, std::streampos end) : std::istream(&_buf) {
26 open(source, start, end);
40 clear((ios_iostate)0);
41 _buf.open(source,
nullptr, start, end,
false);
59 OSubStream() : std::ostream(&_buf) {
66 OSubStream(
OStreamWrapper *dest, std::streampos start, std::streampos end,
bool append) : std::ostream(&_buf) {
67 open(dest, start, end, append);
81 clear((ios_iostate)0);
82 _buf.open(
nullptr, dest, start, end, append);
100 SubStream() : std::iostream(&_buf) {
107 SubStream(
StreamWrapper *nested, std::streampos start, std::streampos end,
bool append) : std::iostream(&_buf) {
108 open(nested, start, end, append);
121 clear((ios_iostate)0);
122 _buf.open(nested, nested, start, end, append);
This class provides a locking wrapper around a combination ostream/istream pointer.
OSubStream & close()
Resets the SubStream to empty, but does not actually close the dest ostream.
An istream object that presents a subwindow into another istream.
This class provides a locking wrapper around an arbitrary istream pointer.
ISubStream & close()
Resets the SubStream to empty, but does not actually close the source istream.
ISubStream & open(IStreamWrapper *source, std::streampos start, std::streampos end)
Starts the SubStream reading from the indicated source, with the first character being the character ...
SubStream & close()
Resets the SubStream to empty, but does not actually close the nested ostream.
SubStream & open(StreamWrapper *nested, std::streampos start, std::streampos end, bool append=false)
Starts the SubStream reading and writing from the indicated nested stream, within the indicated range...
An ostream object that presents a subwindow into another ostream.
This class provides a locking wrapper around an arbitrary ostream pointer.
OSubStream & open(OStreamWrapper *dest, std::streampos start, std::streampos end, bool append=false)
Starts the SubStream reading from the indicated dest, with the first character being the character at...
Combined ISubStream and OSubStream for bidirectional I/O.