model_cell_range

Defined in header: <ixion/model_cell_range.hpp>

class model_cell_range

STL-compliant range over the cells of a sheet (or sub-range). Returned by model_context::iterate_cells. Supports range-for and STL/range algorithms via its nested const_iterator.

The caller has to ensure that the model content does not change for the duration of the iteration.

Public Functions

model_cell_range()
model_cell_range(const model_cell_range&) = delete
model_cell_range(model_cell_range &&other)
~model_cell_range()
model_cell_range &operator=(const model_cell_range&) = delete
model_cell_range &operator=(model_cell_range &&other)
const_iterator begin() const
sentinel end() const
const_iterator cbegin() const
sentinel cend() const

Friends

friend class detail::model_context_impl
struct cell

Public Types

using value_type = std::variant<bool, double, std::string_view, const formula_cell*>

Public Functions

cell()
cell(row_t _row, col_t _col)
cell(row_t _row, col_t _col, bool _b)
cell(row_t _row, col_t _col, const char *_s)
cell(row_t _row, col_t _col, std::string_view _s)
cell(row_t _row, col_t _col, double _v)
cell(row_t _row, col_t _col, const formula_cell *_f)
bool operator==(const cell &other) const

Public Members

row_t row
col_t col
cell_t type
value_type value
class const_iterator

Public Types

using iterator_category = std::input_iterator_tag
using value_type = cell
using difference_type = std::ptrdiff_t
using reference = const cell&
using pointer = const cell*

Public Functions

const_iterator()
const_iterator(const_iterator &&other)
const_iterator &operator=(const_iterator &&other)
~const_iterator()
const_iterator &operator++()
void operator++(int)
reference operator*() const
pointer operator->() const
bool operator==(const const_iterator &r) const
bool operator==(sentinel) const
struct sentinel

End sentinel to allow const_iterator to remain move-only while still satisfying std::sentinel_for etc.