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

An iterator used by worksheet and range for traversing a 2D grid of cells by row/column then across that row/column. More...

#include <range_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 = cell_vector
 
using difference_type = std::ptrdiff_t
 
using pointer = cell_vector *
 
using reference = cell_vector
 

Public Member Functions

 range_iterator ()=default
 Default constructs a range iterator More...
 
 range_iterator (worksheet &ws, const cell_reference &cursor, const range_reference &bounds, major_order order, bool skip_null)
 Constructs a range iterator on a worksheet, cell pointing to the current row or column, range bounds, an order, and whether or not to skip null column/rows. More...
 
 range_iterator (const range_iterator &)=default
 Default copy constructor. More...
 
range_iteratoroperator= (const range_iterator &)=default
 Default assignment operator. More...
 
 range_iterator (range_iterator &&)=default
 Default move constructor. More...
 
range_iteratoroperator= (range_iterator &&)=default
 Default move assignment operator. More...
 
 ~range_iterator ()=default
 Default destructor More...
 
reference operator* ()
 Dereference the iterator to return a column or row. More...
 
const reference operator* () const
 Dereference the iterator to return a column or row. More...
 
bool operator== (const range_iterator &other) const
 Returns true if this iterator is equivalent to other. More...
 
bool operator!= (const range_iterator &other) const
 Returns true if this iterator is not equivalent to other. More...
 
range_iteratoroperator-- ()
 Pre-decrement the iterator to point to the previous row/column. More...
 
range_iterator operator-- (int)
 Post-decrement the iterator to point to the previous row/column. More...
 
range_iteratoroperator++ ()
 Pre-increment the iterator to point to the next row/column. More...
 
range_iterator operator++ (int)
 Post-increment the iterator to point to the next row/column. More...
 

Detailed Description

An iterator used by worksheet and range for traversing a 2D grid of cells by row/column then across that row/column.

Member Typedef Documentation

◆ iterator_category

using xlnt::range_iterator::iterator_category = std::bidirectional_iterator_tag

iterator tags required for use with standard algorithms and adapters

Constructor & Destructor Documentation

◆ range_iterator() [1/4]

xlnt::range_iterator::range_iterator ( )
default

Default constructs a range iterator

◆ range_iterator() [2/4]

xlnt::range_iterator::range_iterator ( worksheet ws,
const cell_reference cursor,
const range_reference bounds,
major_order  order,
bool  skip_null 
)

Constructs a range iterator on a worksheet, cell pointing to the current row or column, range bounds, an order, and whether or not to skip null column/rows.

◆ range_iterator() [3/4]

xlnt::range_iterator::range_iterator ( const range_iterator )
default

Default copy constructor.

◆ range_iterator() [4/4]

xlnt::range_iterator::range_iterator ( range_iterator &&  )
default

Default move constructor.

◆ ~range_iterator()

xlnt::range_iterator::~range_iterator ( )
default

Default destructor

Member Function Documentation

◆ operator!=()

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

Returns true if this iterator is not equivalent to other.

◆ operator*() [1/2]

reference xlnt::range_iterator::operator* ( )

Dereference the iterator to return a column or row.

◆ operator*() [2/2]

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

Dereference the iterator to return a column or row.

◆ operator++() [1/2]

range_iterator& xlnt::range_iterator::operator++ ( )

Pre-increment the iterator to point to the next row/column.

◆ operator++() [2/2]

range_iterator xlnt::range_iterator::operator++ ( int  )

Post-increment the iterator to point to the next row/column.

◆ operator--() [1/2]

range_iterator& xlnt::range_iterator::operator-- ( )

Pre-decrement the iterator to point to the previous row/column.

◆ operator--() [2/2]

range_iterator xlnt::range_iterator::operator-- ( int  )

Post-decrement the iterator to point to the previous row/column.

◆ operator=() [1/2]

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

Default assignment operator.

◆ operator=() [2/2]

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

Default move assignment operator.

◆ operator==()

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

Returns true if this iterator is equivalent to other.


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