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:



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

operator bool() const

Evaluates the stream to a Boolean value based on whether the end of the stream has been reached. This is equivalent to !eof().


bool eof() const

Returns whether the end of the stream has been reached.


oefpos_t length()

Returns the number of bytes that have been read from or written to the stream in the last read or write call.


bool rewind()

Sets the data pointer position in the stream to the beginning of the stream.


bool seek(oefpos_t pos)
bool seek(oefpos_t offset, seek_dir dir)

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 };


oefpos_t size()

If possible, returns the size of the stream in bytes. For oeostreams this is always zero.


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.


oefpos_t tell() const

Returns the current position of the data pointer in the stream.