6 #ifndef TB_TEMP_BUFFER_H
7 #define TB_TEMP_BUFFER_H
37 bool Append(
const char *data,
int size);
58 bool AppendPath(
const char *full_path_and_filename);
76 int GetAppendReserveSize(
int needed_size)
const;
84 #endif // TB_TEMP_BUFFER_H
bool AppendFile(const TBStr &filename)
Append file content at the end of the buffer.
Definition: tb_tempbuffer.cpp:114
int GetAppendPos() const
Return the current append position in in bytes.
Definition: tb_tempbuffer.h:74
bool Reserve(int size)
Make sure the buffer has at least size bytes.
Definition: tb_tempbuffer.cpp:38
char * GetData() const
Get a pointer to the buffer data.
Definition: tb_tempbuffer.h:29
bool AppendString(const TBStr &str)
Append a TBStr.
Definition: tb_tempbuffer.h:53
void SetAppendPos(int append_pos)
Set the position (in bytes) in the buffer where Append should write.
Definition: tb_tempbuffer.cpp:32
bool AppendString(const char *str)
Append a null terminated string (including the null termination) at the end of the buffer...
Definition: tb_tempbuffer.cpp:75
int GetCapacity() const
Return the size of the buffer in bytes.
Definition: tb_tempbuffer.h:32
bool AppendPath(const char *full_path_and_filename)
Append a path without the ending filename.
Definition: tb_tempbuffer.cpp:89
TBStr is a simple string class.
Definition: tb_str.h:62
bool Append(const char *data, int size)
Append data with size bytes at the end of the buffer and increase the append position with the same a...
Definition: tb_tempbuffer.cpp:58
bool AppendSpace(int size)
Increase the append position with size bytes without writing any data.
Definition: tb_tempbuffer.cpp:67
void ResetAppendPos()
Reset the append position to 0.
Definition: tb_tempbuffer.h:71
TBTempBuffer manages a buffer that will be deleted on destruction.
Definition: tb_tempbuffer.h:18