Orcus
Public Member Functions | List of all members
orcus::spreadsheet::iface::import_named_expression Class Referenceabstract

#include <import_interface.hpp>

Public Member Functions

virtual void set_base_position (const src_address_t &pos)=0
 
virtual void set_named_expression (std::string_view name, std::string_view expression)=0
 
virtual void set_named_range (std::string_view name, std::string_view range)=0
 
virtual void commit ()=0
 

Detailed Description

Interface for importing named expressions or ranges.

Note that this interface has two different methods for defining named expressions - set_named_expression() and set_named_range().

The set_named_expression() method is generally used to pass named expression strings. The set_named_range() method is used only when the format uses a different syntax to express a named range. A named range is a special case of named expression where the expression consists of one range token.

Member Function Documentation

◆ set_base_position()

virtual void orcus::spreadsheet::iface::import_named_expression::set_base_position ( const src_address_t pos)
pure virtual

Specify an optional base position from which to evaluate a named expression. If not specified, the implementor should use the top-left cell position on the first sheet as its implied base position.

Parameters
poscell position to be used as the base.

◆ set_named_expression()

virtual void orcus::spreadsheet::iface::import_named_expression::set_named_expression ( std::string_view  name,
std::string_view  expression 
)
pure virtual

Define a new named expression or overwrite an existing one.

Parameters
namename of the expression to be defined.
expressionexpression to be associated with the name.

◆ set_named_range()

virtual void orcus::spreadsheet::iface::import_named_expression::set_named_range ( std::string_view  name,
std::string_view  range 
)
pure virtual

Define a new named range or overwrite an existin gone. Note that you can only define one named range or expression per single commit.

Parameters
namename of the expression to be defined.
rangerange to be associated with the name.