Orcus
Loading...
Searching...
No Matches
orcus::spreadsheet::iface::import_factory Class Referenceabstract

#include <import_interface.hpp>

Inheritance diagram for orcus::spreadsheet::iface::import_factory:
orcus::spreadsheet::import_factory

Public Member Functions

virtual import_global_settingsget_global_settings ()
 
virtual import_shared_stringsget_shared_strings ()
 
virtual import_named_expressionget_named_expression ()
 
virtual import_stylesget_styles ()
 
virtual import_reference_resolverget_reference_resolver (formula_ref_context_t cxt)
 
virtual import_pivot_cache_definitioncreate_pivot_cache_definition (pivot_cache_id_t cache_id)
 
virtual import_pivot_cache_recordscreate_pivot_cache_records (pivot_cache_id_t cache_id)
 
virtual import_sheetappend_sheet (sheet_t sheet_index, std::string_view name)=0
 
virtual import_sheetget_sheet (std::string_view name)=0
 
virtual import_sheetget_sheet (sheet_t sheet_index)=0
 
virtual void finalize ()=0
 

Detailed Description

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.

Member Function Documentation

◆ append_sheet()

virtual import_sheet * orcus::spreadsheet::iface::import_factory::append_sheet ( sheet_t sheet_index,
std::string_view name )
pure virtual

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_indexposition 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.
namesheet name.
Returns
pointer to the sheet instance, or a nullptr if the implementor doesn't support it. Note, however, that if the implementor doesn't support this interface, no cell values will get imported.

Implemented in orcus::spreadsheet::import_factory.

◆ create_pivot_cache_definition()

virtual import_pivot_cache_definition * orcus::spreadsheet::iface::import_factory::create_pivot_cache_definition ( pivot_cache_id_t cache_id)
virtual

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_idnumeric ID associated with the pivot cache.
Returns
pointer to the pivot cache interface, or a nullptr if the implementor doesn't support pivot cache import.

Reimplemented in orcus::spreadsheet::import_factory.

◆ create_pivot_cache_records()

virtual import_pivot_cache_records * orcus::spreadsheet::iface::import_factory::create_pivot_cache_records ( pivot_cache_id_t cache_id)
virtual

Obtain an optional interface for pivot cache records import for a specified cache ID.

Parameters
cache_idnumeric ID associated with the pivot cache.
Returns
pointer to the pivot cache records interface, or a nullptr if the implementor doesn't support pivot cache import.

Reimplemented in orcus::spreadsheet::import_factory.

◆ finalize()

virtual void orcus::spreadsheet::iface::import_factory::finalize ( )
pure virtual

The import filter calls this method after completing its import, to give the implementor a chance to perform post-processing.

Implemented in orcus::spreadsheet::import_factory.

◆ get_global_settings()

virtual import_global_settings * orcus::spreadsheet::iface::import_factory::get_global_settings ( )
virtual

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 nullptr if the implementor doesn't support it.

Reimplemented in orcus::spreadsheet::import_factory.

◆ get_named_expression()

virtual import_named_expression * orcus::spreadsheet::iface::import_factory::get_named_expression ( )
virtual

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 nullptr if the implementor doesn't support it.

Reimplemented in orcus::spreadsheet::import_factory.

◆ get_reference_resolver()

virtual import_reference_resolver * orcus::spreadsheet::iface::import_factory::get_reference_resolver ( formula_ref_context_t cxt)
virtual

Obtain an optional interface for resolving cell and cell-range references from string values.

Parameters
cxtcontext in which the formula expression containing the references to be resolved occurs.
Returns
pointer to the reference resolve interfance, or a nullptr if the implementor doesn't support it.

Reimplemented in orcus::spreadsheet::import_factory.

◆ get_shared_strings()

virtual import_shared_strings * orcus::spreadsheet::iface::import_factory::get_shared_strings ( )
virtual

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 nullptr if the implementor doesn't support it.

Reimplemented in orcus::spreadsheet::import_factory.

◆ get_sheet() [1/2]

virtual import_sheet * orcus::spreadsheet::iface::import_factory::get_sheet ( sheet_t sheet_index)
pure virtual

Retrieve a sheet instance by a specified numerical sheet index.

Parameters
sheet_indexsheet index.
Returns
pointer to the sheet instance, or a nullptr if no sheet instance exists at the specified sheet index.

Implemented in orcus::spreadsheet::import_factory.

◆ get_sheet() [2/2]

virtual import_sheet * orcus::spreadsheet::iface::import_factory::get_sheet ( std::string_view name)
pure virtual

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
namesheet name.
Returns
pointer to the sheet instance whose name matches the name passed to this method. It returns a nullptr if no sheet instance exists by the specified name.

Implemented in orcus::spreadsheet::import_factory.

◆ get_styles()

virtual import_styles * orcus::spreadsheet::iface::import_factory::get_styles ( )
virtual

Obtain an optional interface for importing styles used to add formatting properties to cell values.

Returns
pointer to the styles interface, or a nullptr if the implementor doesn't support it.

Reimplemented in orcus::spreadsheet::import_factory.