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

A cell vector is a linear (1D) range of cells, either vertical or horizontal depending on the major order specified in the constructor. More...

#include <cell_vector.hpp>

Public Types

using iterator = cell_iterator
 Iterate over cells in a cell_vector with an iterator of this type. More...
 
using const_iterator = const_cell_iterator
 Iterate over const cells in a const cell_vector with an iterator of this type. More...
 
using reverse_iterator = std::reverse_iterator< iterator >
 Iterate over cells in a cell_vector in reverse oreder with an iterator of this type. More...
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 Iterate over const cells in a const cell_vector in reverse order with an iterator of this type. More...
 

Public Member Functions

 cell_vector (worksheet ws, const cell_reference &cursor, const range_reference &ref, major_order order, bool skip_null, bool wrap)
 Constructs a cell vector pointing to a given range in a given worksheet. order determines whether this vector is a row or a column. If skip_null is true, iterating over this vector will skip empty cells. More...
 
bool empty () const
 Returns true if every cell in this vector is null (i.e. the cell doesn't exist in the worksheet). More...
 
cell front ()
 Returns the first cell in this vector. More...
 
const cell front () const
 Returns the first cell in this vector. More...
 
cell back ()
 Returns the last cell in this vector. More...
 
const cell back () const
 Returns the last cell in this vector. More...
 
std::size_t length () const
 Returns the distance between the first and last cells in this vector. More...
 
iterator begin ()
 Returns an iterator to the first cell in this vector. More...
 
iterator end ()
 Returns an iterator to a cell one-past-the-end of this vector. More...
 
const_iterator begin () const
 Returns an iterator to the first cell in this vector. More...
 
const_iterator cbegin () const
 Returns an iterator to the first cell in this vector. More...
 
const_iterator end () const
 Returns an iterator to a cell one-past-the-end of this vector. More...
 
const_iterator cend () const
 Returns an iterator to a cell one-past-the-end of this vector. More...
 
reverse_iterator rbegin ()
 Returns a reverse iterator to the first cell of this reversed vector. More...
 
reverse_iterator rend ()
 Returns a reverse iterator to to a cell one-past-the-end of this reversed vector. More...
 
const_reverse_iterator rbegin () const
 Returns a reverse iterator to the first cell of this reversed vector. More...
 
const_reverse_iterator rend () const
 Returns a reverse iterator to to a cell one-past-the-end of this reversed vector. More...
 
const_reverse_iterator crbegin () const
 Returns a reverse iterator to the first cell of this reversed vector. More...
 
const_reverse_iterator crend () const
 Returns a reverse iterator to to a cell one-past-the-end of this reversed vector. More...
 
cell operator[] (std::size_t column_index)
 Returns the cell column_index distance away from the first cell in this vector. More...
 
const cell operator[] (std::size_t column_index) const
 Returns the cell column_index distance away from the first cell in this vector. More...
 

Detailed Description

A cell vector is a linear (1D) range of cells, either vertical or horizontal depending on the major order specified in the constructor.

Member Typedef Documentation

◆ const_iterator

Iterate over const cells in a const cell_vector with an iterator of this type.

◆ const_reverse_iterator

Iterate over const cells in a const cell_vector in reverse order with an iterator of this type.

◆ iterator

Iterate over cells in a cell_vector with an iterator of this type.

◆ reverse_iterator

using xlnt::cell_vector::reverse_iterator = std::reverse_iterator<iterator>

Iterate over cells in a cell_vector in reverse oreder with an iterator of this type.

Constructor & Destructor Documentation

◆ cell_vector()

xlnt::cell_vector::cell_vector ( worksheet  ws,
const cell_reference cursor,
const range_reference ref,
major_order  order,
bool  skip_null,
bool  wrap 
)

Constructs a cell vector pointing to a given range in a given worksheet. order determines whether this vector is a row or a column. If skip_null is true, iterating over this vector will skip empty cells.

Member Function Documentation

◆ back() [1/2]

cell xlnt::cell_vector::back ( )

Returns the last cell in this vector.

◆ back() [2/2]

const cell xlnt::cell_vector::back ( ) const

Returns the last cell in this vector.

◆ begin() [1/2]

iterator xlnt::cell_vector::begin ( )

Returns an iterator to the first cell in this vector.

◆ begin() [2/2]

const_iterator xlnt::cell_vector::begin ( ) const

Returns an iterator to the first cell in this vector.

◆ cbegin()

const_iterator xlnt::cell_vector::cbegin ( ) const

Returns an iterator to the first cell in this vector.

◆ cend()

const_iterator xlnt::cell_vector::cend ( ) const

Returns an iterator to a cell one-past-the-end of this vector.

◆ crbegin()

const_reverse_iterator xlnt::cell_vector::crbegin ( ) const

Returns a reverse iterator to the first cell of this reversed vector.

◆ crend()

const_reverse_iterator xlnt::cell_vector::crend ( ) const

Returns a reverse iterator to to a cell one-past-the-end of this reversed vector.

◆ empty()

bool xlnt::cell_vector::empty ( ) const

Returns true if every cell in this vector is null (i.e. the cell doesn't exist in the worksheet).

◆ end() [1/2]

iterator xlnt::cell_vector::end ( )

Returns an iterator to a cell one-past-the-end of this vector.

◆ end() [2/2]

const_iterator xlnt::cell_vector::end ( ) const

Returns an iterator to a cell one-past-the-end of this vector.

◆ front() [1/2]

cell xlnt::cell_vector::front ( )

Returns the first cell in this vector.

◆ front() [2/2]

const cell xlnt::cell_vector::front ( ) const

Returns the first cell in this vector.

◆ length()

std::size_t xlnt::cell_vector::length ( ) const

Returns the distance between the first and last cells in this vector.

◆ operator[]() [1/2]

cell xlnt::cell_vector::operator[] ( std::size_t  column_index)

Returns the cell column_index distance away from the first cell in this vector.

◆ operator[]() [2/2]

const cell xlnt::cell_vector::operator[] ( std::size_t  column_index) const

Returns the cell column_index distance away from the first cell in this vector.

◆ rbegin() [1/2]

reverse_iterator xlnt::cell_vector::rbegin ( )

Returns a reverse iterator to the first cell of this reversed vector.

◆ rbegin() [2/2]

const_reverse_iterator xlnt::cell_vector::rbegin ( ) const

Returns a reverse iterator to the first cell of this reversed vector.

◆ rend() [1/2]

reverse_iterator xlnt::cell_vector::rend ( )

Returns a reverse iterator to to a cell one-past-the-end of this reversed vector.

◆ rend() [2/2]

const_reverse_iterator xlnt::cell_vector::rend ( ) const

Returns a reverse iterator to to a cell one-past-the-end of this reversed vector.


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