Lumiera  0.pre.03
EvaluationBufferStrategy< IT, _QUEUE_ > Class Template Reference

#include "lib/iter-explorer.hpp"


template<class IT, template< class > class _QUEUE_>
class lib::iter_explorer::EvaluationBufferStrategy< IT, _QUEUE_ >

Strategy building block for recursive exhausting evaluation.

Allows to create depth-fist or breadth-first evaluation patterns, just by using a suitably intermediary storage container to hold the partially evaluated iterators created at each evaluation step. Using a stack and pushing results will create a depth-first pattern, while using a queue will evaluate in layers (breadth-first). In both cases, the next evaluation step will happen at the iterator returned by getFeed.

uses an empty-iterator marker object to signal exhaustion
  • this marker IT() may be re-initialised concurrently
  • accessing this marker during app shutdown might access an already defunct object

Definition at line 640 of file iter-explorer.hpp.

Public Member Functions

void feedBack (IT const &newEvaluationResults)
IT & getFeed ()

Private Member Functions

IT & emptySequence ()

Private Attributes

_QUEUE_< IT > intermediaryResults_

Member Function Documentation

◆ emptySequence()

IT& emptySequence ( )
default constructed (=empty) iterator
casting away const is safe here, since all you can do with an NIL iterator is to test for emptiness.

Definition at line 650 of file iter-explorer.hpp.

◆ getFeed()

IT& getFeed ( )

Definition at line 658 of file iter-explorer.hpp.

◆ feedBack()

void feedBack ( IT const &  newEvaluationResults)

Definition at line 671 of file iter-explorer.hpp.

Referenced by RecursiveExhaustingEvaluation< SRC, FUN, DepthFirstEvaluationBuffer >::iterNext(), and RecursiveExhaustingEvaluation< SRC, FUN, DepthFirstEvaluationBuffer >::RecursiveExhaustingEvaluation().

+ Here is the caller graph for this function:

Member Data Documentation

◆ intermediaryResults_

_QUEUE_<IT> intermediaryResults_

Definition at line 642 of file iter-explorer.hpp.

+ Inheritance diagram for EvaluationBufferStrategy< IT, _QUEUE_ >:
+ Collaboration diagram for EvaluationBufferStrategy< IT, _QUEUE_ >:

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