import_pivot_cache_definition
Defined in header: <orcus/spreadsheet/import_interface_pivot.hpp>
-
class import_pivot_cache_definition
Interface for importing pivot cache definitions.
Public Functions
-
virtual ~import_pivot_cache_definition()
-
virtual void set_worksheet_source(std::string_view ref, std::string_view sheet_name) = 0
Specify that the source data of this pivot cache is located on a local worksheet.
- Todo:
use the ref resolver to resolve the range.
- Parameters:
ref – range string specifying the source range.
sheet_name – name of the worksheet where the source data is located.
-
virtual void set_worksheet_source(std::string_view table_name) = 0
Specify that the source data of this pivot cache is associated with a table.
- Parameters:
table_name – name of the table.
-
virtual void set_field_count(size_t n) = 0
Set the total number of fields present in this pivot cache.
- Parameters:
n – total number of fields in this pivot cache.
-
virtual void set_field_name(std::string_view name) = 0
Set the name of the field in the current field buffer.
- Parameters:
name – field name.
-
virtual void set_field_min_value(double v) = 0
Set the lowest value of the field in the current field buffer.
- Parameters:
v – lowest value of the field.
-
virtual void set_field_max_value(double v) = 0
Set the highest value of the field in the current field buffer.
- Parameters:
v – highest value of the field.
-
virtual void set_field_min_date(const date_time_t &dt) = 0
Set the lowest date value of the field in the current field buffer.
- Parameters:
dt – lowest date value of the field.
-
virtual void set_field_max_date(const date_time_t &dt) = 0
Set the highest date value of the field in the current field buffer.
- Parameters:
dt – highest date value of the field.
-
virtual import_pivot_cache_field_group *start_field_group(size_t base_index) = 0
Mark the current field as a group field and initiate its import.
The implementor should create an internal storage to prepare for the importing of field group data when this method gets called.
- Parameters:
base_index – 0-based index of the field this group field uses as its base.
- Returns:
interface for importing group field data, or a
nullptrif the implementor doesn’t support it.
-
virtual void commit_field() = 0
Commit the field in the current field buffer to the pivot cache model.
-
virtual void set_field_item_string(std::string_view value) = 0
Set a string value to the current field item buffer.
- Parameters:
value – string value.
-
virtual void set_field_item_numeric(double v) = 0
Set a numeric value to the current field item buffer.
- Parameters:
v – numeric value.
-
virtual void set_field_item_date_time(const date_time_t &dt) = 0
Set a date-time value to the current field item buffer.
- Parameters:
dt – date-time value.
-
virtual void set_field_item_error(error_value_t ev) = 0
Set an error value to the current field item buffer,
- Parameters:
ev – error value.
-
virtual void commit_field_item() = 0
Commit the field item in current field item buffer to the current field model.
-
virtual void commit() = 0
Commit the current pivot cache model to the document model.
-
virtual ~import_pivot_cache_definition()