8#ifndef INCLUDED_ORCUS_SPREADSHEET_PIVOT_HPP
9#define INCLUDED_ORCUS_SPREADSHEET_PIVOT_HPP
11#include "orcus/env.hpp"
12#include "orcus/pstring.hpp"
13#include "orcus/types.hpp"
14#include "orcus/spreadsheet/types.hpp"
20#include <boost/optional.hpp>
32namespace spreadsheet {
36using pivot_cache_indices_t = std::vector<size_t>;
81 size_t shared_item_index;
96using pivot_cache_record_t = std::vector<pivot_cache_record_value_t>;
102 unknown = 0, boolean, date_time, character, numeric, blank, error
156using pivot_cache_items_t = std::vector<pivot_cache_item_t>;
165 pivot_cache_group_by_t group_by = pivot_cache_group_by_t::range;
167 bool auto_start =
true;
168 bool auto_end =
true;
172 double interval = 1.0;
186 boost::optional<range_grouping_type> range_grouping;
211 pivot_cache_items_t items;
213 boost::optional<double> min_value;
214 boost::optional<double> max_value;
216 boost::optional<date_time_t> min_date;
217 boost::optional<date_time_t> max_date;
219 std::unique_ptr<pivot_cache_group_data_t> group_data;
230 std::unique_ptr<impl> mp_impl;
233 using fields_type = std::vector<pivot_cache_field_t>;
234 using records_type = std::vector<pivot_cache_record_t>;
247 void insert_records(records_type record);
249 size_t get_field_count()
const;
261 pivot_cache_id_t get_id()
const;
263 const records_type& get_all_records()
const;
269 std::unique_ptr<impl> mp_impl;
283 const pstring& sheet_name,
const ixion::abs_range_t& range, std::unique_ptr<pivot_cache>&& cache);
293 const pstring& sheet_name,
const ixion::abs_range_t& range)
const;
297 const pivot_cache* get_cache(pivot_cache_id_t cache_id)
const;
Definition: pstring.hpp:28
Definition: document.hpp:48
Definition: pivot.hpp:228
const pivot_cache_field_t * get_field(size_t index) const
void insert_fields(fields_type fields)
Definition: pivot.hpp:267
size_t get_cache_count() const
void insert_worksheet_cache(const pstring &sheet_name, const ixion::abs_range_t &range, std::unique_ptr< pivot_cache > &&cache)
Definition: string_pool.hpp:23
Definition: types.hpp:420
Definition: pivot.hpp:204
pstring name
Definition: pivot.hpp:209
Definition: pivot.hpp:164
Definition: pivot.hpp:162
pivot_cache_indices_t base_to_group_indices
Definition: pivot.hpp:184
pivot_cache_items_t items
Definition: pivot.hpp:191
size_t base_field
Definition: pivot.hpp:194