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

In This Package:

GiGaMap< KEY, VALUE > Class Template Reference

Map adaptor class to avoid the usage of std::map on Win32 platform for MicroSoft C++ compiler. More...

#include <GiGa/GiGaMap.h>

Collaboration diagram for GiGaMap< KEY, VALUE >:

[legend]
List of all members.

Public Types

typedef KEY Key
 type of the key
typedef VALUE Value
 type of the mapped value
typedef std::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

 GiGaMap ()
 Standard constructor.
virtual ~GiGaMap ()
 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 underlying MAP container

Detailed Description

template<class KEY, class VALUE>
class GiGaMap< KEY, VALUE >

Map adaptor class to avoid the usage of std::map on Win32 platform for MicroSoft C++ compiler.

The code actually is imported from LHCb Calo software.

Author:
Vanya Belyaev Ivan.Belyaev.
Date:
04/05/2002

Definition at line 42 of file GiGaMap.h.


Member Typedef Documentation

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

type of the key

Definition at line 47 of file GiGaMap.h.

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

type of the mapped value

Definition at line 49 of file GiGaMap.h.

template<class KEY, class VALUE>
typedef std::map<Key,Value> GiGaMap< KEY, VALUE >::Map

the map itself

Warning:
the actual type is platform-dependent!

Definition at line 60 of file GiGaMap.h.

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

the type of iterator

Warning:
the actual type is platform-dependent!

Definition at line 66 of file GiGaMap.h.

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

the type of const_iterator

Warning:
the actual type is platform-dependent!

Definition at line 71 of file GiGaMap.h.


Constructor & Destructor Documentation

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

Standard constructor.

Definition at line 76 of file GiGaMap.h.

00077     : m_map  () 
00078   {};

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

destructor (virtual)

Definition at line 81 of file GiGaMap.h.

00081 { clear() ; };


Member Function Documentation

template<class KEY, class VALUE>
Value& GiGaMap< 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 94 of file GiGaMap.h.

00095   { return m_map[key]; };

template<class KEY, class VALUE>
Value& GiGaMap< 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 108 of file GiGaMap.h.

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

template<class KEY, class VALUE>
void GiGaMap< 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 115 of file GiGaMap.h.

00117   {
00118     m_map.erase( first , last ); 
00119   };

template<class KEY, class VALUE>
void GiGaMap< 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 126 of file GiGaMap.h.

00127   {
00128     m_map.erase  ( it        ); 
00129   };

template<class KEY, class VALUE>
void GiGaMap< 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 136 of file GiGaMap.h.

00137   {
00138     m_map.erase  ( key ) ;
00139   };

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

clear the content of all containers

Definition at line 142 of file GiGaMap.h.

00142 { m_map.clear() ; }

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

get the size ( == number of elements )

Returns:
number of elements

Definition at line 147 of file GiGaMap.h.

00147 { return m_map.size(); }

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

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

Returns:
begin-iterator (non-const version)

Definition at line 152 of file GiGaMap.h.

00152 { return m_map.begin(); }

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

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

Returns:
begin-iterator (const version)

Definition at line 157 of file GiGaMap.h.

00157 { return m_map.begin(); }

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

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

Returns:
end-iterator (non-const version)

Definition at line 162 of file GiGaMap.h.

00162 { return m_map.end(); }

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

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

Returns:
end-iterator (const version)

Definition at line 167 of file GiGaMap.h.

00167 { return m_map.end(); }


Member Data Documentation

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

the underlying MAP container

Definition at line 171 of file GiGaMap.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