OpenTTD Source 20250428-master-ga5578166bb
OutputStore Class Reference

Temporarily store output. More...

Public Member Functions

void Clear ()
 Clear the temporary storage.
 
void Add (std::string_view text)
 Add text to the output storage.
 
void Write (FILE *out_fp) const
 Write all stored output to the output stream.
 

Private Types

typedef std::vector< OutputBufferOutputBufferVector
 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 83 of file settingsgen.cpp.

Member Typedef Documentation

◆ OutputBufferVector

typedef std::vector<OutputBuffer> OutputStore::OutputBufferVector
private

Vector type for output buffers.

Definition at line 136 of file settingsgen.cpp.

Constructor & Destructor Documentation

◆ OutputStore()

OutputStore::OutputStore ( )
inline

Definition at line 85 of file settingsgen.cpp.

Member Function Documentation

◆ Add()

void OutputStore::Add ( std::string_view  text)
inline

Add text to the output storage.

Parameters
textText to store.

Definition at line 100 of file settingsgen.cpp.

References OutputBuffer::Add(), OutputBuffer::Clear(), and output_buffer.

Referenced by DumpGroup(), and DumpLine().

◆ BufferHasRoom()

bool OutputStore::BufferHasRoom ( ) const
inlineprivate

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

Returns
true if room is available, else false.

Definition at line 130 of file settingsgen.cpp.

References output_buffer.

◆ Clear()

void OutputStore::Clear ( )
inline

Clear the temporary storage.

Definition at line 91 of file settingsgen.cpp.

References output_buffer.

Referenced by main().

◆ Write()

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

Write all stored output to the output stream.

Parameters
out_fpStream to write the data to.

Definition at line 118 of file settingsgen.cpp.

References output_buffer.

Referenced by main().

Field Documentation

◆ output_buffer

OutputBufferVector OutputStore::output_buffer
private

Vector of blocks containing the stored output.

Definition at line 137 of file settingsgen.cpp.

Referenced by Add(), BufferHasRoom(), Clear(), and Write().


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