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>
Public Member Functions | |
bool | finished (ID *id) |
bool | operator() (T const &value) |
void | operator++ () |
search (self &tree) | |
Private Attributes | |
node * | next_ |
next location to goto in the tree when operator++ is called | |
node * | scan_ |
where are we currently in the tree | |
self * | tree_ |
which tree are we talking about |
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.
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.
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.
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.
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.
next location to goto in the tree when operator++ is called
Definition at line 295 of file sequence_map.h.
where are we currently in the tree
Definition at line 294 of file sequence_map.h.
which tree are we talking about
Definition at line 293 of file sequence_map.h.