Orcus
Public Member Functions | List of all members
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 provides the filters a means to instantiate concrete classes that implement the above interfaces. The client code never has to manually delete objects returned by its methods; the implementor of this interface must manage the life cycles of objects it returns.

The implementor of this interface normally wraps the document instance inside it and have the document instance manage the life cycles of various objects it creates.

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 specified sheet position index and name.

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. It may return nullptr if the client app fails to append a new sheet.

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

Create an interface for pivot cache definition import for a specified cache ID. In case a pivot cache alrady exists for the passed ID, the client app 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 instance. If may return NULL if the client app doesn't support pivot tables.

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

Create an 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 instance. If may return nullptr if the client app doesn't support pivot tables.

Reimplemented in orcus::spreadsheet::import_factory.

◆ finalize()

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

This method is called at the end of import, to give the implementor a chance to perform post-processing if necessary.

Implemented in orcus::spreadsheet::import_factory.

◆ get_shared_strings()

virtual import_shared_strings * orcus::spreadsheet::iface::import_factory::get_shared_strings ( )
virtual
Returns
pointer to the shared strings instance. It may return NULL if the client app doesn't support shared strings.

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 sheet instance by specified numerical sheet index.

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

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.

Parameters
namesheet name.
Returns
pointer to the sheet instance whose name matches the name passed to this method. It returns 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
Returns
pointer to the styles instance. It may return NULL if the client app doesn't support styles.

Reimplemented in orcus::spreadsheet::import_factory.