OpenXLSX 1.12.1
Modern C++ Excel Library (Fork of OpenXLSX by Kenneth Troldal Balslev)
Loading...
Searching...
No Matches
std::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 (const XLCellIterator &other)=default
 XLCellIterator (XLCellIterator &&other) noexcept=default
 ~XLCellIterator ()=default
XLCellIterator & operator= (const XLCellIterator &other)=default
XLCellIterator & operator= (XLCellIterator &&other) noexcept=default
XLCellIterator & operator++ ()
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() [2/3]

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

◆ XLCellIterator() [3/3]

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

◆ ~XLCellIterator()

OpenXLSX::XLCellIterator::~XLCellIterator ( )
default

Member Function Documentation

◆ address()

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

◆ cellExists()

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

◆ distance()

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

◆ endReached()

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

◆ operator!=()

bool XLCellIterator::operator!= ( const XLCellIterator & rhs) const
nodiscardnoexcept

◆ operator*()

XLCell & XLCellIterator::operator* ( )
nodiscard

◆ operator++() [1/2]

XLCellIterator & XLCellIterator::operator++ ( )

◆ operator++() [2/2]

XLCellIterator XLCellIterator::operator++ ( int )

◆ operator->()

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

◆ 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
nodiscardnoexcept

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