![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "lib/iter-stack.hpp"
A Queue which can be pulled by iterating.
As a variation of the IterStack frontend, here the exposed additional interface works like a queue: New elements can be fed, and the iteration will consume the contents first-in first-out. The implementation is based on std::deque, providing both feed and the iterating operation in amortised constant time, using chunk wise heap allocations. Feeding of new elements into the queue and retrieving old elements by iteration may be mixed freely.
Definition at line 188 of file iter-stack.hpp.
Classes | |
| struct | Builder |
| Adapter for use as opaque sequence. More... | |
Public Member Functions | |
| IterQueue & | feed (TY const &elm) |
| IterQueue & | feed (TY &&elm) |
| IterQueue & | insert (TY const &elm) |
| TY | pop () |
| size_t | size () const |
| bool | empty () const |
Public Member Functions inherited from IterStateWrapper< iter::IterDequeStorage< TY > > | |
| IterStateWrapper (iter::IterDequeStorage< TY > &&initialState) | |
| IterStateWrapper (iter::IterDequeStorage< TY > const &initialState) | |
| IterStateWrapper () | |
| operator bool () const | |
| iter::CoreYield< iter::IterDequeStorage< TY > > | operator* () const |
| pointer | operator-> () const |
| IterStateWrapper & | operator++ () |
| bool | isValid () const |
| bool | empty () const |
| ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (IterStateWrapper) | |
Friends | |
| IterQueue::Builder | build (IterQueue &initial) |
| Extension point to be picked up by ADL. | |
Additional Inherited Members | |
Public Types inherited from IterStateWrapper< iter::IterDequeStorage< TY > > | |
| using | value_type = meta::RefTraits< iter::CoreYield< iter::IterDequeStorage< TY > > >::Value |
| using | reference = meta::RefTraits< iter::CoreYield< iter::IterDequeStorage< TY > > >::Reference |
| using | pointer = meta::RefTraits< iter::CoreYield< iter::IterDequeStorage< TY > > >::Pointer |
Protected Member Functions inherited from IterStateWrapper< iter::IterDequeStorage< TY > > | |
| iter::IterDequeStorage< TY > & | stateCore () |
| allow derived classes to access state representation | |
| iter::IterDequeStorage< TY > const & | stateCore () const |
| void | __throw_if_empty () const |
|
inline |
Definition at line 195 of file iter-stack.hpp.
References IterStateWrapper< iter::IterDequeStorage< TY > >::stateCore().
Referenced by lib::elements(), lib::elements(), lib::elements(), lib::elements(), lib::elements(), CommandQueue::feed(), CallQueue::feed(), IterQueue< TY >::insert(), IterQueue_test::run(), IterQueue< TY >::Builder::usingSequence(), and IterQueue< TY >::Builder::wrapping().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 202 of file iter-stack.hpp.
References IterStateWrapper< iter::IterDequeStorage< TY > >::stateCore().
Here is the call graph for this function:
|
inline |
Definition at line 209 of file iter-stack.hpp.
References IterQueue< TY >::feed().
Here is the call graph for this function:
|
inline |
Definition at line 215 of file iter-stack.hpp.
References IterStateWrapper< iter::IterDequeStorage< TY > >::__throw_if_empty(), and IterStateWrapper< iter::IterDequeStorage< TY > >::stateCore().
Referenced by DispatcherLoop::processCommands(), IterQueue_test::run(), CommandQueue_test::verifyBasics(), and CommandQueue_test::verifyExecutabilityCheck().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 227 of file iter-stack.hpp.
Referenced by IterQueue< TY >::empty(), CallQueue::size(), DispatcherLoop::size(), CommandQueue_test::verifyBasics(), and CommandQueue_test::verifyExecutabilityCheck().
Here is the caller graph for this function:
|
inline |
Definition at line 233 of file iter-stack.hpp.
References IterQueue< TY >::size().
Referenced by DispatcherLoop::DispatcherLoop(), DispatcherLoop::processCommands(), and CommandQueue_test::verifyBasics().
Here is the call graph for this function:
Here is the caller graph for this function:
|
friend |
Extension point to be picked up by ADL.
The exposed Builder object allows client code to prepare and pre-fill the queue, without being tied to the implementation type
| initial | the initial contents of the queue to start with, maybe empty. This parameter also acts as type tag to pick this build() function by ADL |
Definition at line 282 of file iter-stack.hpp.
Inheritance diagram for IterQueue< TY >:
Collaboration diagram for IterQueue< TY >: