shared_strings

Defined in header: <orcus/spreadsheet/shared_strings.hpp>

class shared_strings

This class manages access to a pool of shared string instances for both unformatted strings and rich-text strings. The underlying string values themselves are stored externally in the ixion::model_context instance which this class references; this class itself only stores the format properties of the rich-text strings.

Public Functions

shared_strings() = delete
shared_strings(const shared_strings&) = delete
shared_strings &operator=(const shared_strings&) = delete
shared_strings(ixion::model_context &cxt)
~shared_strings()
void set_format_runs(std::size_t sindex, std::unique_ptr<format_runs_t> runs)

Set the entire format runs of a string.

Parameters:
  • sindex – index of the string to associate the format runs with.

  • runs – format runs.

const format_runs_t *get_format_runs(std::size_t index) const

Get the entire format runs of a string.

Parameters:

index – index of the string to get the format runs of.

Returns:

pointer to the format runs, or nullptr if no format runs exist for the specified string index.

const std::string *get_string(std::size_t index) const

Get an underlying string value associated with an index.

Parameters:

index – index of a string value.

Returns:

pointer to a string value associated with the index, or nullptr in case of an invalid string index.

void dump(std::ostream &os) const