| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

GiGaHashMap< KEY, VALUE > Class Template Reference

trick to hide std::hash_map on Win32 More...

#include <GiGa/GiGaHashMap.h>

List of all members.


Public Types

typedef KEY Key
 type of the key
typedef VALUE Value
 type of the mapped value
typedef hash_map< Key, ValueMap
 the map itself
typedef Map::iterator iterator
 the type of iterator
typedef Map::const_iterator const_iterator
 the type of const_iterator

Public Member Functions

 GiGaHashMap ()
 Standard constructor.
virtual ~GiGaHashMap ()
 destructor (virtual)
Valueoperator() (const Key &key)
 access to elements by the key (non-const!) for Linux the implementation is trivial
Valueoperator[] (const Key &key)
 access to elements by the key (non-const!) for Linux the implementation is trivial
void erase (iterator first, iterator last)
 erase the sequence from the map
void erase (iterator it)
 erase the sequence from the map
void erase (const Key &key)
 remove/erase element from the map (by key)
void clear ()
 clear the content of all containers
unsigned int size () const
 get the size ( == number of elements )
Map::iterator begin ()
 iterator for sequential access to the content of the "map"
Map::const_iterator begin () const
 iterator for sequential access to the content of the "map"
Map::iterator end ()
 iterator for sequential access to the content of the "map"
Map::const_iterator end () const
 iterator for sequential access to the content of the "map"

Private Attributes

Map m_map
 the map itself

Detailed Description

template<class KEY, class VALUE>
class GiGaHashMap< KEY, VALUE >

trick to hide std::hash_map on Win32

An auxillary class to hide underlying std::hash_map implementation for Microsoft Visual-C++ (Win32)

The code actually is imported from LHCb Calo software.

Author:
Vanya Belyaev Ivan.Belyaev@itep.ru
Date:
20/03/2002

Definition at line 49 of file GiGaHashMap.h.


Member Typedef Documentation

template<class KEY, class VALUE>
typedef KEY GiGaHashMap< KEY, VALUE >::Key

type of the key

Definition at line 54 of file GiGaHashMap.h.

template<class KEY, class VALUE>
typedef VALUE GiGaHashMap< KEY, VALUE >::Value

type of the mapped value

Definition at line 56 of file GiGaHashMap.h.

template<class KEY, class VALUE>
typedef hash_map<Key,Value> GiGaHashMap< KEY, VALUE >::Map

the map itself

Warning:
the actual type is platform-dependent!

Definition at line 67 of file GiGaHashMap.h.

template<class KEY, class VALUE>
typedef Map::iterator GiGaHashMap< KEY, VALUE >::iterator

the type of iterator

Warning:
the actual type is platform-dependent!

Definition at line 73 of file GiGaHashMap.h.

template<class KEY, class VALUE>
typedef Map::const_iterator GiGaHashMap< KEY, VALUE >::const_iterator

the type of const_iterator

Warning:
the actual type is platform-dependent!

Definition at line 78 of file GiGaHashMap.h.


Constructor & Destructor Documentation

template<class KEY, class VALUE>
GiGaHashMap< KEY, VALUE >::GiGaHashMap (  )  [inline]

Standard constructor.

Definition at line 83 of file GiGaHashMap.h.

00084     : m_map   () 
00085   {}

template<class KEY, class VALUE>
virtual GiGaHashMap< KEY, VALUE >::~GiGaHashMap (  )  [inline, virtual]

destructor (virtual)

Definition at line 88 of file GiGaHashMap.h.

00088 { clear() ; };


Member Function Documentation

template<class KEY, class VALUE>
Value& GiGaHashMap< KEY, VALUE >::operator() ( const Key key  )  [inline]

access to elements by the key (non-const!) for Linux the implementation is trivial

Warning:
the implementation is platform-dependent!

Parameters:
key key
Returns:
reference to the value

Definition at line 101 of file GiGaHashMap.h.

00102   { return m_map[key]; };

template<class KEY, class VALUE>
Value& GiGaHashMap< KEY, VALUE >::operator[] ( const Key key  )  [inline]

access to elements by the key (non-const!) for Linux the implementation is trivial

Warning:
the implementation is platform-dependent!

Parameters:
key key
Returns:
reference to the value

Definition at line 115 of file GiGaHashMap.h.

00115 { return (*this)( key ); }

template<class KEY, class VALUE>
void GiGaHashMap< KEY, VALUE >::erase ( iterator  first,
iterator  last 
) [inline]

erase the sequence from the map

Warning:
implementation is platform-dependent
Parameters:
first the "begin" iterator for the sequence
last the "end" iterator for the sequence

Definition at line 122 of file GiGaHashMap.h.

00124   {
00125     m_map.erase( first , last ); 
00126   };

template<class KEY, class VALUE>
void GiGaHashMap< KEY, VALUE >::erase ( iterator  it  )  [inline]

erase the sequence from the map

Warning:
implementation is platform-dependent
Parameters:
it the "begin" iterator for the sequence
last the "end" iterator for the sequence

Definition at line 133 of file GiGaHashMap.h.

00134   {
00135     m_map.erase  ( it        ); 
00136   };

template<class KEY, class VALUE>
void GiGaHashMap< KEY, VALUE >::erase ( const Key key  )  [inline]

remove/erase element from the map (by key)

Warning:
implementation is platform-dependent
Parameters:
key key of element to be removed
Returns:
true if element is removed

Definition at line 143 of file GiGaHashMap.h.

00144   { 
00145     m_map.erase ( key ) ;
00146   };

template<class KEY, class VALUE>
void GiGaHashMap< KEY, VALUE >::clear (  )  [inline]

clear the content of all containers

Definition at line 149 of file GiGaHashMap.h.

00149 { m_map.clear() ; }

template<class KEY, class VALUE>
unsigned int GiGaHashMap< KEY, VALUE >::size (  )  const [inline]

get the size ( == number of elements )

Returns:
number of elements

Definition at line 154 of file GiGaHashMap.h.

00154 { return m_map.size() ; }

template<class KEY, class VALUE>
Map::iterator GiGaHashMap< KEY, VALUE >::begin (  )  [inline]

iterator for sequential access to the content of the "map"

Returns:
begin-iterator (non-const version)

Definition at line 159 of file GiGaHashMap.h.

00159 { return m_map.begin () ; }

template<class KEY, class VALUE>
Map::const_iterator GiGaHashMap< KEY, VALUE >::begin (  )  const [inline]

iterator for sequential access to the content of the "map"

Returns:
begin-iterator (const version)

Definition at line 164 of file GiGaHashMap.h.

00164                                             {
00165     return m_map.begin ();
00166   }

template<class KEY, class VALUE>
Map::iterator GiGaHashMap< KEY, VALUE >::end (  )  [inline]

iterator for sequential access to the content of the "map"

Returns:
end-iterator (non-const version)

Definition at line 171 of file GiGaHashMap.h.

00171 { return m_map.end   () ; }

template<class KEY, class VALUE>
Map::const_iterator GiGaHashMap< KEY, VALUE >::end (  )  const [inline]

iterator for sequential access to the content of the "map"

Returns:
end-iterator (const version)

Definition at line 176 of file GiGaHashMap.h.

00176 { return m_map.end() ; }


Member Data Documentation

template<class KEY, class VALUE>
Map GiGaHashMap< KEY, VALUE >::m_map [private]

the map itself

Definition at line 181 of file GiGaHashMap.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:01:17 2011 for GiGa by doxygen 1.4.7