Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

suif_map Class Reference

A map function based on a list and sequential search. More...

#include <common/suif_map.h>

Inheritance diagram for suif_map:

suif_map_inner List of all members.

Public Types

typedef pair value_type
typedef domain key_type
typedef range data_type

Public Methods

 suif_map ()
virtual ~suif_map ()
pairenter_value (domain x,range y)
 Enter a value into the table with key x and value y.

iterator find (const domain &x) const
 Find an entry by key. More...

range lookup (const domain &x)
 Similar to find() except returning the associated value. More...

iterator begin () const
 Get an iterator to iterate over the values.

iterator end () const
void erase (iterator &iter)
 Remove an entry.

unsigned size () const
 Return count of entries in table.

iterator insert (iterator &x,const pair &p)
 Insert into a table at the given position.

void clear (void)
 Clear all entries.


Detailed Description

template<class domain, class range> class suif_map

A map function based on a list and sequential search.

See also:
suif_hash_map


Member Typedef Documentation

template<class domain, class range>
typedef range suif_map<domain, range>::data_type

template<class domain, class range>
typedef domain suif_map<domain, range>::key_type

template<class domain, class range>
typedef pair suif_map<domain, range>::value_type


Constructor & Destructor Documentation

template<class domain, class range>
suif_map<domain, range>::suif_map<domain, range> ()

template<class domain, class range>
suif_map<domain, range>::~suif_map<domain, range> () [inline, virtual]


Member Function Documentation

template<class domain, class range>
iterator suif_map<domain, range>::begin () const [inline]

Get an iterator to iterate over the values.

Reimplemented from suif_map_inner.

template<class domain, class range>
void suif_map<domain, range>::clear (
void) [inline]

Clear all entries.

Reimplemented from suif_map_inner.

template<class domain, class range>
iterator suif_map<domain, range>::end () const [inline]

Reimplemented from suif_map_inner.

template<class domain, class range>
pair & suif_map<domain, range>::enter_value (
domain x,
range y) [inline]

Enter a value into the table with key x and value y.

template<class domain, class range>
void suif_map<domain, range>::erase (
iterator & iter) [inline]

Remove an entry.

template<class domain, class range>
iterator suif_map<domain, range>::find (
const domain & x) const [inline]

Find an entry by key.

Returns end() if not found

template<class domain, class range>
iterator suif_map<domain, range>::insert (
iterator & x,
const pair & p) [inline]

Insert into a table at the given position.

template<class domain, class range>
range suif_map<domain, range>::lookup (
const domain & x) [inline]

Similar to find() except returning the associated value.

assert if no value associated with the key in ths map.

template<class domain, class range>
unsigned suif_map<domain, range>::size () const [inline]

Return count of entries in table.


The documentation for this class was generated from the following file:
Generated at Mon Jul 31 13:44:38 2000 for NCI SUIF by doxygen 1.1.2 written by Dimitri van Heesch, © 1997-2000