Public Member Functions | Private Types | Private Member Functions | Private Attributes

OutputStore Class Reference

Temporarily store output. More...

Public Member Functions

void Clear ()
 Clear the temporary storage.
void Add (const char *text, int length=0)
 Add text to the output storage.
void Write (FILE *out_fp) const
 Write all stored output to the output stream.

Private Types

typedef SmallVector
< OutputBuffer, 2 > 
OutputBufferVector
 Vector type for output buffers.

Private Member Functions

bool BufferHasRoom () const
 Does the buffer have room without adding a new OutputBuffer block?

Private Attributes

OutputBufferVector output_buffer
 Vector of blocks containing the stored output.

Detailed Description

Temporarily store output.

Definition at line 101 of file settingsgen.cpp.


Member Function Documentation

void OutputStore::Add ( const char *  text,
int  length = 0 
) [inline]

Add text to the output storage.

Parameters:
text Text to store.
length Length of the text in bytes, 0 means 'length of the string'.

Definition at line 119 of file settingsgen.cpp.

References OutputBuffer::Add(), SmallVector< T, S >::Append(), BufferHasRoom(), OutputBuffer::Clear(), SmallVector< T, S >::Length(), and output_buffer.

Referenced by DumpGroup(), and DumpSections().

bool OutputStore::BufferHasRoom (  )  const [inline, private]

Does the buffer have room without adding a new OutputBuffer block?

Returns:
true if room is available, else false.

Definition at line 153 of file settingsgen.cpp.

References SmallVector< T, S >::Length(), and output_buffer.

Referenced by Add().

void OutputStore::Clear (  )  [inline]

Clear the temporary storage.

Definition at line 109 of file settingsgen.cpp.

References SmallVector< T, S >::Clear(), and output_buffer.

Referenced by main().

void OutputStore::Write ( FILE *  out_fp  )  const [inline]

Write all stored output to the output stream.

Parameters:
out_fp Stream to write the data to.

Definition at line 141 of file settingsgen.cpp.

References SmallVector< T, S >::Begin(), SmallVector< T, S >::End(), and output_buffer.

Referenced by main().


The documentation for this class was generated from the following file: