import_factory
Defined in header: <orcus/spreadsheet/import_interface.hpp>
-
class import_factory
This interface is the entry point for the import filter code to instantiate other, more specialized interfaces. The life cycles of any specialized interfaces returned from this interface shall be managed by the implementor of this interface.
The implementer of this interface may wrap a backend document store that needs to be populated.
Subclassed by orcus::spreadsheet::import_factory
Public Functions
-
virtual ~import_factory()
-
virtual import_global_settings *get_global_settings()
Obtain an optional interface for global settings, which the import filter uses to specify global filter settings that may affect how certain values and properties should be processed. The implementor can use this interface to decide how to process relevant values and properties.
- Returns:
pointer to the global settings interface, or a
nullptrif the implementor doesn’t support it.
Obtain an optional interface for importing shared strings for string cells. Implementing this interface is required in order to import string cell values.
- Returns:
pointer to the shared strings interface, or a
nullptrif the implementor doesn’t support it.
-
virtual import_named_expression *get_named_expression()
Obtain an optional interface for importing global named expressions.
Note that import_sheet also provides the same interface, but its interface is for importing sheet-local named expressions.
- Returns:
pointer to the global named expression interface, or a
nullptrif the implementor doesn’t support it.
-
virtual import_styles *get_styles()
Obtain an optional interface for importing styles used to add formatting properties to cell values.
- Returns:
pointer to the styles interface, or a
nullptrif the implementor doesn’t support it.
-
virtual import_reference_resolver *get_reference_resolver(formula_ref_context_t cxt)
Obtain an optional interface for resolving cell and cell-range references from string values.
- Parameters:
cxt – context in which the formula expression containing the references to be resolved occurs.
- Returns:
pointer to the reference resolve interfance, or a
nullptrif the implementor doesn’t support it.
-
virtual import_pivot_cache_definition *create_pivot_cache_definition(pivot_cache_id_t cache_id)
Obtain an optional interface for pivot cache definition import for a specified cache ID. In case a pivot cache alrady exists for the passed ID, the implementor should overwrite the existing cache with a brand-new cache instance.
- Parameters:
cache_id – numeric ID associated with the pivot cache.
- Returns:
pointer to the pivot cache interface, or a
nullptrif the implementor doesn’t support pivot cache import.
-
virtual import_pivot_cache_records *create_pivot_cache_records(pivot_cache_id_t cache_id)
Obtain an optional interface for pivot cache records import for a specified cache ID.
- Parameters:
cache_id – numeric ID associated with the pivot cache.
- Returns:
pointer to the pivot cache records interface, or a
nullptrif the implementor doesn’t support pivot cache import.
-
virtual import_pivot_table_definition *create_pivot_table_definition()
-
virtual import_sheet *append_sheet(sheet_t sheet_index, std::string_view name) = 0
Append a sheet with a specified sheet position index and name and return an interface for importing its content. The implementor can use a call to this method as a signal to create and append a new sheet instance to the document store.
- Parameters:
sheet_index – position index of the sheet to be appended. It is 0-based i.e. the first sheet to be appended will have an index value of 0.
name – sheet name.
- Returns:
pointer to the sheet instance, or a
nullptrif the implementor doesn’t support it. Note, however, that if the implementor doesn’t support this interface, no cell values will get imported.
-
virtual import_sheet *get_sheet(std::string_view name) = 0
Get a sheet instance by name. The import filter may use this method to get access to an existing sheet after it has been created.
- Parameters:
name – sheet name.
- Returns:
pointer to the sheet instance whose name matches the name passed to this method. It returns a
nullptrif no sheet instance exists by the specified name.
-
virtual import_sheet *get_sheet(sheet_t sheet_index) = 0
Retrieve a sheet instance by a specified numerical sheet index.
- Parameters:
sheet_index – sheet index.
- Returns:
pointer to the sheet instance, or a
nullptrif no sheet instance exists at the specified sheet index.
-
virtual void finalize() = 0
The import filter calls this method after completing its import, to give the implementor a chance to perform post-processing.
-
virtual ~import_factory()