string_stream.hpp
Go to the documentation of this file.
1 
10 /*****************************************************************************
11 ** Ifdefs
12 *****************************************************************************/
13 
14 #ifndef ECL_STREAMS_STRING_STREAM_HPP_
15 #define ECL_STREAMS_STRING_STREAM_HPP_
16 
17 /*****************************************************************************
18 ** Includes
19 *****************************************************************************/
20 
21 #include <string>
22 #include <ecl/config/macros.hpp>
23 #include <ecl/devices/string.hpp>
24 #include "text_stream.hpp"
25 #include "macros.hpp"
26 
27 /*****************************************************************************
28 ** Namespaces
29 *****************************************************************************/
30 
31 namespace ecl {
32 
33 /*****************************************************************************
34 ** Using
35 *****************************************************************************/
44 class ecl_streams_PUBLIC StringStream : public TextStream<String> {
45 public:
55  const char* c_str() { return this->io_device.c_str(); }
56 
66  std::string str() { return this->io_device.str(); }
67 
74  void clear() { io_device.clear(); }
75 
76  virtual ~StringStream() {}
77 };
78 
79 } // namespace ecl
80 
81 
82 
83 
84 #endif /* ECL_STREAMS_STRING_STREAM_HPP_ */
macros.hpp
Macros for ecl streams.
ecl_streams_PUBLIC
#define ecl_streams_PUBLIC
Definition: macros.hpp:37
string.hpp
text_stream.hpp
Convenience header for various text streams.
macros.hpp
ecl


ecl_streams
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:48