AWS SDK for C++
AWS SDK for C++
Loading...
Searching...
No Matches
PreallocatedStreamBuf.h
Go to the documentation of this file.
1
7#pragma once
8
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}
#define AWS_CORE_API
Definition: Core_EXPORTS.h:26
int which
Definition: cJSON.h:248
char * buffer
Definition: cJSON.h:174
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