Polaris: BaseMapIter Class Reference

BaseMapIter Class Reference

#include <BaseMapIter.h>

List of all members.

Public Member Functions

 BaseMapIter (const BaseMap &map)
 Constructor -- note: The iterator does not contain a copy of the map -- it just contains some pointers into it, therefore the map may not have items deleted or inserted during the lifetime of this iterator.
void reset ()
 Start over from the beginning of the iteration space.
void operator++ ()
 Increment to point to next element.
Listablecurrent_data () const
 Return data of current element.
BMKeycurrent_key () const
 Return key of current element.
int valid () const
 Return 1 if the current element is valid.
int end () const
 Return 1 if there are no more elements to iterate (equivalent to !valid()).

Protected Attributes

BaseMap_map
 pointer to underlying map
BMNode_curr_node
 pointer to current node


Constructor & Destructor Documentation

BaseMapIter::BaseMapIter const BaseMap map  ) 
 

Constructor -- note: The iterator does not contain a copy of the map -- it just contains some pointers into it, therefore the map may not have items deleted or inserted during the lifetime of this iterator.

Definition at line 11 of file BaseMapIter.cc.

References _map, and reset().


Member Function Documentation

void BaseMapIter::reset  ) 
 

Start over from the beginning of the iteration space.

Definition at line 18 of file BaseMapIter.cc.

References _curr_node, BaseMapRoot::_first(), _map, BMPosition::_ptr, BMPosition::_type, and TOP.

Referenced by BaseMapIter().

void BaseMapIter::operator++  ) 
 

Increment to point to next element.

Definition at line 31 of file BaseMapIter.cc.

References _curr_node, _map, BaseMapRoot::_successor(), and valid().

Listable * BaseMapIter::current_data  )  const [inline]
 

Return data of current element.

Cause an error if valid() == 0

Definition at line 52 of file BaseMapIter.h.

References _curr_node, BMNode::_data, and Wrapper::object().

BMKey & BaseMapIter::current_key  )  const [inline]
 

Return key of current element.

Cause an error if valid() == 0

Definition at line 58 of file BaseMapIter.h.

References _curr_node, and BMNode::_key.

int BaseMapIter::valid  )  const [inline]
 

Return 1 if the current element is valid.

Definition at line 64 of file BaseMapIter.h.

References _curr_node.

Referenced by end(), and operator++().

int BaseMapIter::end  )  const [inline]
 

Return 1 if there are no more elements to iterate (equivalent to !valid()).

Definition at line 70 of file BaseMapIter.h.

References valid().


Member Data Documentation

BaseMap* BaseMapIter::_map [protected]
 

pointer to underlying map

Definition at line 17 of file BaseMapIter.h.

Referenced by BaseMapIter(), operator++(), and reset().

BMNode* BaseMapIter::_curr_node [protected]
 

pointer to current node

Definition at line 18 of file BaseMapIter.h.

Referenced by current_data(), current_key(), operator++(), reset(), and valid().


The documentation for this class was generated from the following files:
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:07:00 2005