Public Member Functions | Protected Attributes | List of all members
ecl::interfaces::BaseTextStream< Device > Class Template Reference

Parent class for text stream functionality. More...

#include <base_text_stream.hpp>

Inheritance diagram for ecl::interfaces::BaseTextStream< Device >:
Inheritance graph
[legend]

Public Member Functions

 BaseTextStream ()
 
Device & device ()
 Provides access to the underlying output device. More...
 
const ecl::ErrorerrorStatus () const
 Enumeration indicating the exit status of the last read operation. More...
 
bool fail () const
 Denotes the status of the last device operation. More...
 
virtual ~BaseTextStream ()
 

Protected Attributes

ecl::Error error
 
Device io_device
 

Detailed Description

template<typename Device>
class ecl::interfaces::BaseTextStream< Device >

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.

Definition at line 55 of file base_text_stream.hpp.

Constructor & Destructor Documentation

◆ BaseTextStream()

template<typename Device >
ecl::interfaces::BaseTextStream< Device >::BaseTextStream ( )
inline

Definition at line 65 of file base_text_stream.hpp.

◆ ~BaseTextStream()

template<typename Device >
virtual ecl::interfaces::BaseTextStream< Device >::~BaseTextStream ( )
inlinevirtual

Definition at line 66 of file base_text_stream.hpp.

Member Function Documentation

◆ device()

template<typename Device >
Device & ecl::interfaces::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.

Definition at line 78 of file base_text_stream.hpp.

◆ errorStatus()

template<typename Device >
const ecl::Error & ecl::interfaces::BaseTextStream< Device >::errorStatus

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).

Definition at line 106 of file base_text_stream.hpp.

◆ fail()

template<typename Device >
bool ecl::interfaces::BaseTextStream< Device >::fail

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.

Definition at line 90 of file base_text_stream.hpp.

Member Data Documentation

◆ error

template<typename Device >
ecl::Error ecl::interfaces::BaseTextStream< Device >::error
protected

Definition at line 72 of file base_text_stream.hpp.

◆ io_device

template<typename Device >
Device ecl::interfaces::BaseTextStream< Device >::io_device
protected

Definition at line 73 of file base_text_stream.hpp.


The documentation for this class was generated from the following file:


ecl_streams
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:48