AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
SimpleStreamBuf.h
1
7#pragma once
8
9#include <aws/core/Core_EXPORTS.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <streambuf>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace 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
34
35 SimpleStreamBuf(SimpleStreamBuf&& toMove) = delete;
37
39
41 void str(const Aws::String& value);
42
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}
SimpleStreamBuf(const Aws::String &value)
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
virtual int underflow() override
SimpleStreamBuf(SimpleStreamBuf &&toMove)=delete
virtual int overflow(int c=EOF) override
virtual std::streampos seekpos(std::streampos pos, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out) override
virtual std::streamsize xsputn(const char *s, std::streamsize n) override
SimpleStreamBuf(const SimpleStreamBuf &)=delete
SimpleStreamBuf & operator=(SimpleStreamBuf &&)=delete
void swap(SimpleStreamBuf &rhs)
SimpleStreamBuf & operator=(const SimpleStreamBuf &)=delete
void str(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition AWSString.h:97