oeistdstream

class oeistdstream : public oeistream

This class represents oeistdstream.

Implements a wrapper stream around a standard C++ input stream (std::istream).

The following methods are publicly inherited from oeistream:

operator>>

gettoken

skipbyte

close

open

skipline

get

peekbyte

getbyte

read

getline

skip

The following methods are publicly inherited from oestream:

operator bool

rewind

tell

eof

seek

length

size

Constructors

oeistdstream()
oeistdstream(std::istream *isptr, bool del)

Creates a new oeistdstream. Passing the ‘isptr’ and ‘del’ parameters is equivalent to using the default constructor and then calling set(isptr, del) on the newly created stream.

clear

void clear()

Clears the pointer to the wrapped stream. If the ‘del’ parameter was set to true when the wrapped stream was set (oeistdstream.set), the wrapped stream will be deleted before it is cleared.

set

bool set(std::istream *isptr, bool del)

Sets ‘isptr’ to be the stream wrapped by this class. If ‘del’ is true, the wrapped stream will be deleted when the clear method is called or when this class is deleted. It is important to understand that by setting ‘del’ to true, ownership of the stream’s memory is transferred to this class, and if it is false, you retain the responsibility for managing the stream’s memory.

stream

std::istream *stream()

Returns a pointer to the wrapped stream if present, otherwise 0.