search Class Reference

A 'search' is a context for comparing an arbitrary sequence with those stored in the Sequence_Map. The idea of course is to determine whether or not a given sequence exactly matches one found in the map -- and also what the ID of that sequence is. A search is a kind of iterator that scans through the structure of the Sequence_Map. You have to call operator++ to get to the next location in the sequence. If you want to know if you are sitting at the end of the sequence, call finished. A search does not exactly model an iterator so it has no comparison functions, and the Sequence_Map has no begin or end methods. More...

#include <sequence_map.h>

Collaboration diagram for search:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool finished (ID *id)
bool operator() (T const &value)
void operator++ ()
 search (self &tree)

Private Attributes

nodenext_
 next location to goto in the tree when operator++ is called
nodescan_
 where are we currently in the tree
selftree_
 which tree are we talking about

Detailed Description

template<class T, class ID, class H = Hasher<T>>
class cxxtls::Sequence_Map< T, ID, H >::search

A 'search' is a context for comparing an arbitrary sequence with those stored in the Sequence_Map. The idea of course is to determine whether or not a given sequence exactly matches one found in the map -- and also what the ID of that sequence is. A search is a kind of iterator that scans through the structure of the Sequence_Map. You have to call operator++ to get to the next location in the sequence. If you want to know if you are sitting at the end of the sequence, call finished. A search does not exactly model an iterator so it has no comparison functions, and the Sequence_Map has no begin or end methods.

Definition at line 279 of file sequence_map.h.


Constructor & Destructor Documentation

search ( self tree  ) 

Construct a search on a given sequence map -- and starting at the top level of its tree of sequence data.

Definition at line 299 of file sequence_map.h.


Member Function Documentation

bool finished ( ID *  id  ) 

Determine if the current location in the sequence is the end of a sequence. A true return value means yes and the id will be updated. Otherwise false will be returned and the id will not be updated.

Definition at line 356 of file sequence_map.h.

Here is the call graph for this function:

bool operator() ( T const &  value  ) 

Check to see if a specified value is a valid next member of the sequence up to this point. Sets the next_ member.

Definition at line 308 of file sequence_map.h.

Here is the call graph for this function:

void operator++ (  ) 

Assuming that someone has already called operator()(T const&), and have gotten an true indication, step to the next item in the sequence along this direction.

Note that multiple calls to operator() (T const&) can be made. The most recent call is the one that defines the direction operator++ will take -- if any

Definition at line 334 of file sequence_map.h.


Member Data Documentation

node* next_ [private]

next location to goto in the tree when operator++ is called

Definition at line 295 of file sequence_map.h.

node* scan_ [private]

where are we currently in the tree

Definition at line 294 of file sequence_map.h.

self* tree_ [private]

which tree are we talking about

Definition at line 293 of file sequence_map.h.


The documentation for this class was generated from the following file:
Generated on Wed Feb 29 22:56:31 2012 for CXXUtilities by  doxygen 1.6.3