Orcus
Loading...
Searching...
No Matches
orcus::spreadsheet::pivot_cache Class Reference

Public Types

using fields_type = std::vector<pivot_cache_field_t>
using records_type = std::vector<pivot_cache_record_t>

Public Member Functions

 pivot_cache (pivot_cache_id_t cache_id, string_pool &sp)
void insert_fields (fields_type fields)
void insert_records (records_type record)
size_t get_field_count () const
const pivot_cache_field_tget_field (size_t index) const
pivot_cache_id_t get_id () const
const records_type & get_all_records () const

Member Function Documentation

◆ get_field()

const pivot_cache_field_t * orcus::spreadsheet::pivot_cache::get_field ( size_t index) const

Retrieve a field data by its index.

Parameters
indexindex of the field to retrieve.
Returns
pointer to the field instance, or nullptr if the index is out-of-range.

◆ insert_fields()

void orcus::spreadsheet::pivot_cache::insert_fields ( fields_type fields)

Bulk-insert all the fields in one step. Note that this will replace any pre-existing fields if any.

Parameters
fieldsfield instances to move into storage.