MIRA
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
Colormap::iterator Class Reference

Iterator that can iterate over the whole color colormap similar to STL iterators on containers. More...

#include <image/Colormap.h>

Public Types

typedef Color::RGB value_type
 
typedef int difference_type
 
typedef const Color::RGBpointer
 
typedef const Color::RGBreference
 
typedef std::bidirectional_iterator_tag iterator_category
 

Public Member Functions

 iterator ()
 
 iterator (const iterator &other)
 
iteratoroperator++ ()
 advance the iterator More...
 
iterator operator++ (int)
 advance the iterator More...
 
iteratoroperator-- ()
 go to previous color More...
 
iterator operator-- (int)
 go to previous color More...
 
bool operator== (const iterator &other)
 
bool operator!= (const iterator &other)
 
reference operator* () const
 Dereference to the color, the iterator is pointing to. More...
 
pointer operator-> () const
 Dereference to the color, the iterator is pointing to. More...
 

Protected Member Functions

 iterator (const Colormap *colormap, std::size_t position)
 

Friends

class Colormap
 

Detailed Description

Iterator that can iterate over the whole color colormap similar to STL iterators on containers.

Each iterator points to a certain color in the colormap.

Member Typedef Documentation

◆ value_type

◆ difference_type

typedef int difference_type

◆ pointer

typedef const Color::RGB* pointer

◆ reference

typedef const Color::RGB& reference

◆ iterator_category

typedef std::bidirectional_iterator_tag iterator_category

Constructor & Destructor Documentation

◆ iterator() [1/3]

iterator ( const Colormap colormap,
std::size_t  position 
)
inlineprotected

◆ iterator() [2/3]

iterator ( )
inline

◆ iterator() [3/3]

iterator ( const iterator other)
inline

Member Function Documentation

◆ operator++() [1/2]

iterator& operator++ ( )
inline

advance the iterator

◆ operator++() [2/2]

iterator operator++ ( int  )
inline

advance the iterator

◆ operator--() [1/2]

iterator& operator-- ( )
inline

go to previous color

◆ operator--() [2/2]

iterator operator-- ( int  )
inline

go to previous color

◆ operator==()

bool operator== ( const iterator other)
inline

◆ operator!=()

bool operator!= ( const iterator other)
inline

◆ operator*()

reference operator* ( ) const
inline

Dereference to the color, the iterator is pointing to.

◆ operator->()

pointer operator-> ( ) const
inline

Dereference to the color, the iterator is pointing to.

Friends And Related Function Documentation

◆ Colormap

friend class Colormap
friend

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