Volume Cartographer 2.27.0
|
#include <vc/core/util/Iteration.hpp>
Classes | |
class | EnumerateIterator |
Public Types | |
using | iterator = EnumerateIterator< IteratorType > |
using | const_iterator = EnumerateIterator< const IteratorType > |
Public Member Functions | |
iterator | begin () const |
iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
Private Types | |
using | IteratorType = decltype(std::begin(std::declval< Iterable >())) |
Private Member Functions | |
EnumerateIterable (Iterable &&container) | |
template<typename... Args> | |
EnumerateIterable (Args &&... args) | |
Private Attributes | |
Iterable | container_ |
Friends | |
auto | enumerate (Iterable &&it) |
Wrap an Iterable into a new one whose iterators return an [index, value] pair. More... | |
template<typename... Args> | |
EnumerateIterable< std::vector< std::common_type_t< Args... > > > | enumerate (Args &&... args) |
Wrap an Iterable into a new one whose iterators return an [index, value] pair. More... | |
Iterable wrapper for enumerating elements of a container by index and value
Use volcart::enumerate, which provides a convenient method for constructing an EnumerateIterable.
Definition at line 401 of file Iteration.hpp.
using volcart::EnumerateIterable< Iterable >::const_iterator = EnumerateIterator<const IteratorType> |
Definition at line 472 of file Iteration.hpp.
using volcart::EnumerateIterable< Iterable >::iterator = EnumerateIterator<IteratorType> |
Definition at line 471 of file Iteration.hpp.
|
private |
Definition at line 452 of file Iteration.hpp.
|
inlineprivate |
Definition at line 454 of file Iteration.hpp.
|
inlineprivate |
Definition at line 460 of file Iteration.hpp.
|
inline |
Get a new EnumerateIterable::iterator
Definition at line 475 of file Iteration.hpp.
|
inline |
Get a new ProgressIterable::const_iterator
Definition at line 481 of file Iteration.hpp.
|
inline |
Get the end-valued ProgressIterable::const_iterator
Definition at line 487 of file Iteration.hpp.
|
inline |
Get the end-valued EnumerateIterable::iterator
Definition at line 478 of file Iteration.hpp.
|
friend |
Wrap an Iterable into a new one whose iterators return an [index, value] pair.
This is an overload for lists of arguments:
Definition at line 549 of file Iteration.hpp.
|
friend |
Wrap an Iterable into a new one whose iterators return an [index, value] pair.
This roughly approximates the functionality of Python's enumerate function.
Iterable | Iterable container class. Iterable::iterator must meet LegacyIterator requirements |
it | Object of type Iterable |
Definition at line 527 of file Iteration.hpp.
|
private |
Definition at line 493 of file Iteration.hpp.