AWS SDK for C++  1.9.44
AWS SDK for C++
SimpleStreamBuf.h
Go to the documentation of this file.
1 
7 #pragma once
8 
12 #include <streambuf>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Stream
19 {
23  class AWS_CORE_API SimpleStreamBuf : public std::streambuf
24  {
25  public:
26 
27  using base = std::streambuf;
28 
30  explicit SimpleStreamBuf(const Aws::String& value);
31 
32  SimpleStreamBuf(const SimpleStreamBuf&) = delete;
34 
35  SimpleStreamBuf(SimpleStreamBuf&& toMove) = delete;
37 
38  virtual ~SimpleStreamBuf();
39 
40  Aws::String str() const;
41  void str(const Aws::String& value);
42 
43  void swap(SimpleStreamBuf& rhs);
44 
45  protected:
46  virtual std::streampos seekoff(std::streamoff off, std::ios_base::seekdir dir, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out) override;
47  virtual std::streampos seekpos(std::streampos pos, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out) override;
48 
49  virtual int overflow (int c = EOF) override;
50  virtual int underflow() override;
51 
52  virtual std::streamsize xsputn(const char* s, std::streamsize n) override;
53 
54  private:
55 
56  bool GrowBuffer();
57 
58  char* m_buffer;
59  size_t m_bufferSize;
60  };
61 
62 }
63 }
64 }
Aws::Utils::Stream::SimpleStreamBuf::SimpleStreamBuf
SimpleStreamBuf(const SimpleStreamBuf &)=delete
Aws::Utils::Stream::SimpleStreamBuf::SimpleStreamBuf
SimpleStreamBuf()
AWS_CORE_API
#define AWS_CORE_API
Definition: Core_EXPORTS.h:25
Aws::Utils::Stream::SimpleStreamBuf::SimpleStreamBuf
SimpleStreamBuf(SimpleStreamBuf &&toMove)=delete
Aws::Utils::Stream::SimpleStreamBuf::SimpleStreamBuf
SimpleStreamBuf(const Aws::String &value)
Aws::Utils::Stream::SimpleStreamBuf::overflow
virtual int overflow(int c=EOF) override
AWSVector.h
Aws::Utils::Stream::SimpleStreamBuf
Definition: SimpleStreamBuf.h:24
Aws::Utils::Stream::SimpleStreamBuf::base
std::streambuf base
Definition: SimpleStreamBuf.h:27
which
int which
Definition: cJSON.h:234
Aws::Utils::Stream::SimpleStreamBuf::~SimpleStreamBuf
virtual ~SimpleStreamBuf()
Aws::Utils::Stream::SimpleStreamBuf::str
void str(const Aws::String &value)
Aws::Utils::Stream::SimpleStreamBuf::swap
void swap(SimpleStreamBuf &rhs)
Aws::Utils::Stream::SimpleStreamBuf::seekpos
virtual std::streampos seekpos(std::streampos pos, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out) override
AWSString.h
Aws::Utils::Stream::SimpleStreamBuf::seekoff
virtual std::streampos seekoff(std::streamoff off, std::ios_base::seekdir dir, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out) override
Aws::Utils::Stream::SimpleStreamBuf::xsputn
virtual std::streamsize xsputn(const char *s, std::streamsize n) override
Core_EXPORTS.h
Aws::Utils::Stream::SimpleStreamBuf::str
Aws::String str() const
Aws::Utils::Stream::SimpleStreamBuf::operator=
SimpleStreamBuf & operator=(SimpleStreamBuf &&)=delete
Aws::Utils::Stream::SimpleStreamBuf::underflow
virtual int underflow() override
Aws
Definition: AccessManagementClient.h:15
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Utils::Stream::SimpleStreamBuf::operator=
SimpleStreamBuf & operator=(const SimpleStreamBuf &)=delete