tables

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

class tables

Public Functions

tables() = delete
tables(const tables&) = delete
~tables()
tables &operator=(const tables&) = delete
void insert(ixion::table_t core, table_t pres)

Insert a new table. The core properties of the table, which formula expressions may reference, are stored in the ixion model context, while the presentation properties are stored in this store under the same table name.

Parameters:
  • core – Core properties of the table to store in the ixion model context.

  • pres – Presentation properties of the table to store in this store.

Throws:
  • std::invalid_argument – When the table name is empty, or the table range is invalid or spans multiple sheets.

  • ixion::model_context_error – When a table by the same name already exists.

const table_t *get(std::string_view name) const

Get the presentation properties of a named table. The rest of the table properties are stored in the ixion model context, accessible through document::get_model_context().

Parameters:

name – Name of the table.

Returns:

Pointer to the structure containing the presentation properties of the table, or nullptr if no such table exists for the given name. The returned pointer remains valid for the lifetime of this store.

std::map<std::string_view, const table_t*> get_by_sheet(sheet_t pos) const

Get all tables belonging to a certain sheet by sheet index.

Parameters:

pos – 0-based sheet index.

Returns:

Map containing pointers to all table instances belonging to specified sheet and their respective names as keys.

Friends

friend struct detail::document_impl