clear_screen.hpp
Go to the documentation of this file.
1 
11 /*****************************************************************************
12 ** Ifdefs
13 *****************************************************************************/
14 
15 #ifndef ECL_STREAMS_CLEAR_SCREEN_HPP_
16 #define ECL_STREAMS_CLEAR_SCREEN_HPP_
17 
18 /*****************************************************************************
19 ** Includes
20 *****************************************************************************/
21 
22 #include <ecl/config/macros.hpp>
23 #include "../manipulators.hpp"
24 #include "../text_stream.hpp"
25 #include "../macros.hpp"
26 
27 /*****************************************************************************
28 ** Namespaces
29 *****************************************************************************/
30 
31 namespace ecl {
32 
33 /*****************************************************************************
34 ** Interface [ClearScreen]
35 *****************************************************************************/
48 class ecl_streams_PUBLIC ClearScreen : public Manipulator<ClearScreen> {
49 public:
63  template <typename ODevice>
65  for (int i = 0; i < 80; ++i ) {
66  ostream << "\n";
67  }
68  }
69  virtual ~ClearScreen() {}
70 };
71 
72 /*****************************************************************************
73 ** Global Variables
74 *****************************************************************************/
75 
76 extern ClearScreen clrscr;
77 
78 } // namespace ecl
79 
80 
81 #endif /* ECL_STREAMS_CLEAR_SCREEN_HPP_ */
Parent template for c++ style stream manipulators.
Definition: manipulator.hpp:92
ClearScreen clrscr
void action(interfaces::OutputTextStream< ODevice, true > &ostream)
Clears a terminal screen the c++ (hard) way.
Parent template for output text streams.
virtual ~ClearScreen()
#define ecl_streams_PUBLIC
Definition: macros.hpp:37
Manipulator that clears a terminal screen the c++ (hard) way.


ecl_streams
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:08:50