|
OpenTTD Source 20251116-master-g21329071df
|
Output buffer for a block of data. More...
Public Member Functions | |
| void | Clear () |
| Prepare buffer for use. | |
| size_t | Add (std::string_view text) |
| Add text to the output buffer. | |
| void | Write (FILE *out_fp) const |
| Dump buffer to the output stream. | |
| bool | HasRoom () const |
| Does the block have room for more data? | |
Data Fields | |
| size_t | size |
| Number of bytes stored in data. | |
| char | data [OUTPUT_BLOCK_SIZE] |
| Stored data. | |
Output buffer for a block of data.
Definition at line 37 of file settingsgen.cpp.
|
inline |
Add text to the output buffer.
| text | Text to store. |
| length | Length of the text in bytes. |
Definition at line 51 of file settingsgen.cpp.
References data, OUTPUT_BLOCK_SIZE, and size.
Referenced by OutputStore::Add().
|
inline |
Prepare buffer for use.
Definition at line 40 of file settingsgen.cpp.
References size.
Referenced by OutputStore::Add().
|
inline |
Does the block have room for more data?
true if room is available, else false. Definition at line 73 of file settingsgen.cpp.
References OUTPUT_BLOCK_SIZE, and size.
|
inline |
Dump buffer to the output stream.
| out_fp | Stream to write the data to. |
Definition at line 62 of file settingsgen.cpp.
| char OutputBuffer::data[OUTPUT_BLOCK_SIZE] |
| size_t OutputBuffer::size |