Class ClearScreen

Inheritance Relationships

Base Type

Class Documentation

class ClearScreen : public ecl::Manipulator<ClearScreen>

Manipulator that clears a terminal screen the c++ (hard) way.

Function object manipulator that clears an output terminal screen the hard (c++) way by sending 80 new lines to it.

The library instantiates a variable of this class under the name ‘clrscr’, so you need only refer to ecl::streams::clrscr to directly use it with your streams.

See also

Manipulator.

Public Functions

template<typename ODevice>
inline void action(interfaces::OutputTextStream<ODevice, true> &ostream)

Clears a terminal screen the c++ (hard) way.

Not very fast on most systems - hammers the terminal with alot of newlines. In windows this causes a problem since terminal screens are so slow and on screens with large resolutions, the 80 lines is not enough. Might actually implement system specific code for this at some time in the future.

Template Parameters

OutputStream – : the output stream type.

Parameters

ostream – : the stream to use for manipulation.

inline virtual ~ClearScreen()