App::Range Class Reference

The Range class is a spreadsheet range iterator. More...

#include <Range.h>

Public Member Functions

std::string address () const
 Current cell as a string. More...
 
int colCount () const
 Column count. More...
 
int column () const
 Current column. More...
 
CellAddress from () const
 Position of start of range. More...
 
std::string fromCellString () const
 Start of range as a string. More...
 
bool next ()
 
void normalize ()
 Make sure the range starts from top left and ends with bottom right corner. More...
 
CellAddress operator* () const
 
bool operator< (const Range &other) const
 
 Range (const CellAddress &from, const CellAddress &to, bool normalize=false)
 
 Range (const char *range, bool normalize=false)
 
 Range (int _row_begin, int _col_begin, int _row_end, int _col_end, bool normalize=false)
 
std::string rangeString () const
 The raneg as a string. More...
 
int row () const
 Current row. More...
 
int rowCount () const
 Row count. More...
 
int size () const
 Number of elements in range. More...
 
CellAddress to () const
 Position of end of range. More...
 
std::string toCellString () const
 End of range as a string. More...
 

Detailed Description

The Range class is a spreadsheet range iterator.

It takes a starting (row, col) and an ending (row, col). Notice that ranges are always at least one element. The next() functions is therefore used e.g as follows:

do { ... while (range.next());

Constructor & Destructor Documentation

◆ Range() [1/3]

Range::Range ( const char *  range,
bool  normalize = false 
)

◆ Range() [2/3]

Range::Range ( int  _row_begin,
int  _col_begin,
int  _row_end,
int  _col_end,
bool  normalize = false 
)

References normalize().

◆ Range() [3/3]

Range::Range ( const CellAddress from,
const CellAddress to,
bool  normalize = false 
)

References normalize().

Member Function Documentation

◆ address()

std::string App::Range::address ( ) const

Current cell as a string.

References App::CellAddress::toString().

Referenced by Spreadsheet::PropertySheet::setPathValue().

◆ colCount()

int App::Range::colCount ( ) const

◆ column()

int App::Range::column ( ) const

Current column.

◆ from()

CellAddress App::Range::from ( ) const

◆ fromCellString()

std::string App::Range::fromCellString ( ) const

Start of range as a string.

References App::CellAddress::toString().

◆ next()

bool Range::next ( )

◆ normalize()

void Range::normalize ( )

Make sure the range starts from top left and ends with bottom right corner.

Referenced by PathScripts.PathDressupLeadInOut.ObjectDressup::getLeadEnd(), PathScripts.PathDressupLeadInOut.ObjectDressup::getLeadStart(), and Range().

◆ operator*()

CellAddress App::Range::operator* ( ) const

◆ operator<()

bool App::Range::operator< ( const Range other) const

References from(), and to().

◆ rangeString()

std::string App::Range::rangeString ( ) const

The raneg as a string.

References App::CellAddress::toString().

◆ row()

int App::Range::row ( ) const

Current row.

◆ rowCount()

◆ size()

◆ to()

CellAddress App::Range::to ( ) const

Position of end of range.

Referenced by operator<(), Range(), and Spreadsheet::PropertySheet::setPathValue().

◆ toCellString()

std::string App::Range::toCellString ( ) const

End of range as a string.

References App::CellAddress::toString().


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