Polaris: ProtoRefMap< S, T > Class Template Reference

ProtoRefMap< S, T > Class Template Reference

DESCRIPTION

A template for a map for owned keys of type S to objects of type T where:
    1.  'S' is a class with:
More...

#include <ProtoRefMap.h>

Inheritance diagram for ProtoRefMap< S, T >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

INLINE ProtoRefMap ()
INLINE ProtoRefMap (const ProtoRefMap< S, T > &m)
virtual INLINE ~ProtoRefMap ()
INLINE const T * find_ref (const S &key) const
INLINE T * find_ref (const S &key)
 find data of element with key, or 0 if no such element
INLINE Boolean member (const S &key) const
 Return a flag indicating if there is an element with key.
INLINE const T & operator[] (const S &key) const
INLINE T & operator[] (const S &key)
 Return a reference to the data of the element with key.

Protected Member Functions

virtual INLINE Boolean _less (const BMKey &key1, const BMKey &key2) const
 less than compare
virtual INLINE Boolean _equal (const BMKey &key1, const BMKey &key2) const
 equal compare
virtual INLINE void _print (ostream &o, const BMKey &key) const
 print map entry

Detailed Description

template<class S, class T>
class ProtoRefMap< S, T >

DESCRIPTION

A template for a map for owned keys of type S to objects of type T where:
    1.  'S' is a class with:

a) <, == and << operators taking S& arguments. b) a copy constructor S(S &) to clone the input object or simple enough structure for the default copy constructor to work.

2. 'T' is a class derived from Listable.

The map is implemented as a tree of pointers to whatever type is specified. Thus, all methods to insert elements into a map take a pointer to the key and data and do not allocate space. (i.e., the map aliases whatever is in the list). However, the map takes over ownership of the keys on insert and will delete both a map element and its associated key.

Definition at line 34 of file ProtoRefMap.h.


Constructor & Destructor Documentation

template<class S, class T>
INLINE ProtoRefMap< S, T >::ProtoRefMap  ) 
 

< nothing to do

Definition at line 69 of file ProtoRefMap.h.

template<class S, class T>
INLINE ProtoRefMap< S, T >::ProtoRefMap const ProtoRefMap< S, T > &  m  ) 
 

< Invoke copy constructor

Definition at line 76 of file ProtoRefMap.h.

template<class S, class T>
INLINE ProtoRefMap< S, T >::~ProtoRefMap  )  [virtual]
 

< nothing to do

Definition at line 84 of file ProtoRefMap.h.


Member Function Documentation

template<class S, class T>
INLINE Boolean ProtoRefMap< S, T >::_less const BMKey key1,
const BMKey key2
const [protected, virtual]
 

less than compare

Implements BaseMapRoot.

Definition at line 91 of file ProtoRefMap.h.

template<class S, class T>
INLINE Boolean ProtoRefMap< S, T >::_equal const BMKey key1,
const BMKey key2
const [protected, virtual]
 

equal compare

Implements BaseMapRoot.

Definition at line 98 of file ProtoRefMap.h.

template<class S, class T>
INLINE void ProtoRefMap< S, T >::_print ostream &  o,
const BMKey key
const [protected, virtual]
 

print map entry

Implements BaseMapRoot.

Definition at line 105 of file ProtoRefMap.h.

Referenced by RefMap< S, T >::print(), and RefKeyMap< S, T >::print().

template<class S, class T>
INLINE const T * ProtoRefMap< S, T >::find_ref const S &  key  )  const
 

Definition at line 114 of file ProtoRefMap.h.

References BMKey::_keyptr, and BaseMapRoot::find_ref().

Referenced by SSAFullRangeDict::_get_range_ref(), GSAFullRangeDict::_get_range_ref(), ControlRangeDict::_get_range_ref(), TranslateObject::_translate_symbol_refs_expr(), SSAProgramUnit::convert_to_standard(), StmtRefRanges::del_range(), IPCPProcData::local_vars(), ProtoRefMap< S, T >::operator[](), SSAFullRangeDict::pretty_print(), GSAFullRangeDict::pretty_print(), remove_assigned_goto_stmts(), and SSAProgramUnit::rename_variables().

template<class S, class T>
INLINE T * ProtoRefMap< S, T >::find_ref const S &  key  ) 
 

find data of element with key, or 0 if no such element

Definition at line 125 of file ProtoRefMap.h.

References BMKey::_keyptr, and BaseMapRoot::find_ref().

template<class S, class T>
INLINE Boolean ProtoRefMap< S, T >::member const S &  key  )  const
 

Return a flag indicating if there is an element with key.

Definition at line 136 of file ProtoRefMap.h.

References BMKey::_keyptr, and BaseMapRoot::member().

Referenced by main(), modify_dummy_eta_assignments_after_loops(), and process().

template<class S, class T>
INLINE const T & ProtoRefMap< S, T >::operator[] const S &  key  )  const
 

Definition at line 147 of file ProtoRefMap.h.

References ProtoRefMap< S, T >::find_ref().

template<class S, class T>
INLINE T & ProtoRefMap< S, T >::operator[] const S &  key  ) 
 

Return a reference to the data of the element with key.

Definition at line 154 of file ProtoRefMap.h.

References ProtoRefMap< S, T >::find_ref().


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