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 (const char *p_name, size_t n_name, const char *p_exp, size_t n_exp)=0
 
virtual void set_named_range (const char *p_name, size_t n_name, const char *p_range, size_t n_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 ( const char *  p_name,
size_t  n_name,
const char *  p_exp,
size_t  n_exp 
)
pure virtual

Define a new named expression or overwrite an existing one.

Parameters
p_namepointer to the buffer that stores the name of the expression to be defined.
n_namesize of the buffer that stores the name of the expression to be defined.
p_exppointer to the buffer that stores the expression to be associated with the name.
n_expsize of the buffer that stores the expression to be associated with the name.

◆ set_named_range()

virtual void orcus::spreadsheet::iface::import_named_expression::set_named_range ( const char *  p_name,
size_t  n_name,
const char *  p_range,
size_t  n_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
p_namepointer to the buffer that stores the name of the expression to be defined.
n_namesize of the buffer that stores the name of the expression to be defined.
p_rangepointer to the buffer that stores the range to be associated with the name.
n_rangesize of the buffer that stores the range to be associated with the name.