Main Page
Namespaces
Classes
Files
File List
File Members
include
ecl
streams
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_ */
ecl
ecl::StringStream::~StringStream
virtual ~StringStream()
Definition:
string_stream.hpp:76
ecl_streams_PUBLIC
#define ecl_streams_PUBLIC
Definition:
macros.hpp:37
macros.hpp
string.hpp
ecl::StringStream::c_str
const char * c_str()
Character string representation of the underlying device's contents.
Definition:
string_stream.hpp:55
ecl::StringStream::clear
void clear()
Clears the underlying device's internal buffers.
Definition:
string_stream.hpp:74
ecl::StringStream
Convenience wrapper for string device based textstreams.
Definition:
string_stream.hpp:44
text_stream.hpp
Convenience header for various text streams.
ecl::TextStream
A text streaming interface.
Definition:
text_stream.hpp:94
ecl::StringStream::str
std::string str()
String representation of the underlying device's contents.
Definition:
string_stream.hpp:66
ecl_streams
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:08:50