2 #include "util/StringBuilder.h" 5 template <
typename StringBufferType = std::
string>
9 typedef CNPLWriterT< ParaEngine::StringBuilder >
CNPLBufWriter;
39 template <
typename StringBufferType>
43 typedef StringBufferType Buffer_Type;
46 CNPLWriterT(
int nReservedSize = -1);
48 CNPLWriterT(Buffer_Type& buff_,
int nReservedSize = -1);
52 void Reset(
int nReservedSize = -1);
58 void WriteName(
const char* name,
bool bUseBrackets =
false);
61 void WriteValue(
const char* value,
bool bInQuotation=
true);
63 void WriteValue(
const char* buffer,
int nSize,
bool bInQuotation=
true);
64 void WriteValue(
const string& sStr,
bool bInQuotation=
true);
66 void WriteValue(
double value);
74 void Append(
const char* text);
75 void Append(
const char* pData,
int nSize);
76 void Append(
const string& sText);
81 char* AddMemBlock(
int nSize);
87 const Buffer_Type&
ToString() {
return m_sCode;};
92 static const Buffer_Type& GetNilMessage();
95 static const Buffer_Type& GetEmptyMessage();
99 bool m_bBeginAssignment;
const Buffer_Type & ToString()
get the current NPL code.
Definition: NPLWriter.h:87
define this to enable debugging of NPL code in visual studio
Definition: INPL.h:9
CNPLWriterT< std::string > CNPLWriter
using std::string for buffering
Definition: NPLWriter.h:12
void WriteParamDelimiter()
write ";"
Definition: NPLWriter.h:84
CNPLWriterT< ParaEngine::StringBuilder > CNPLBufWriter
using StringBuilder for buffering.
Definition: NPLWriter.h:6