Gecode::Iter::Ranges::ToValues< I > Class Template Reference
Common functionality » Range and value iterators » Value iterators

Value iterator from range iterator. More...

`#include <ranges-values.hpp>`

## Protected Member Functions

void | start (void)
| Initialize iterator.

## Protected Attributes

I | i
| Range iterator used.
int | cur
| Current value.
int | max
| End of current range.

## Constructors and initialization

| ToValues (void)
| Default constructor.
| ToValues (I &i)
| Initialize with values from range iterator i.
void | init (I &i)
| Initialize with values from range iterator i.

## Iteration control

bool | operator() (void) const
| Test whether iterator is still at a value or done.
void | operator++ (void)
| Move iterator to next value (if possible).

## Value access

int | val (void) const
| Return current value.

## Detailed Description

template<class I>
class Gecode::Iter::Ranges::ToValues< I >

Value iterator from range iterator.

Definition at line 42 of file ranges-values.hpp.

## Constructor & Destructor Documentation

## ToValues() [1/2]

template<class I>

Gecode::Iter::Ranges::ToValues< I >::ToValues | ( | void |  | ) |

inline

Default constructor.

Definition at line 82 of file ranges-values.hpp.

## ToValues() [2/2]

template<class I>

Gecode::Iter::Ranges::ToValues< I >::ToValues | ( | I & | i | ) |

inline

Initialize with values from range iterator i.

Definition at line 96 of file ranges-values.hpp.

## Member Function Documentation

## start()

template<class I>

void Gecode::Iter::Ranges::ToValues< I >::start | ( | void |  | ) |

inline protected

Initialize iterator.

Definition at line 86 of file ranges-values.hpp.

## init()

template<class I>

void Gecode::Iter::Ranges::ToValues< I >::init | ( | I & | i | ) |

inline

Initialize with values from range iterator i.

Definition at line 103 of file ranges-values.hpp.

## operator()()

template<class I>

bool Gecode::Iter::Ranges::ToValues< I >::operator() | ( | void |  | ) | const

inline

Test whether iterator is still at a value or done.

Definition at line 111 of file ranges-values.hpp.

## operator++()

template<class I>

void Gecode::Iter::Ranges::ToValues< I >::operator++ | ( | void |  | ) |

inline

Move iterator to next value (if possible).

Definition at line 117 of file ranges-values.hpp.

## val()

template<class I>

int Gecode::Iter::Ranges::ToValues< I >::val | ( | void |  | ) | const

inline

Return current value.

Definition at line 129 of file ranges-values.hpp.

## Member Data Documentation

## i

template<class I>

I Gecode::Iter::Ranges::ToValues< I >::i

protected

Range iterator used.

Definition at line 45 of file ranges-values.hpp.

## cur

template<class I>

int Gecode::Iter::Ranges::ToValues< I >::cur

protected

Current value.

Definition at line 47 of file ranges-values.hpp.

## max

template<class I>

int Gecode::Iter::Ranges::ToValues< I >::max

protected

End of current range.

Definition at line 49 of file ranges-values.hpp.

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

- gecode/iter/ranges-values.hpp