JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches

iterator over the data in the column of a JKQTPDatastore More...

#include <jkqtpdatastorage.h>

Collaboration diagram for JKQTPColumnConstIterator:
[legend]

Public Types

typedef reference const_reference
 
typedef int difference_type
 
typedef std::forward_iterator_tag iterator_category
 
typedef const double * pointer
 
typedef const double & reference
 
typedef JKQTPColumnConstIterator self_type
 
typedef double value_type
 

Public Member Functions

 JKQTPColumnConstIterator ()
 constructs an invalid iterator
 
 JKQTPColumnConstIterator (const JKQTPColumnConstIterator &)=default
 
 JKQTPColumnConstIterator (const JKQTPColumnIterator &rhs)
 
 JKQTPColumnConstIterator (JKQTPColumnConstIterator &&)=default
 
 JKQTPColumnConstIterator (JKQTPColumnIterator &&rhs)
 
size_t getImageColumns () const
 if the data in the column is interpreted as an image, this is the number of columns (x-dimension) of the image
 
QPoint getImagePosition () const
 returns the referenced position/row interpreted as an image pixel, returns (-1,-1) for an invalid operator
 
int getImagePositionX () const
 returns the referenced position/row interpreted as an image pixel, x-component, returns -1 for an invalid operator
 
int getImagePositionY () const
 returns the referenced position/row interpreted as an image pixel, y-component, returns -1 for an invalid operator
 
size_t getImageRows () const
 if the data in the column is interpreted as an image, this is the number of rows (y-dimension) of the image
 
int getPosition () const
 returns the referenced position/row, or -1 for an invalid iterator
 
bool isValid () const
 checks the iterator for validity (i.e. points to an existing column and position is in a valid range)
 
 operator bool () const
 checks the iterator for validity (i.e. points to an existing column and position is in a valid range)
 
bool operator!= (const self_type &rhs) const
 comparison operator (unequals), inverse result of operator==()
 
reference operator* ()
 dereferences the iterator, throws an exception if the iterator is invalid (see isValid() ) or the value does not exist in the column
 
const_reference operator* () const
 dereferences the iterator, throws an exception if the iterator is invalid (see isValid() ) or the value does not exist in the column
 
self_type operator+ (difference_type rhs) const
 
self_type operator++ ()
 
self_type operator++ (int)
 
self_type operator+= (int inc)
 
self_type operator- (difference_type rhs) const
 
difference_type operator- (self_type rhs) const
 
self_type operator-- ()
 
self_type operator-- (int)
 
self_type operator-= (int dec)
 
bool operator< (const self_type &rhs) const
 comparison operator (less than)
 
bool operator<= (const self_type &rhs) const
 comparison operator (less than, or equal)
 
JKQTPColumnConstIteratoroperator= (const JKQTPColumnConstIterator &)=default
 
JKQTPColumnConstIteratoroperator= (const JKQTPColumnIterator &rhs)
 
JKQTPColumnConstIteratoroperator= (JKQTPColumnConstIterator &&)=default
 
JKQTPColumnConstIteratoroperator= (JKQTPColumnIterator &&rhs)
 
bool operator== (const self_type &rhs) const
 comparison operator (equals)
 
bool operator> (const self_type &rhs) const
 comparison operator (larger than)
 
bool operator>= (const self_type &rhs) const
 comparison operator (larger than, or equal)
 
reference operator[] (difference_type off) const
 

Protected Member Functions

 JKQTPColumnConstIterator (const JKQTPColumn *col, int startpos=0)
 constructs an iterator for the data represented by col, starting with row startpos
 
const JKQTPColumngetColumn () const
 returns the referenced column
 

Private Attributes

const JKQTPColumncol_
 references the column this iterator iterates over
 
int pos_
 current row in col_ this iterator points to
 

Friends

class JKQTPColumn
 
class JKQTPDatastore
 
self_type operator+ (difference_type off, const self_type &right)
 
self_type operator- (difference_type off, const self_type &right)
 

Detailed Description

Member Typedef Documentation

◆ const_reference

◆ difference_type

◆ iterator_category

typedef std::forward_iterator_tag JKQTPColumnConstIterator::iterator_category

◆ pointer

typedef const double* JKQTPColumnConstIterator::pointer

◆ reference

typedef const double& JKQTPColumnConstIterator::reference

◆ self_type

◆ value_type

Constructor & Destructor Documentation

◆ JKQTPColumnConstIterator() [1/6]

JKQTPColumnConstIterator::JKQTPColumnConstIterator ( const JKQTPColumn col,
int  startpos = 0 
)
inlineprotected

constructs an iterator for the data represented by col, starting with row startpos

◆ JKQTPColumnConstIterator() [2/6]

JKQTPColumnConstIterator::JKQTPColumnConstIterator ( )
inline

constructs an invalid iterator

◆ JKQTPColumnConstIterator() [3/6]

JKQTPColumnConstIterator::JKQTPColumnConstIterator ( const JKQTPColumnConstIterator )
inlinedefault

◆ JKQTPColumnConstIterator() [4/6]

JKQTPColumnConstIterator::JKQTPColumnConstIterator ( JKQTPColumnConstIterator &&  )
inlinedefault

◆ JKQTPColumnConstIterator() [5/6]

JKQTPColumnConstIterator::JKQTPColumnConstIterator ( const JKQTPColumnIterator rhs)
inline

◆ JKQTPColumnConstIterator() [6/6]

JKQTPColumnConstIterator::JKQTPColumnConstIterator ( JKQTPColumnIterator &&  rhs)
inline

Member Function Documentation

◆ getColumn()

const JKQTPColumn * JKQTPColumnConstIterator::getColumn ( ) const
inlineprotected

returns the referenced column

◆ getImageColumns()

size_t JKQTPColumnConstIterator::getImageColumns ( ) const
inline

if the data in the column is interpreted as an image, this is the number of columns (x-dimension) of the image

See also
JKQTPColumn::imageColumns

◆ getImagePosition()

QPoint JKQTPColumnConstIterator::getImagePosition ( ) const
inline

returns the referenced position/row interpreted as an image pixel, returns (-1,-1) for an invalid operator

◆ getImagePositionX()

int JKQTPColumnConstIterator::getImagePositionX ( ) const
inline

returns the referenced position/row interpreted as an image pixel, x-component, returns -1 for an invalid operator

◆ getImagePositionY()

int JKQTPColumnConstIterator::getImagePositionY ( ) const
inline

returns the referenced position/row interpreted as an image pixel, y-component, returns -1 for an invalid operator

◆ getImageRows()

size_t JKQTPColumnConstIterator::getImageRows ( ) const
inline

if the data in the column is interpreted as an image, this is the number of rows (y-dimension) of the image

See also
JKQTPColumn::imageColumns

◆ getPosition()

int JKQTPColumnConstIterator::getPosition ( ) const
inline

returns the referenced position/row, or -1 for an invalid iterator

◆ isValid()

bool JKQTPColumnConstIterator::isValid ( ) const
inline

checks the iterator for validity (i.e. points to an existing column and position is in a valid range)

◆ operator bool()

JKQTPColumnConstIterator::operator bool ( ) const
inline

checks the iterator for validity (i.e. points to an existing column and position is in a valid range)

◆ operator!=()

bool JKQTPColumnConstIterator::operator!= ( const self_type rhs) const
inline

comparison operator (unequals), inverse result of operator==()

See also
operator==()

◆ operator*() [1/2]

reference JKQTPColumnConstIterator::operator* ( )
inline

dereferences the iterator, throws an exception if the iterator is invalid (see isValid() ) or the value does not exist in the column

◆ operator*() [2/2]

const_reference JKQTPColumnConstIterator::operator* ( ) const
inline

dereferences the iterator, throws an exception if the iterator is invalid (see isValid() ) or the value does not exist in the column

◆ operator+()

self_type JKQTPColumnConstIterator::operator+ ( difference_type  rhs) const
inline

◆ operator++() [1/2]

self_type JKQTPColumnConstIterator::operator++ ( )
inline

◆ operator++() [2/2]

self_type JKQTPColumnConstIterator::operator++ ( int  )
inline

◆ operator+=()

self_type JKQTPColumnConstIterator::operator+= ( int  inc)
inline

◆ operator-() [1/2]

self_type JKQTPColumnConstIterator::operator- ( difference_type  rhs) const
inline

◆ operator-() [2/2]

difference_type JKQTPColumnConstIterator::operator- ( self_type  rhs) const
inline

◆ operator--() [1/2]

self_type JKQTPColumnConstIterator::operator-- ( )
inline

◆ operator--() [2/2]

self_type JKQTPColumnConstIterator::operator-- ( int  )
inline

◆ operator-=()

self_type JKQTPColumnConstIterator::operator-= ( int  dec)
inline

◆ operator<()

bool JKQTPColumnConstIterator::operator< ( const self_type rhs) const
inline

comparison operator (less than)

rules:

  • ivalid iterators are never smaller than valid operators
  • two valid operator must reference the same column
  • a valid operator is smaller than another, if it points to a pos_ before another
See also
operator<=(), operator>(), operator>=()

◆ operator<=()

bool JKQTPColumnConstIterator::operator<= ( const self_type rhs) const
inline

comparison operator (less than, or equal)

See also
operator==(), operator<(), operator>(), operator>=()

◆ operator=() [1/4]

JKQTPColumnConstIterator & JKQTPColumnConstIterator::operator= ( const JKQTPColumnConstIterator )
inlinedefault

◆ operator=() [2/4]

JKQTPColumnConstIterator & JKQTPColumnConstIterator::operator= ( const JKQTPColumnIterator rhs)
inline

◆ operator=() [3/4]

JKQTPColumnConstIterator & JKQTPColumnConstIterator::operator= ( JKQTPColumnConstIterator &&  )
inlinedefault

◆ operator=() [4/4]

JKQTPColumnConstIterator & JKQTPColumnConstIterator::operator= ( JKQTPColumnIterator &&  rhs)
inline

◆ operator==()

bool JKQTPColumnConstIterator::operator== ( const self_type rhs) const
inline

comparison operator (equals)

two iterators are equal, if:

  • they are both invalid (see isValid() )
  • they point to the same column and are both invalid (isValid()) or equal to end()
  • they point to the same column and the same row therein
See also
operator!=()

◆ operator>()

bool JKQTPColumnConstIterator::operator> ( const self_type rhs) const
inline

comparison operator (larger than)

rules:

  • ivalid iterators are always larger than valid operators
  • two valid operator must reference the same column
  • a valid operator is smaller than another, if it points to a pos_ before another
See also
operator<=(), operator<(), operator>=()

◆ operator>=()

bool JKQTPColumnConstIterator::operator>= ( const self_type rhs) const
inline

comparison operator (larger than, or equal)

See also
operator==(), operator<(), operator>(), operator<=()

◆ operator[]()

reference JKQTPColumnConstIterator::operator[] ( difference_type  off) const
inline

Friends And Related Symbol Documentation

◆ JKQTPColumn

friend class JKQTPColumn
friend

◆ JKQTPDatastore

friend class JKQTPDatastore
friend

◆ operator+

self_type operator+ ( difference_type  off,
const self_type right 
)
friend

◆ operator-

self_type operator- ( difference_type  off,
const self_type right 
)
friend

Member Data Documentation

◆ col_

const JKQTPColumn* JKQTPColumnConstIterator::col_
private

references the column this iterator iterates over

◆ pos_

int JKQTPColumnConstIterator::pos_
private

current row in col_ this iterator points to


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