Code Listener  [unstable] git snapshot
Public Types | Public Member Functions | Protected Attributes
WorkList< T, TSched > Class Template Reference

really stupid, but easy to use, DFS implementation More...

#include <worklist.hh>

Public Types

typedef T value_type
 

Public Member Functions

 WorkList ()
 
 WorkList (const T &item)
 
bool next (T &dst)
 
bool schedule (const T &item)
 
bool seen (const T &item) const
 
unsigned cntSeen () const
 
unsigned cntTodo () const
 

Protected Attributes

TSched todo_
 
std::set< T > seen_
 

Detailed Description

template<class T, class TSched = std::stack<T>>
class WorkList< T, TSched >

really stupid, but easy to use, DFS implementation

Definition at line 47 of file worklist.hh.

Member Typedef Documentation

typedef T value_type

Definition at line 49 of file worklist.hh.

Constructor & Destructor Documentation

WorkList ( )
inline

Definition at line 56 of file worklist.hh.

WorkList ( const T &  item)
inline

Definition at line 57 of file worklist.hh.

References WorkList< T, TSched >::seen_, and WorkList< T, TSched >::todo_.

Member Function Documentation

unsigned cntSeen ( ) const
inline

Definition at line 84 of file worklist.hh.

References WorkList< T, TSched >::seen_.

unsigned cntTodo ( ) const
inline

Definition at line 85 of file worklist.hh.

References WorkList< T, TSched >::todo_.

bool next ( T &  dst)
inline

Definition at line 62 of file worklist.hh.

References WorkList< T, TSched >::todo_.

bool schedule ( const T &  item)
inline

Definition at line 71 of file worklist.hh.

References hasKey(), WorkList< T, TSched >::seen_, and WorkList< T, TSched >::todo_.

bool seen ( const T &  item) const
inline

Definition at line 80 of file worklist.hh.

References hasKey(), and WorkList< T, TSched >::seen_.

Field Documentation

std::set<T> seen_
protected
TSched todo_
protected

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