Orcus
Loading...
Searching...
No Matches
Public Member Functions | List of all members
orcus::spreadsheet::iface::import_auto_filter Class Referenceabstract

#include <import_interface.hpp>

Public Member Functions

virtual void set_range (const range_t &range)=0
 
virtual void set_column (col_t col)=0
 
virtual void append_column_match_value (std::string_view value)=0
 
virtual void commit_column ()=0
 
virtual void commit ()=0
 

Detailed Description

Interface for importing auto filters.

Importing a single auto filter would roughly follow the following flow:

import_auto_filter* iface = ... ;
range_t range;
range.first.column = 0;
range.first.row = 0;
range.last.column = 3;
range.last.row = 1000;
iface->set_range(range); // Auto filter is applied for A1:D1001.
// Column A is filtered for a value of "A".
iface->set_column(0);
iface->commit_column();
// Column D is filtered for values of 1 and 4.
iface->set_column(3);
iface->commit_column();
// Push the autofilter data in the current buffer to the sheet store.
iface->commit();
Definition import_interface.hpp:385
virtual void set_range(const range_t &range)=0
virtual void append_column_match_value(std::string_view value)=0
Definition types.hpp:600

Member Function Documentation

◆ append_column_match_value()

virtual void orcus::spreadsheet::iface::import_auto_filter::append_column_match_value ( std::string_view  value)
pure virtual

Append a match value to the current column filter. A single column filter may have one or more match values.

Parameters
valuematch value to append to the current column filter.

◆ commit()

virtual void orcus::spreadsheet::iface::import_auto_filter::commit ( )
pure virtual

Commit current auto filter data stored in the buffer to the sheet store.

◆ commit_column()

virtual void orcus::spreadsheet::iface::import_auto_filter::commit_column ( )
pure virtual

Commit the current column filter data to the current auto filter buffer. The implementor may clear the current column filter buffer after this call.

◆ set_column()

virtual void orcus::spreadsheet::iface::import_auto_filter::set_column ( col_t  col)
pure virtual

Specify the column position of a filter. The position is relative to the first column in the auto filter range. This method gets called at the beginning of each column filter data. The implementor may initialize the column filter data buffer when this method is called.

Note
This column position is relative to the first column in the autofilter range.
Parameters
col0-based column position of a filter relative to the first column of the auto filter range.

◆ set_range()

virtual void orcus::spreadsheet::iface::import_auto_filter::set_range ( const range_t range)
pure virtual

Specify the range where the auto filter is applied.

Parameters
rangestructure containing the top-left and bottom-right positions of the auto filter range.