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

An iterator which is used to iterate over the worksheets in a 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 = worksheet
 
using difference_type = std::ptrdiff_t
 
using pointer = worksheet *
 
using reference = worksheet
 

Public Member Functions

 worksheet_iterator ()=default
 Default Constructs a worksheet iterator More...
 
 worksheet_iterator (workbook &wb, std::size_t index)
 Constructs a worksheet iterator from a workbook and sheet index. More...
 
 worksheet_iterator (const worksheet_iterator &)=default
 Copy constructs a worksheet iterator from another iterator. More...
 
worksheet_iteratoroperator= (const worksheet_iterator &)=default
 Copy assigns the iterator so that it points to the same worksheet in the same workbook. More...
 
 worksheet_iterator (worksheet_iterator &&)=default
 Move constructs a worksheet iterator from a temporary iterator. More...
 
worksheet_iteratoroperator= (worksheet_iterator &&)=default
 Move assign the iterator from a temporary iterator More...
 
 ~worksheet_iterator ()=default
 Default destructor More...
 
reference operator* ()
 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...
 
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 worksheet_iterator &comparand) const
 Returns true if this iterator points to the same worksheet as comparand. More...
 
bool operator!= (const worksheet_iterator &comparand) const
 Returns true if this iterator doesn't point to the same worksheet as comparand. More...
 
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...
 
worksheet_iteratoroperator++ ()
 Pre-increment the iterator's internal workseet index. Returns a refernce to the same iterator. More...
 
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...
 
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 workbook.

Member Typedef Documentation

◆ iterator_category

using xlnt::worksheet_iterator::iterator_category = std::bidirectional_iterator_tag

iterator tags required for use with standard algorithms and adapters

Constructor & Destructor Documentation

◆ worksheet_iterator() [1/4]

xlnt::worksheet_iterator::worksheet_iterator ( )
default

Default Constructs a worksheet iterator

◆ worksheet_iterator() [2/4]

xlnt::worksheet_iterator::worksheet_iterator ( workbook wb,
std::size_t  index 
)

Constructs a worksheet iterator from a workbook and sheet index.

◆ worksheet_iterator() [3/4]

xlnt::worksheet_iterator::worksheet_iterator ( const worksheet_iterator )
default

Copy constructs a worksheet iterator from another iterator.

◆ worksheet_iterator() [4/4]

xlnt::worksheet_iterator::worksheet_iterator ( worksheet_iterator &&  )
default

Move constructs a worksheet iterator from a temporary iterator.

◆ ~worksheet_iterator()

xlnt::worksheet_iterator::~worksheet_iterator ( )
default

Default destructor

Member Function Documentation

◆ operator!=()

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

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

◆ operator*() [1/2]

reference xlnt::worksheet_iterator::operator* ( )

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*() [2/2]

const reference xlnt::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]

worksheet_iterator xlnt::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]

worksheet_iterator& xlnt::worksheet_iterator::operator++ ( )

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

◆ operator--() [1/2]

worksheet_iterator xlnt::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]

worksheet_iterator& xlnt::worksheet_iterator::operator-- ( )

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

◆ operator=() [1/2]

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

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

◆ operator=() [2/2]

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

Move assign the iterator from a temporary iterator

◆ operator==()

bool xlnt::worksheet_iterator::operator== ( 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: