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

An iterator which is used to iterate over the worksheets in a const workbook. More...

#include <worksheet_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 worksheet
 
using difference_type = std::ptrdiff_t
 
using pointer = const worksheet *
 
using reference = const worksheet
 

Public Member Functions

 const_worksheet_iterator ()=default
 Default Constructs a worksheet iterator More...
 
 const_worksheet_iterator (const workbook &wb, std::size_t index)
 Constructs a worksheet iterator from a workbook and sheet index. More...
 
 const_worksheet_iterator (const const_worksheet_iterator &)=default
 Copy constructs a worksheet iterator from another iterator. More...
 
const_worksheet_iteratoroperator= (const const_worksheet_iterator &)=default
 Copy assigns the iterator so that it points to the same worksheet in the same workbook. More...
 
 const_worksheet_iterator (const_worksheet_iterator &&)=default
 Move constructs a worksheet iterator from a temporary iterator. More...
 
const_worksheet_iteratoroperator= (const_worksheet_iterator &&)=default
 Move assigns the iterator from a temporary iterator More...
 
 ~const_worksheet_iterator ()=default
 Default destructor More...
 
const reference operator* () const
 Dereferences the iterator to return the worksheet it is pointing to. If the iterator points to one-past-the-end of the workbook, an invalid_parameter exception will be thrown. More...
 
bool operator== (const const_worksheet_iterator &comparand) const
 Returns true if this iterator points to the same worksheet as comparand. More...
 
bool operator!= (const const_worksheet_iterator &comparand) const
 Returns true if this iterator doesn't point to the same worksheet as comparand. More...
 
const_worksheet_iterator operator++ (int)
 Post-increment the iterator's internal workseet index. Returns a copy of the iterator as it was before being incremented. More...
 
const_worksheet_iteratoroperator++ ()
 Pre-increment the iterator's internal workseet index. Returns a refernce to the same iterator. More...
 
const_worksheet_iterator operator-- (int)
 Post-decrement the iterator's internal workseet index. Returns a copy of the iterator as it was before being incremented. More...
 
const_worksheet_iteratoroperator-- ()
 Pre-decrement the iterator's internal workseet index. Returns a refernce to the same iterator. More...
 

Detailed Description

An iterator which is used to iterate over the worksheets in a const workbook.

Member Typedef Documentation

◆ iterator_category

using xlnt::const_worksheet_iterator::iterator_category = std::bidirectional_iterator_tag

iterator tags required for use with standard algorithms and adapters

Constructor & Destructor Documentation

◆ const_worksheet_iterator() [1/4]

xlnt::const_worksheet_iterator::const_worksheet_iterator ( )
default

Default Constructs a worksheet iterator

◆ const_worksheet_iterator() [2/4]

xlnt::const_worksheet_iterator::const_worksheet_iterator ( const workbook wb,
std::size_t  index 
)

Constructs a worksheet iterator from a workbook and sheet index.

◆ const_worksheet_iterator() [3/4]

xlnt::const_worksheet_iterator::const_worksheet_iterator ( const const_worksheet_iterator )
default

Copy constructs a worksheet iterator from another iterator.

◆ const_worksheet_iterator() [4/4]

xlnt::const_worksheet_iterator::const_worksheet_iterator ( const_worksheet_iterator &&  )
default

Move constructs a worksheet iterator from a temporary iterator.

◆ ~const_worksheet_iterator()

xlnt::const_worksheet_iterator::~const_worksheet_iterator ( )
default

Default destructor

Member Function Documentation

◆ operator!=()

bool xlnt::const_worksheet_iterator::operator!= ( const const_worksheet_iterator comparand) const

Returns true if this iterator doesn't point to the same worksheet as comparand.

◆ operator*()

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

Dereferences the iterator to return the worksheet it is pointing to. If the iterator points to one-past-the-end of the workbook, an invalid_parameter exception will be thrown.

◆ operator++() [1/2]

const_worksheet_iterator xlnt::const_worksheet_iterator::operator++ ( int  )

Post-increment the iterator's internal workseet index. Returns a copy of the iterator as it was before being incremented.

◆ operator++() [2/2]

const_worksheet_iterator& xlnt::const_worksheet_iterator::operator++ ( )

Pre-increment the iterator's internal workseet index. Returns a refernce to the same iterator.

◆ operator--() [1/2]

const_worksheet_iterator xlnt::const_worksheet_iterator::operator-- ( int  )

Post-decrement the iterator's internal workseet index. Returns a copy of the iterator as it was before being incremented.

◆ operator--() [2/2]

const_worksheet_iterator& xlnt::const_worksheet_iterator::operator-- ( )

Pre-decrement the iterator's internal workseet index. Returns a refernce to the same iterator.

◆ operator=() [1/2]

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

Copy assigns the iterator so that it points to the same worksheet in the same workbook.

◆ operator=() [2/2]

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

Move assigns the iterator from a temporary iterator

◆ operator==()

bool xlnt::const_worksheet_iterator::operator== ( const const_worksheet_iterator comparand) const

Returns true if this iterator points to the same worksheet as comparand.


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