In-memory read-only SST for unit tests and offline consumers (no document required).
More...
#include <XLSharedStringTable.hpp>
|
| | XLMapSharedStringTable ()=default |
| | XLMapSharedStringTable (std::vector< std::string > strings) |
| | Replace the table with an ordered list of strings (indices 0..n-1).
|
| int32_t | append (std::string_view str) |
| | Append a string and return its index (duplicates reuse the existing index).
|
| void | clear () |
| int32_t | stringCount () const override |
| int32_t | getStringIndex (std::string_view str) const override |
| | Look up an existing string's index.
|
| bool | stringExists (std::string_view str) const override |
| const char * | getString (int32_t index) const override |
| | Resolve an SST index to a null-terminated C string.
|
| std::string_view | getStringView (int32_t index) const override |
| | Resolve an SST index to a string_view into the arena/cache.
|
| virtual | ~XLSharedStringTable ()=default |
In-memory read-only SST for unit tests and offline consumers (no document required).
Mirrors XLMapEvaluationContext: a lightweight mock of the SST port. Appended strings keep stable storage so getString/getStringView remain valid.
◆ XLMapSharedStringTable() [1/2]
| OpenXLSX::XLMapSharedStringTable::XLMapSharedStringTable |
( |
| ) |
|
|
default |
◆ XLMapSharedStringTable() [2/2]
| OpenXLSX::XLMapSharedStringTable::XLMapSharedStringTable |
( |
std::vector< std::string > | strings | ) |
|
|
explicit |
Replace the table with an ordered list of strings (indices 0..n-1).
◆ append()
| int32_t OpenXLSX::XLMapSharedStringTable::append |
( |
std::string_view | str | ) |
|
Append a string and return its index (duplicates reuse the existing index).
◆ clear()
| void OpenXLSX::XLMapSharedStringTable::clear |
( |
| ) |
|
◆ getString()
| const char * OpenXLSX::XLMapSharedStringTable::getString |
( |
int32_t | index | ) |
const |
|
nodiscardoverridevirtual |
Resolve an SST index to a null-terminated C string.
- Note
- Pointer is valid while the document / SST remains alive.
Implements OpenXLSX::XLSharedStringTable.
◆ getStringIndex()
| int32_t OpenXLSX::XLMapSharedStringTable::getStringIndex |
( |
std::string_view | str | ) |
const |
|
nodiscardoverridevirtual |
◆ getStringView()
| std::string_view OpenXLSX::XLMapSharedStringTable::getStringView |
( |
int32_t | index | ) |
const |
|
nodiscardoverridevirtual |
Resolve an SST index to a string_view into the arena/cache.
- Note
- View is valid while the document / SST remains alive.
Implements OpenXLSX::XLSharedStringTable.
◆ stringCount()
| int32_t OpenXLSX::XLMapSharedStringTable::stringCount |
( |
| ) |
const |
|
nodiscardoverridevirtual |
◆ stringExists()
| bool OpenXLSX::XLMapSharedStringTable::stringExists |
( |
std::string_view | str | ) |
const |
|
nodiscardoverridevirtual |
The documentation for this class was generated from the following files: