AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
PreallocatedStreamBuf.h
1
7#pragma once
8
9#include <aws/core/Core_EXPORTS.h>
10#include <aws/core/utils/Array.h>
11#include <streambuf>
12
13namespace Aws
14{
15 namespace Utils
16 {
17 namespace Stream
18 {
22 class AWS_CORE_API PreallocatedStreamBuf : public std::streambuf
23 {
24 public:
32 PreallocatedStreamBuf(unsigned char* buffer, uint64_t lengthToRead);
33
36
39
44 unsigned char* GetBuffer() { return m_underlyingBuffer; }
45
46 protected:
47 pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out) override;
48 pos_type seekpos(pos_type pos, std::ios_base::openmode which = std::ios_base::in | std::ios_base::out) override;
49
50 private:
51 unsigned char* m_underlyingBuffer;
52 const uint64_t m_lengthToRead;
53 };
54 }
55 }
56}
PreallocatedStreamBuf & operator=(const PreallocatedStreamBuf &)=delete
pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out) override
PreallocatedStreamBuf(unsigned char *buffer, uint64_t lengthToRead)
PreallocatedStreamBuf(PreallocatedStreamBuf &&toMove)=delete
PreallocatedStreamBuf & operator=(PreallocatedStreamBuf &&)=delete
PreallocatedStreamBuf(const PreallocatedStreamBuf &)=delete
pos_type seekpos(pos_type pos, std::ios_base::openmode which=std::ios_base::in|std::ios_base::out) override