16 #ifndef IMPALA_RUNTIME_STRING_BUFFER_H
17 #define IMPALA_RUNTIME_STRING_BUFFER_H
36 DCHECK(
pool_ != NULL);
55 Append(reinterpret_cast<const char*>(str), len);
const StringValue & str() const
Returns the underlying StringValue.
int Size() const
Returns the length of the current string.
void Append(const char *str, int len)
Append 'str' to the current string, allocating a new buffer as necessary.
void Assign(const char *str, int len)
Assigns contents to StringBuffer.
int buffer_size() const
Returns the buffer size.
void Clear()
Clear the underlying StringValue. The allocated buffer can be reused.
bool Empty() const
Returns whether the current string is empty.
StringBuffer(MemPool *pool, StringValue *str=NULL)
void GrowBuffer(int new_len)
StringValue string_value_
void Append(const uint8_t *str, int len)
TODO: switch everything to uint8_t?
void Reset()
Clears the underlying buffer and StringValue.
uint8_t * Allocate(int size)