Program Listing for File end_of_line.hpp
↰ Return to documentation for file (include/ecl/streams/manipulators/end_of_line.hpp
)
/*****************************************************************************
** Ifdefs
*****************************************************************************/
#ifndef ECL_STREAMS_END_OF_LINE_HPP_
#define ECL_STREAMS_END_OF_LINE_HPP_
/*****************************************************************************
** Includes
*****************************************************************************/
#include <ecl/config/macros.hpp>
#include "../manipulators.hpp"
#include "../text_stream.hpp"
#include "../macros.hpp"
/*****************************************************************************
** Namespaces
*****************************************************************************/
namespace ecl {
/*****************************************************************************
** Interface [EndOfLine]
*****************************************************************************/
class ecl_streams_PUBLIC EndOfLine : public Manipulator<EndOfLine> {
public:
template <typename ODevice>
void action (interfaces::OutputTextStream<ODevice,true>& ostream) {
ostream << "\n";
ostream.flush();
}
virtual ~EndOfLine() {}
};
/*****************************************************************************
** Global Variables
*****************************************************************************/
extern EndOfLine endl;
} // namespace ecl
#endif /* ECL_STREAMS_END_OF_LINE_HPP_ */