Go to the documentation of this file.
52 static const int kDefaultBlockSize = 8192;
63 last_returned_size_(0) {}
81 <<
"BackUp() can only be called after a successful Next().";
110 last_returned_size_(0) {}
128 <<
"BackUp() can only be called after a successful Next().";
143 int old_size =
target_->size();
146 if (old_size < target_->capacity()) {
152 if (old_size > std::numeric_limits<int>::max() / 2) {
155 GOOGLE_LOG(
ERROR) <<
"Cannot allocate buffer larger than kint32max for "
156 <<
"StringOutputStream.";
163 std::max(old_size * 2,
189 while (skipped <
count) {
191 implicit_cast<int>(
sizeof(junk))));
203 : copying_stream_(copying_stream),
204 owns_copying_stream_(
false),
207 buffer_size_(block_size > 0 ? block_size : kDefaultBlockSize),
253 <<
" BackUp() can only be called after Next().";
255 <<
" Can't back up over more bytes than were returned by the last call"
282 return skipped ==
count;
305 : copying_stream_(copying_stream),
306 owns_copying_stream_(
false),
309 buffer_size_(block_size > 0 ? block_size : kDefaultBlockSize),
337 <<
" BackUp() can only be called after Next().";
339 <<
" Can't back up over more bytes than were returned by the last call"
393 if (
limit_ <= 0)
return false;
416 if (
limit_ < 0)
return false;
#define GOOGLE_CHECK_EQ(A, B)
CopyingOutputStreamAdaptor(CopyingOutputStream *copying_stream, int block_size=-1)
std::unique_ptr< io::Tokenizer > input_
char * mutable_string_data(std::string *s)
bool owns_copying_stream_
GLsizei const GLchar *const * string
void AllocateBufferIfNeeded()
#define GOOGLE_CHECK_GT(A, B)
StringOutputStream(std::string *target)
static const int kMinimumSize
bool Next(void **data, int *size) override
int64 ByteCount() const override
void BackUp(int count) override
bool Next(void **data, int *size) override
#define GOOGLE_LOG(LEVEL)
CopyingOutputStream * copying_stream_
bool Next(void **data, int *size) override
#define GOOGLE_CHECK_LE(A, B)
static const LogLevel ERROR
ArrayOutputStream(void *data, int size, int block_size=-1)
void BackUp(int count) override
#define GOOGLE_CHECK(EXPRESSION)
void BackUp(int count) override
virtual bool Write(const void *buffer, int size)=0
int64 ByteCount() const override
#define GOOGLE_CHECK_GE(A, B)
int64 ByteCount() const override
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
~CopyingOutputStreamAdaptor() override
std::unique_ptr< uint8[]> buffer_
void STLStringResizeUninitialized(string *s, size_t new_size)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:02