AWS SDK for C++  1.9.44
AWS SDK for C++
SimpleStringStream.h
Go to the documentation of this file.
1 
6 #pragma once
7 
9 
11 
12 #include <iostream>
13 
14 namespace Aws
15 {
16 
17 class AWS_CORE_API SimpleStringStream : public std::iostream
18 {
19  public:
20 
21  using char_type = char;
22  using traits_type = std::char_traits<char>;
24  using int_type = int;
25  using pos_type = std::streampos;
26  using off_type = std::streamoff;
27 
28  using base = std::iostream;
29 
32 
33  virtual ~SimpleStringStream() {}
34 
35  // disabling copies of course
36  SimpleStringStream(const SimpleStringStream& rhs) = delete;
38 
39  // also disabling moves until there's a valid need
42 
43  Aws::Utils::Stream::SimpleStreamBuf* rdbuf() const { return const_cast<Aws::Utils::Stream::SimpleStreamBuf*>(&m_streamBuffer); }
44 
45  Aws::String str() const { return m_streamBuffer.str(); }
46  void str(const Aws::String& value);
47 
48  private:
49 
51 };
52 
53 class AWS_CORE_API SimpleIStringStream : public std::istream
54 {
55  public:
56 
57  using char_type = char;
58  using traits_type = std::char_traits<char>;
60  using int_type = int;
61  using pos_type = std::streampos;
62  using off_type = std::streamoff;
63 
64  using base = std::istream;
65 
68 
69  virtual ~SimpleIStringStream() {}
70 
71  // disabling copies of course
74 
75  // also disabling moves until there's a valid need
78 
79  Aws::Utils::Stream::SimpleStreamBuf* rdbuf() const { return const_cast<Aws::Utils::Stream::SimpleStreamBuf*>(&m_streamBuffer); }
80 
81  Aws::String str() const { return m_streamBuffer.str(); }
82  void str(const Aws::String& value);
83 
84  private:
85 
87 };
88 
89 class AWS_CORE_API SimpleOStringStream : public std::ostream
90 {
91  public:
92 
93  using char_type = char;
94  using traits_type = std::char_traits<char>;
96  using int_type = int;
97  using pos_type = std::streampos;
98  using off_type = std::streamoff;
99 
100  using base = std::ostream;
101 
104 
105  virtual ~SimpleOStringStream() {}
106 
107  // disabling copies of course
110 
111  // also disabling moves until there's a valid need
114 
115  Aws::Utils::Stream::SimpleStreamBuf* rdbuf() const { return const_cast<Aws::Utils::Stream::SimpleStreamBuf*>(&m_streamBuffer); }
116 
117  Aws::String str() const { return m_streamBuffer.str(); }
118  void str(const Aws::String& value);
119 
120  private:
121 
123 };
124 
125 } // namespace Aws
126 
Aws::SimpleOStringStream::SimpleOStringStream
SimpleOStringStream()
Aws::SimpleStringStream::rdbuf
Aws::Utils::Stream::SimpleStreamBuf * rdbuf() const
Definition: SimpleStringStream.h:43
Aws::SimpleOStringStream::traits_type
std::char_traits< char > traits_type
Definition: SimpleStringStream.h:94
Aws::Allocator
std::allocator< T > Allocator
Definition: AWSAllocator.h:39
Aws::SimpleStringStream::traits_type
std::char_traits< char > traits_type
Definition: SimpleStringStream.h:22
Aws::SimpleIStringStream::str
void str(const Aws::String &value)
AWS_CORE_API
#define AWS_CORE_API
Definition: Core_EXPORTS.h:25
Aws::SimpleIStringStream::SimpleIStringStream
SimpleIStringStream(const SimpleIStringStream &rhs)=delete
Aws::SimpleIStringStream::operator=
SimpleIStringStream & operator=(const SimpleIStringStream &rhs)=delete
Aws::SimpleStringStream::off_type
std::streamoff off_type
Definition: SimpleStringStream.h:26
Aws::SimpleOStringStream::SimpleOStringStream
SimpleOStringStream(const Aws::String &value)
Aws::SimpleOStringStream::str
void str(const Aws::String &value)
Aws::SimpleOStringStream::pos_type
std::streampos pos_type
Definition: SimpleStringStream.h:97
Aws::SimpleOStringStream::rdbuf
Aws::Utils::Stream::SimpleStreamBuf * rdbuf() const
Definition: SimpleStringStream.h:115
SimpleStreamBuf.h
Aws::SimpleIStringStream::SimpleIStringStream
SimpleIStringStream(SimpleIStringStream &&rhs)=delete
Aws::SimpleIStringStream::base
std::istream base
Definition: SimpleStringStream.h:64
Aws::SimpleIStringStream::SimpleIStringStream
SimpleIStringStream(const Aws::String &value)
Aws::SimpleStringStream::SimpleStringStream
SimpleStringStream()
Aws::Utils::Stream::SimpleStreamBuf
Definition: SimpleStreamBuf.h:24
Aws::SimpleOStringStream::operator=
SimpleOStringStream & operator=(const SimpleOStringStream &rhs)=delete
Aws::SimpleStringStream::SimpleStringStream
SimpleStringStream(SimpleStringStream &&rhs)=delete
Aws::SimpleIStringStream::int_type
int int_type
Definition: SimpleStringStream.h:60
Aws::SimpleStringStream::allocator_type
Aws::Allocator< char > allocator_type
Definition: SimpleStringStream.h:23
Aws::SimpleStringStream::char_type
char char_type
Definition: SimpleStringStream.h:21
Aws::SimpleIStringStream::allocator_type
Aws::Allocator< char > allocator_type
Definition: SimpleStringStream.h:59
Aws::SimpleStringStream::str
Aws::String str() const
Definition: SimpleStringStream.h:45
Aws::SimpleIStringStream::~SimpleIStringStream
virtual ~SimpleIStringStream()
Definition: SimpleStringStream.h:69
Aws::SimpleOStringStream::SimpleOStringStream
SimpleOStringStream(const SimpleOStringStream &rhs)=delete
Aws::SimpleOStringStream::off_type
std::streamoff off_type
Definition: SimpleStringStream.h:98
Aws::SimpleOStringStream
Definition: SimpleStringStream.h:90
Aws::SimpleOStringStream::operator=
SimpleOStringStream & operator=(SimpleOStringStream &&rhs)=delete
Aws::SimpleIStringStream
Definition: SimpleStringStream.h:54
Aws::SimpleIStringStream::pos_type
std::streampos pos_type
Definition: SimpleStringStream.h:61
Aws::SimpleStringStream
Definition: SimpleStringStream.h:18
Aws::SimpleStringStream::operator=
SimpleStringStream & operator=(SimpleStringStream &&rhs)=delete
Aws::SimpleStringStream::pos_type
std::streampos pos_type
Definition: SimpleStringStream.h:25
Aws::SimpleOStringStream::char_type
char char_type
Definition: SimpleStringStream.h:93
Aws::SimpleOStringStream::str
Aws::String str() const
Definition: SimpleStringStream.h:117
Aws::SimpleIStringStream::str
Aws::String str() const
Definition: SimpleStringStream.h:81
Aws::SimpleIStringStream::off_type
std::streamoff off_type
Definition: SimpleStringStream.h:62
Aws::SimpleStringStream::int_type
int int_type
Definition: SimpleStringStream.h:24
Aws::SimpleStringStream::SimpleStringStream
SimpleStringStream(const SimpleStringStream &rhs)=delete
Aws::SimpleIStringStream::operator=
SimpleIStringStream & operator=(SimpleIStringStream &&rhs)=delete
Core_EXPORTS.h
Aws::SimpleStringStream::SimpleStringStream
SimpleStringStream(const Aws::String &value)
Aws
Definition: AccessManagementClient.h:15
Aws::SimpleStringStream::str
void str(const Aws::String &value)
Aws::SimpleStringStream::operator=
SimpleStringStream & operator=(const SimpleStringStream &rhs)=delete
Aws::SimpleOStringStream::base
std::ostream base
Definition: SimpleStringStream.h:100
Aws::SimpleStringStream::~SimpleStringStream
virtual ~SimpleStringStream()
Definition: SimpleStringStream.h:33
Aws::SimpleOStringStream::~SimpleOStringStream
virtual ~SimpleOStringStream()
Definition: SimpleStringStream.h:105
Aws::SimpleIStringStream::SimpleIStringStream
SimpleIStringStream()
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::SimpleOStringStream::SimpleOStringStream
SimpleOStringStream(SimpleOStringStream &&rhs)=delete
Aws::SimpleIStringStream::traits_type
std::char_traits< char > traits_type
Definition: SimpleStringStream.h:58
Aws::SimpleStringStream::base
std::iostream base
Definition: SimpleStringStream.h:28
Aws::SimpleIStringStream::rdbuf
Aws::Utils::Stream::SimpleStreamBuf * rdbuf() const
Definition: SimpleStringStream.h:79
Aws::SimpleIStringStream::char_type
char char_type
Definition: SimpleStringStream.h:57
Aws::SimpleOStringStream::allocator_type
Aws::Allocator< char > allocator_type
Definition: SimpleStringStream.h:95
Aws::SimpleOStringStream::int_type
int int_type
Definition: SimpleStringStream.h:96