3 #include <bzscore/buffer.h>
6 namespace GDBServerFoundation
11 BazisLib::BasicBuffer m_Buffer;
15 : m_Buffer(anotherResponse.m_Buffer.
GetSize())
17 memcpy(m_Buffer.GetData(), anotherResponse.m_Buffer.GetConstData(), anotherResponse.m_Buffer.GetSize());
18 m_Buffer.SetSize(anotherResponse.m_Buffer.GetSize());
26 : m_Buffer(pText, strlen(pText))
31 : m_Buffer((const char *)pData, length)
35 size_t GetSize() {
return m_Buffer.GetSize();}
36 const char *
GetData() {
return (
const char *)m_Buffer.GetConstData();}
40 m_Buffer.append(pStr, strlen(pStr), 4096);
43 void Append(
const char *pStr,
size_t length)
45 m_Buffer.append(pStr, length, 4096);
50 size_t oldSize = m_Buffer.GetSize();
51 if (!m_Buffer.EnsureSize(oldSize + length))
53 m_Buffer.SetSize(oldSize + length);
54 return (
char *)m_Buffer.GetData(oldSize);
77 virtual StubResponse HandleRequest(
const BazisLib::TempStringA &requestType,
char splitterChar,
const BazisLib::TempStringA &requestData)=0;