1 ///////////////////////////////////////////////////////////////////////////////
5 ///////////////////////////////////////////////////////////////////////////////
11 ///////////////////////////////////////////////////////////////////////////////
13 // Text buffer represents a simple open-ended insertion only buffer,
14 // sort of like a light weight ostrstream.
16 ///////////////////////////////////////////////////////////////////////////////
21 char * buffer
; // storage to buffer
22 char * limit
; // limit of buffer
23 char * cursor
; // cursor to next insertion point
25 void grow (size_t); // expand buffer
30 TextBuffer(const TextBuffer
&); // transfer to another buffer
33 void operator = (const TextBuffer
&); // transfer to another buffer
34 void emit (const char *, long = -1);
36 inline const char * text () const { return buffer
; }
37 inline size_t length () const { return cursor
- buffer
; }
38 inline void reset () { cursor
= buffer
; }