Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
EvaluationBufferStrategy< IT, _QUEUE_ > Class Template Reference

#include "lib/iter-explorer.hpp"

Description

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.

Warning
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

IT& emptySequence ( )
inlineprivate
Returns
default constructed (=empty) iterator
Remarks
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.

Referenced by EvaluationBufferStrategy< IT, IterStack >::getFeed().

+ Here is the caller graph for this function:

IT& getFeed ( )
inline

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

void feedBack ( IT const &  newEvaluationResults)
inline

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

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

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