oestream
class oestream
This class represents oestream.
The oestream class is the base class which sets up the platform independent interface for streaming any type of data.
- The following classes derive from this class:
Constructors
oestream() -> oestream
Creates an instance of an oestream. This class exists solely to provide an interface, therefore, instances of this class have no independently meaningful functionality.
operator bool
IsValid() -> bool
Evaluates the stream to a Boolean value based on whether the end of
the stream has been reached. This is equivalent to !eof().
eof
eof() -> bool
Returns whether the end of the stream has been reached.
length
length() -> oefpos_t
Returns the number of bytes that have been read from or written
to the stream in the last
read or
write call.
rewind
rewind() -> bool
Sets the data pointer position in the stream to the beginning of the stream.
seek
seek(pos: oefpos_t) -> bool
Sets the current position of the data pointer. This is accomplished by specifying the desired position or by specifying an offset distance and a directionality from the current position. Directionality is specified using the following enumeration:
enum seek_dir { beg = 0, cur = 1, end = 2 };
size
size() -> oefpos_t
If possible, returns the size of the stream in bytes. For
oeostreams this is always
zero.
Note
For oeistreams this may not
be possible to calculate without reading, e.g., when the
stream is a socket or pipe. In this case the implementation
may return 0.
tell
tell() -> oefpos_t
Returns the current position of the data pointer in the stream.