xlnt
Public Types | Public Member Functions | List of all members
xlnt::const_cell_iterator Class Reference

A cell iterator iterates over a 1D range by row or by column. More...

#include <cell_iterator.hpp>

Public Types

using iterator_category = std::bidirectional_iterator_tag
 iterator tags required for use with standard algorithms and adapters More...
 
using value_type = const cell
 
using difference_type = std::ptrdiff_t
 
using pointer = const cell *
 
using reference = const cell
 

Public Member Functions

 const_cell_iterator ()=default
 Default constructs a cell_iterator More...
 
 const_cell_iterator (worksheet ws, const cell_reference &start_cell, const range_reference &limits, major_order order, bool skip_null, bool wrap)
 Constructs a cell_iterator from a worksheet, range, and iteration settings. More...
 
 const_cell_iterator (const const_cell_iterator &)=default
 Constructs a const_cell_iterator as a copy of an existing cell_iterator. More...
 
const_cell_iteratoroperator= (const const_cell_iterator &)=default
 Assigns this iterator to match the data in rhs. More...
 
 const_cell_iterator (const_cell_iterator &&)=default
 Constructs a const_cell_iterator by moving from a const_cell_iterator temporary More...
 
const_cell_iteratoroperator= (const_cell_iterator &&)=default
 Assigns this iterator to from a const_cell_iterator temporary More...
 
 ~const_cell_iterator ()=default
 destructor for const_cell_iterator More...
 
const reference operator* () const
 Dereferences this iterator to return the cell it points to. More...
 
bool operator== (const const_cell_iterator &other) const
 Returns true if this iterator is equivalent to other. More...
 
bool operator!= (const const_cell_iterator &other) const
 Returns true if this iterator isn't equivalent to other. More...
 
const_cell_iteratoroperator-- ()
 Pre-decrements the iterator to point to the previous cell and returns a reference to the iterator. More...
 
const_cell_iterator operator-- (int)
 Post-decrements the iterator to point to the previous cell and return a copy of the iterator before the decrement. More...
 
const_cell_iteratoroperator++ ()
 Pre-increments the iterator to point to the previous cell and returns a reference to the iterator. More...
 
const_cell_iterator operator++ (int)
 Post-increments the iterator to point to the previous cell and return a copy of the iterator before the decrement. More...
 
bool has_value () const
 When iterating over a range that doesn't ignore null cells, operator*() will throw when trying to access the cells that are null. This method checks the existence of a cell. More...
 

Detailed Description

A cell iterator iterates over a 1D range by row or by column.

Member Typedef Documentation

◆ iterator_category

using xlnt::const_cell_iterator::iterator_category = std::bidirectional_iterator_tag

iterator tags required for use with standard algorithms and adapters

Constructor & Destructor Documentation

◆ const_cell_iterator() [1/4]

xlnt::const_cell_iterator::const_cell_iterator ( )
default

Default constructs a cell_iterator

◆ const_cell_iterator() [2/4]

xlnt::const_cell_iterator::const_cell_iterator ( worksheet  ws,
const cell_reference start_cell,
const range_reference limits,
major_order  order,
bool  skip_null,
bool  wrap 
)

Constructs a cell_iterator from a worksheet, range, and iteration settings.

◆ const_cell_iterator() [3/4]

xlnt::const_cell_iterator::const_cell_iterator ( const const_cell_iterator )
default

Constructs a const_cell_iterator as a copy of an existing cell_iterator.

◆ const_cell_iterator() [4/4]

xlnt::const_cell_iterator::const_cell_iterator ( const_cell_iterator &&  )
default

Constructs a const_cell_iterator by moving from a const_cell_iterator temporary

◆ ~const_cell_iterator()

xlnt::const_cell_iterator::~const_cell_iterator ( )
default

destructor for const_cell_iterator

Member Function Documentation

◆ has_value()

bool xlnt::const_cell_iterator::has_value ( ) const

When iterating over a range that doesn't ignore null cells, operator*() will throw when trying to access the cells that are null. This method checks the existence of a cell.

◆ operator!=()

bool xlnt::const_cell_iterator::operator!= ( const const_cell_iterator other) const

Returns true if this iterator isn't equivalent to other.

◆ operator*()

const reference xlnt::const_cell_iterator::operator* ( ) const

Dereferences this iterator to return the cell it points to.

◆ operator++() [1/2]

const_cell_iterator& xlnt::const_cell_iterator::operator++ ( )

Pre-increments the iterator to point to the previous cell and returns a reference to the iterator.

◆ operator++() [2/2]

const_cell_iterator xlnt::const_cell_iterator::operator++ ( int  )

Post-increments the iterator to point to the previous cell and return a copy of the iterator before the decrement.

◆ operator--() [1/2]

const_cell_iterator& xlnt::const_cell_iterator::operator-- ( )

Pre-decrements the iterator to point to the previous cell and returns a reference to the iterator.

◆ operator--() [2/2]

const_cell_iterator xlnt::const_cell_iterator::operator-- ( int  )

Post-decrements the iterator to point to the previous cell and return a copy of the iterator before the decrement.

◆ operator=() [1/2]

const_cell_iterator& xlnt::const_cell_iterator::operator= ( const const_cell_iterator )
default

Assigns this iterator to match the data in rhs.

◆ operator=() [2/2]

const_cell_iterator& xlnt::const_cell_iterator::operator= ( const_cell_iterator &&  )
default

Assigns this iterator to from a const_cell_iterator temporary

◆ operator==()

bool xlnt::const_cell_iterator::operator== ( const const_cell_iterator other) const

Returns true if this iterator is equivalent to other.


The documentation for this class was generated from the following file: