|
OpenTTD Source 20251117-master-g7398d2e290
|
Builder implementation for InPlaceReplacement. More...
#include <string_inplace.hpp>
Data Structures | |
| class | back_insert_iterator |
| Implementation of std::back_insert_iterator for non-growing destination buffer. More... | |
Public Member Functions | |
| InPlaceBuilder (const InPlaceBuilder &)=delete | |
| InPlaceBuilder & | operator= (const InPlaceBuilder &)=delete |
| bool | AnyBytesWritten () const noexcept |
| Check whether any bytes have been written. | |
| size_type | GetBytesWritten () const noexcept |
| Get number of already written bytes. | |
| std::string_view | GetWrittenData () const noexcept |
| Get already written data. | |
| bool | AnyBytesUnused () const noexcept |
| Check whether any unused bytes are left between the Builder and Consumer position. | |
| size_type | GetBytesUnused () const noexcept |
| Get number of unused bytes left between the Builder and Consumer position. | |
| void | PutBuffer (std::span< const char > str) override |
| Append buffer. | |
| back_insert_iterator | back_inserter () |
| Create a back-insert-iterator. | |
Public Member Functions inherited from BaseStringBuilder | |
| void | Put (std::string_view str) |
| Append string. | |
| void | PutUint8 (uint8_t value) |
| Append binary uint8. | |
| void | PutSint8 (int8_t value) |
| Append binary int8. | |
| void | PutUint16LE (uint16_t value) |
| Append binary uint16 using little endian. | |
| void | PutSint16LE (int16_t value) |
| Append binary int16 using little endian. | |
| void | PutUint32LE (uint32_t value) |
| Append binary uint32 using little endian. | |
| void | PutSint32LE (int32_t value) |
| Append binary int32 using little endian. | |
| void | PutUint64LE (uint64_t value) |
| Append binary uint64 using little endian. | |
| void | PutSint64LE (int64_t value) |
| Append binary int64 using little endian. | |
| void | PutChar (char c) |
| Append 8-bit char. | |
| void | PutUtf8 (char32_t c) |
| Append UTF.8 char. | |
| template<class T > | |
| void | PutIntegerBase (T value, int base) |
| Append integer 'value' in given number 'base'. | |
Private Member Functions | |
| InPlaceBuilder (std::span< char > dest, const StringConsumer &consumer) | |
| InPlaceBuilder (const InPlaceBuilder &src, const StringConsumer &consumer) | |
| void | AssignBuffer (const InPlaceBuilder &src) |
Private Attributes | |
| std::span< char > | dest |
| size_type | position = 0 |
| const StringConsumer & | consumer |
Friends | |
| class | InPlaceReplacement |
Additional Inherited Members | |
Public Types inherited from BaseStringBuilder | |
| using | size_type = std::string_view::size_type |
Builder implementation for InPlaceReplacement.
Definition at line 21 of file string_inplace.hpp.
|
inlineexplicitprivate |
Definition at line 27 of file string_inplace.hpp.
|
inlineprivate |
Definition at line 28 of file string_inplace.hpp.
|
noexcept |
Check whether any unused bytes are left between the Builder and Consumer position.
Definition at line 19 of file string_inplace.cpp.
Referenced by StrMakeValidInPlace().
|
inlinenoexcept |
Check whether any bytes have been written.
Definition at line 37 of file string_inplace.hpp.
|
inlineprivate |
Definition at line 29 of file string_inplace.hpp.
|
inline |
Create a back-insert-iterator.
Definition at line 79 of file string_inplace.hpp.
|
noexcept |
Get number of unused bytes left between the Builder and Consumer position.
Definition at line 27 of file string_inplace.cpp.
Referenced by PutBuffer().
|
inlinenoexcept |
Get number of already written bytes.
Definition at line 41 of file string_inplace.hpp.
Referenced by StrMakeValidInPlace().
|
inlinenoexcept |
Get already written data.
Definition at line 45 of file string_inplace.hpp.
Append buffer.
Implements BaseStringBuilder.
Definition at line 35 of file string_inplace.cpp.
References GetBytesUnused().
|
friend |
Definition at line 26 of file string_inplace.hpp.
|
private |
Definition at line 24 of file string_inplace.hpp.
|
private |
Definition at line 22 of file string_inplace.hpp.
|
private |
Definition at line 23 of file string_inplace.hpp.