end_of_line.hpp
Go to the documentation of this file.
1 
8 /*****************************************************************************
9 ** Ifdefs
10 *****************************************************************************/
11 
12 #ifndef ECL_STREAMS_END_OF_LINE_HPP_
13 #define ECL_STREAMS_END_OF_LINE_HPP_
14 
15 /*****************************************************************************
16 ** Includes
17 *****************************************************************************/
18 
19 #include <ecl/config/macros.hpp>
20 #include "../manipulators.hpp"
21 #include "../text_stream.hpp"
22 #include "../macros.hpp"
23 
24 /*****************************************************************************
25 ** Namespaces
26 *****************************************************************************/
27 
28 namespace ecl {
29 
30 /*****************************************************************************
31 ** Interface [EndOfLine]
32 *****************************************************************************/
43 class ecl_streams_PUBLIC EndOfLine : public Manipulator<EndOfLine> {
44 public:
54  template <typename ODevice>
56  ostream << "\n";
57  ostream.flush();
58  }
59 
60  virtual ~EndOfLine() {}
61 };
62 
63 /*****************************************************************************
64 ** Global Variables
65 *****************************************************************************/
66 
67 extern EndOfLine endl;
68 
69 } // namespace ecl
70 
71 #endif /* ECL_STREAMS_END_OF_LINE_HPP_ */
virtual ~EndOfLine()
Definition: end_of_line.hpp:60
Parent template for c++ style stream manipulators.
Definition: manipulator.hpp:92
Parent template for output text streams.
EndOfLine endl
#define ecl_streams_PUBLIC
Definition: macros.hpp:37
Replicates the well known end of line/flush combination.
Definition: end_of_line.hpp:43
void action(interfaces::OutputTextStream< ODevice, true > &ostream)
Forces an end of line character/flush combination.
Definition: end_of_line.hpp:55


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