OpenXLSX 1.9.1
Loading...
Searching...
No Matches
OpenXLSX::XLCellIterator Class Reference

A forward iterator for iterating over a range of cells. More...

#include <XLCellIterator.hpp>

Public Types

enum class  CellStatus : uint8_t { NotLoaded = 0 , NoSuchCell = 1 , Loaded = 2 }
 
using iterator_category = std::forward_iterator_tag
 
using value_type = XLCell
 
using difference_type = int64_t
 
using pointer = XLCell *
 
using reference = XLCell &
 

Public Member Functions

 XLCellIterator (const XLCellRange &cellRange, XLIteratorLocation loc, std::vector< XLStyleIndex > const *colStyles)
 
 ~XLCellIterator ()=default
 
 XLCellIterator (const XLCellIterator &other)=default
 
 XLCellIterator (XLCellIterator &&other) noexcept=default
 
XLCellIteratoroperator= (const XLCellIterator &other)=default
 
XLCellIteratoroperator= (XLCellIterator &&other) noexcept=default
 
XLCellIteratoroperator++ ()
 
XLCellIterator operator++ (int)
 
reference operator* ()
 
pointer operator-> ()
 
bool operator== (const XLCellIterator &rhs) const noexcept
 
bool operator!= (const XLCellIterator &rhs) const noexcept
 
bool cellExists () const
 
bool endReached () const noexcept
 
uint64_t distance (const XLCellIterator &last) const
 
std::string address () const
 

Detailed Description

A forward iterator for iterating over a range of cells.

The iterator performs lazy-loading of cells to minimize XML overhead.

Member Typedef Documentation

◆ difference_type

◆ iterator_category

using OpenXLSX::XLCellIterator::iterator_category = std::forward_iterator_tag

◆ pointer

◆ reference

◆ value_type

Member Enumeration Documentation

◆ CellStatus

enum class OpenXLSX::XLCellIterator::CellStatus : uint8_t
strong
Enumerator
NotLoaded 
NoSuchCell 
Loaded 

Constructor & Destructor Documentation

◆ XLCellIterator() [1/3]

XLCellIterator::XLCellIterator ( const XLCellRange cellRange,
XLIteratorLocation  loc,
std::vector< XLStyleIndex > const *  colStyles 
)
explicit
Parameters
colStylesVector of column styles used to initialize newly created cells.

◆ ~XLCellIterator()

OpenXLSX::XLCellIterator::~XLCellIterator ( )
default

◆ XLCellIterator() [2/3]

OpenXLSX::XLCellIterator::XLCellIterator ( const XLCellIterator other)
default

◆ XLCellIterator() [3/3]

OpenXLSX::XLCellIterator::XLCellIterator ( XLCellIterator &&  other)
defaultnoexcept

Member Function Documentation

◆ address()

std::string XLCellIterator::address ( ) const
Returns
The A1-style address of the current cell.

◆ cellExists()

bool XLCellIterator::cellExists ( ) const
Returns
true if the cell exists in the XML structure.

◆ distance()

uint64_t XLCellIterator::distance ( const XLCellIterator last) const
Returns
The number of cells between this iterator and 'last'.

◆ endReached()

bool OpenXLSX::XLCellIterator::endReached ( ) const
inlinenoexcept
Returns
true if the iterator has moved past the last cell in the range.

◆ operator!=()

bool XLCellIterator::operator!= ( const XLCellIterator rhs) const
noexcept

◆ operator*()

XLCell & XLCellIterator::operator* ( )

◆ operator++() [1/2]

XLCellIterator & XLCellIterator::operator++ ( )

◆ operator++() [2/2]

XLCellIterator XLCellIterator::operator++ ( int  )

◆ operator->()

XLCellIterator::pointer XLCellIterator::operator-> ( )

◆ operator=() [1/2]

XLCellIterator & OpenXLSX::XLCellIterator::operator= ( const XLCellIterator other)
default

◆ operator=() [2/2]

XLCellIterator & OpenXLSX::XLCellIterator::operator= ( XLCellIterator &&  other)
defaultnoexcept

◆ operator==()

bool XLCellIterator::operator== ( const XLCellIterator rhs) const
noexcept

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