![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "lib/iter-explorer.hpp"
Decorator for IterExplorer to group consecutive elements into fixed sized chunks. One group of elements is always prepared eagerly, and then the next one on iteration. The group is packaged into a std::array, returning a reference into the internal buffer. If there are leftover elements at the end of the source sequence, which are not sufficient to fill a full group, these can be retrieved through the special API getRestElms(), which returns an iterator.
Definition at line 892 of file iter-explorer.hpp.
Classes | |
| struct | Buffer |
Public Types | |
| using | value_type = Group |
| using | reference = Group & |
| using | pointer = Group * |
Public Member Functions | |
| Grouping ()=default | |
| Grouping (SRC &&dataSrc) | |
| auto | getGroupedElms () |
| Iterate over the Elements in the current group. | |
| auto | getRestElms () |
| Retrieve the tail elements produced by the source, which did not suffice to fill a full group. | |
| void | expandChildren () |
| refresh state when other layers manipulate the source sequence. | |
| bool | checkPoint () const |
| reference | yield () const |
| void | iterNext () |
Protected Types | |
| using | Group = std::array< RES, grp > |
| using | Iter = Group::iterator |
Protected Member Functions | |
| SRC & | srcIter () const |
| void | pullGroup () |
Protected Attributes | |
| Buffer | buff_ |
| uint | pos_ {0} |
Definition at line 919 of file iter-explorer.hpp.
References Grouping< SRC, RES, grp >::pullGroup().
Here is the call graph for this function:Definition at line 898 of file iter-explorer.hpp.
Definition at line 899 of file iter-explorer.hpp.
| using value_type = Group |
Definition at line 912 of file iter-explorer.hpp.
Definition at line 913 of file iter-explorer.hpp.
Definition at line 914 of file iter-explorer.hpp.
|
inline |
Iterate over the Elements in the current group.
Definition at line 931 of file iter-explorer.hpp.
References Grouping< SRC, RES, grp >::Buffer::begin(), Grouping< SRC, RES, grp >::buff_, Grouping< SRC, RES, grp >::Buffer::end(), and Grouping< SRC, RES, grp >::pos_.
Referenced by Grouping< SRC, RES, grp >::getRestElms().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Retrieve the tail elements produced by the source, which did not suffice to fill a full group.
Definition at line 945 of file iter-explorer.hpp.
References Grouping< SRC, RES, grp >::checkPoint(), and Grouping< SRC, RES, grp >::getGroupedElms().
Here is the call graph for this function:
|
inline |
refresh state when other layers manipulate the source sequence.
Definition at line 954 of file iter-explorer.hpp.
References Grouping< SRC, RES, grp >::pullGroup().
Here is the call graph for this function:
|
inline |
Definition at line 963 of file iter-explorer.hpp.
References Grouping< SRC, RES, grp >::pos_.
Referenced by Grouping< SRC, RES, grp >::getRestElms().
Here is the caller graph for this function:Definition at line 969 of file iter-explorer.hpp.
References Grouping< SRC, RES, grp >::buff_.
|
inline |
Definition at line 975 of file iter-explorer.hpp.
References Grouping< SRC, RES, grp >::pullGroup().
Here is the call graph for this function:
|
inlineprotected |
Definition at line 983 of file iter-explorer.hpp.
Referenced by Grouping< SRC, RES, grp >::pullGroup().
Here is the caller graph for this function:
|
inlineprotected |
Definition at line 991 of file iter-explorer.hpp.
References Grouping< SRC, RES, grp >::buff_, Grouping< SRC, RES, grp >::Buffer::group(), Grouping< SRC, RES, grp >::pos_, and Grouping< SRC, RES, grp >::srcIter().
Referenced by Grouping< SRC, RES, grp >::Grouping(), Grouping< SRC, RES, grp >::expandChildren(), and Grouping< SRC, RES, grp >::iterNext().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 907 of file iter-explorer.hpp.
Referenced by Grouping< SRC, RES, grp >::getGroupedElms(), Grouping< SRC, RES, grp >::pullGroup(), and Grouping< SRC, RES, grp >::yield().
Definition at line 908 of file iter-explorer.hpp.
Referenced by Grouping< SRC, RES, grp >::checkPoint(), Grouping< SRC, RES, grp >::getGroupedElms(), and Grouping< SRC, RES, grp >::pullGroup().
Inheritance diagram for Grouping< SRC, RES, grp >:
Collaboration diagram for Grouping< SRC, RES, grp >: