Public Member Functions | Private Attributes | List of all members
ecl::interfaces::OutputTextStream< Device, true > Class Template Reference

Output text stream interface. More...

#include <output_text_stream.hpp>

Inheritance diagram for ecl::interfaces::OutputTextStream< Device, true >:
Inheritance graph
[legend]

Public Member Functions

void flush ()
 Flushes the underlying device's buffer. More...
 
OutputTextStream< Device > & operator<< (const bool b)
 Sends a boolean to the stream. Sends a boolean to the stream. More...
 
OutputTextStream< Device > & operator<< (const char &c)
 Sends an unformatted char to the stream. Sends an unformatted char to the stream. More...
 
OutputTextStream< Device > & operator<< (const char *s)
 Sends an unformatted char string to the stream. Sends an unformatted char string to the stream. More...
 
OutputTextStream< Device > & operator<< (const double &d)
 
OutputTextStream< Device > & operator<< (const float &f)
 
OutputTextStream< Device > & operator<< (const int &i)
 Sends an unformatted int to the stream. Sends an unformatted int to the stream. More...
 
OutputTextStream< Device > & operator<< (const long &i)
 Sends an unformatted long to the stream. Sends an unformatted long to the stream. More...
 
OutputTextStream< Device > & operator<< (const long long &i)
 Sends an unformatted long long to the stream. Sends an unformatted long long to the stream. More...
 
OutputTextStream< Device > & operator<< (const short &i)
 Sends an unformatted short to the stream. Sends an unformatted short to the stream. More...
 
OutputTextStream< Device > & operator<< (const std::string &s)
 Sends an unformatted string to the stream. Sends an unformatted string to the stream. More...
 
OutputTextStream< Device > & operator<< (const unsigned int &i)
 Sends an unformatted unsigned int to the stream. Sends an unformatted unsigned int to the stream. More...
 
OutputTextStream< Device > & operator<< (const unsigned long &i)
 Sends an unformatted unsigned long to the stream. Sends an unformatted unsigned long to the stream. More...
 
OutputTextStream< Device > & operator<< (const unsigned long long &i)
 Sends an unformatted unsigned long long to the stream. Sends an unformatted unsigned long long to the stream. More...
 
OutputTextStream< Device > & operator<< (const unsigned short &i)
 Sends an unformatted unsigned short to the stream. Sends an unformatted unsigned short to the stream. More...
 
template<typename Action >
OutputTextStream< Device > & operator<< (ecl::Manipulator< Action > &manipulator)
 
 OutputTextStream ()
 Connects the stream to an output device. More...
 
virtual ~OutputTextStream ()
 
- Public Member Functions inherited from ecl::interfaces::BaseTextStream< Device >
 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 ()
 

Private Attributes

ecl::Converter< char * > toCharString
 

Additional Inherited Members

- Protected Attributes inherited from ecl::interfaces::BaseTextStream< Device >
ecl::Error error
 
Device io_device
 

Detailed Description

template<typename Device>
class ecl::interfaces::OutputTextStream< Device, true >

Output text stream interface.

Defines the appropriate functionality required for output text streams.

Template Parameters
Device: this must be a class that satisfies the output device concept (refer to the documentation in ecl_concepts for details).

Usage:

TextStream<OFile> ofstream;
ofstream.device().open("dudes.txt",New);
ofstream << "dudes " << 32.36;
ofstream.flush();

Definition at line 92 of file output_text_stream.hpp.

Constructor & Destructor Documentation

◆ OutputTextStream()

template<typename Device >
ecl::interfaces::OutputTextStream< Device, true >::OutputTextStream ( )
inline

Connects the stream to an output device.

Connects the text stream to the associated output device. Use the device() handle to properly open the device, e.g.

OutputTextStream<OFile> ofstream;
ofstream.device().open("dudes.txt",New);

Definition at line 105 of file output_text_stream.hpp.

◆ ~OutputTextStream()

template<typename Device >
virtual ecl::interfaces::OutputTextStream< Device, true >::~OutputTextStream ( )
inlinevirtual

Definition at line 111 of file output_text_stream.hpp.

Member Function Documentation

◆ flush()

template<typename Device >
void ecl::interfaces::OutputTextStream< Device, true >::flush

Flushes the underlying device's buffer.

Provides a streaming operator for handling output textstream manipulators. Manipulators are simple functions that accept the stream as input and manipulate it in a minor way. They can hold no state. The most common example of such a manipulator is the endln manipulator. This manipulator works in the same fashion as the c++ endl manipulator.

Flushes the underlying device's buffer.

Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].

Definition at line 373 of file output_text_stream.hpp.

◆ operator<<() [1/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const bool  b)

Sends a boolean to the stream. Sends a boolean to the stream.

Parameters
b: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 330 of file output_text_stream.hpp.

◆ operator<<() [2/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const char &  c)

Sends an unformatted char to the stream. Sends an unformatted char to the stream.

Parameters
c: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 171 of file output_text_stream.hpp.

◆ operator<<() [3/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const char *  s)

Sends an unformatted char string to the stream. Sends an unformatted char string to the stream.

Parameters
s: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 185 of file output_text_stream.hpp.

◆ operator<<() [4/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const double &  d)

Sends an unformatted double to the stream.

Parameters
d: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation.

Definition at line 358 of file output_text_stream.hpp.

◆ operator<<() [5/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const float &  f)

Sends an unformatted float to the stream.

Parameters
f: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 344 of file output_text_stream.hpp.

◆ operator<<() [6/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const int &  i)

Sends an unformatted int to the stream. Sends an unformatted int to the stream.

Parameters
i: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 227 of file output_text_stream.hpp.

◆ operator<<() [7/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const long &  i)

Sends an unformatted long to the stream. Sends an unformatted long to the stream.

Parameters
i: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 242 of file output_text_stream.hpp.

◆ operator<<() [8/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const long long &  i)

Sends an unformatted long long to the stream. Sends an unformatted long long to the stream.

Parameters
i: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 257 of file output_text_stream.hpp.

◆ operator<<() [9/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const short &  i)

Sends an unformatted short to the stream. Sends an unformatted short to the stream.

Parameters
i: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 213 of file output_text_stream.hpp.

◆ operator<<() [10/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const std::string &  s)

Sends an unformatted string to the stream. Sends an unformatted string to the stream.

Parameters
s: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 200 of file output_text_stream.hpp.

◆ operator<<() [11/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const unsigned int &  i)

Sends an unformatted unsigned int to the stream. Sends an unformatted unsigned int to the stream.

Parameters
i: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 287 of file output_text_stream.hpp.

◆ operator<<() [12/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const unsigned long &  i)

Sends an unformatted unsigned long to the stream. Sends an unformatted unsigned long to the stream.

Parameters
i: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 302 of file output_text_stream.hpp.

◆ operator<<() [13/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const unsigned long long &  i)

Sends an unformatted unsigned long long to the stream. Sends an unformatted unsigned long long to the stream.

Parameters
i: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 316 of file output_text_stream.hpp.

◆ operator<<() [14/15]

template<typename Device >
OutputTextStream< Device > & ecl::interfaces::OutputTextStream< Device, true >::operator<< ( const unsigned short &  i)

Sends an unformatted unsigned short to the stream. Sends an unformatted unsigned short to the stream.

Parameters
i: input value being sent to the stream
Exceptions
ecl::StandardException: throws if the underlying device has not been opened [debug mode only].
Returns
OutputTextStream : returns the stream for further manipulation

Definition at line 272 of file output_text_stream.hpp.

◆ operator<<() [15/15]

template<typename Device >
template<typename Action >
OutputTextStream<Device>& ecl::interfaces::OutputTextStream< Device, true >::operator<< ( ecl::Manipulator< Action > &  manipulator)
inline

Definition at line 132 of file output_text_stream.hpp.

Member Data Documentation

◆ toCharString

template<typename Device >
ecl::Converter<char*> ecl::interfaces::OutputTextStream< Device, true >::toCharString
private

Definition at line 156 of file output_text_stream.hpp.


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


ecl_streams
Author(s): Daniel Stonier
autogenerated on Sun Aug 2 2020 03:12:20