Template Class BaseTextStream

Inheritance Relationships

Derived Types

Class Documentation

template<typename Device>
class BaseTextStream

Parent class for text stream functionality.

This brings the common io functionality together for both input and output text streams, namely the device and its handlers.

Template Parameters:

Device – : the underlying device type.

Subclassed by ecl::interfaces::InputTextStream< Device, true >, ecl::interfaces::OutputTextStream< Device, true >

Public Functions

inline BaseTextStream()
inline virtual ~BaseTextStream()
Device &device()

Provides access to the underlying output device.

Provides access to the underlying output device.

Returns:

Device : reference to the underlying output device.

bool fail() const

Denotes the status of the last device operation.

This returns true if the last (read/write) operation failed. This can be due to the input being incorrect (e.g. letters in a value when reading a digit), or because it tried to read past the end of the stream, or the stream is in a bad state. return bool : true if the last stream operation failed, false otherwise.

const ecl::Error &errorStatus() const

Enumeration indicating the exit status of the last read operation.

This returns an enumeration that indicates the exit status of the last read operation.

Returns:

ErrorFlag : the error status indicator (NoError is a valid state).

Protected Attributes

ecl::Error error
Device io_device