MINT2
Public Member Functions | Protected Attributes | List of all members
MINT::PolymorphMap< Key, Val > Class Template Reference

#include <PolymorphMap.h>

Public Member Functions

 PolymorphMap ()
 
 PolymorphMap (const PolymorphMap &other)
 
 PolymorphMap (const typename std::map< Key, Val > &other)
 
virtual ~PolymorphMap ()
 
std::map< Key, Val > & theMap ()
 
const std::map< Key, Val > & theMap () const
 
Val & operator[] (const Key &k)
 
const Val & operator[] (const Key &k) const
 
std::map< Key, Val >::iterator begin ()
 
std::map< Key, Val >::const_iterator begin () const
 
std::map< Key, Val >::iterator end ()
 
std::map< Key, Val >::const_iterator end () const
 
std::map< Key, Val >::iterator find (const Key &c)
 
std::map< Key, Val >::const_iterator find (const Key &c) const
 
void insert (typename std::map< Key, Val >::const_iterator first, typename std::map< Key, Val >::const_iterator last)
 
unsigned int size () const
 
bool empty () const
 
PolymorphMap< Key, Val > & operator= (const PolymorphMap &other)
 
void clear ()
 
void resize (unsigned int N)
 
void resize (unsigned int N, const Val &c)
 
 operator const typename std::map< Key, Val > & () const
 
 operator typename std::map< Key, Val > & ()
 
bool operator== (const MINT::PolymorphMap< Key, Val > &v2) const
 
bool operator!= (const MINT::PolymorphMap< Key, Val > &v2) const
 
bool operator< (const MINT::PolymorphMap< Key, Val > &v2) const
 
bool operator> (const MINT::PolymorphMap< Key, Val > &v2) const
 

Protected Attributes

std::map< Key, Val > _map
 

Detailed Description

template<typename Key, typename Val>
class MINT::PolymorphMap< Key, Val >

Definition at line 8 of file PolymorphMap.h.

Constructor & Destructor Documentation

◆ PolymorphMap() [1/3]

template<typename Key, typename Val>
MINT::PolymorphMap< Key, Val >::PolymorphMap ( )
inline

Definition at line 14 of file PolymorphMap.h.

14 : _map(){}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ PolymorphMap() [2/3]

template<typename Key, typename Val>
MINT::PolymorphMap< Key, Val >::PolymorphMap ( const PolymorphMap< Key, Val > &  other)
inline

Definition at line 15 of file PolymorphMap.h.

15 : _map(other._map){}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ PolymorphMap() [3/3]

template<typename Key, typename Val>
MINT::PolymorphMap< Key, Val >::PolymorphMap ( const typename std::map< Key, Val > &  other)
inline

Definition at line 16 of file PolymorphMap.h.

16 : _map(other){}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ ~PolymorphMap()

template<typename Key, typename Val>
virtual MINT::PolymorphMap< Key, Val >::~PolymorphMap ( )
inlinevirtual

Definition at line 18 of file PolymorphMap.h.

18 {}

Member Function Documentation

◆ begin() [1/2]

template<typename Key, typename Val>
std::map<Key, Val>::iterator MINT::PolymorphMap< Key, Val >::begin ( )
inline

Definition at line 26 of file PolymorphMap.h.

26 {return _map.begin();}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ begin() [2/2]

template<typename Key, typename Val>
std::map<Key, Val>::const_iterator MINT::PolymorphMap< Key, Val >::begin ( ) const
inline

Definition at line 27 of file PolymorphMap.h.

27 {return _map.begin();}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ clear()

template<typename Key, typename Val>
void MINT::PolymorphMap< Key, Val >::clear ( )
inline

Definition at line 48 of file PolymorphMap.h.

48 {_map.clear();}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ empty()

template<typename Key, typename Val>
bool MINT::PolymorphMap< Key, Val >::empty ( ) const
inline

Definition at line 41 of file PolymorphMap.h.

41 {return _map.empty();}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ end() [1/2]

template<typename Key, typename Val>
std::map<Key, Val>::iterator MINT::PolymorphMap< Key, Val >::end ( )
inline

Definition at line 29 of file PolymorphMap.h.

29 {return _map.end();}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ end() [2/2]

template<typename Key, typename Val>
std::map<Key, Val>::const_iterator MINT::PolymorphMap< Key, Val >::end ( ) const
inline

Definition at line 30 of file PolymorphMap.h.

30 {return _map.end();}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ find() [1/2]

template<typename Key, typename Val>
std::map<Key, Val>::iterator MINT::PolymorphMap< Key, Val >::find ( const Key &  c)
inline

Definition at line 32 of file PolymorphMap.h.

32 {return _map.find(c);}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ find() [2/2]

template<typename Key, typename Val>
std::map<Key, Val>::const_iterator MINT::PolymorphMap< Key, Val >::find ( const Key &  c) const
inline

Definition at line 33 of file PolymorphMap.h.

33 {return _map.find(c);}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ insert()

template<typename Key, typename Val>
void MINT::PolymorphMap< Key, Val >::insert ( typename std::map< Key, Val >::const_iterator  first,
typename std::map< Key, Val >::const_iterator  last 
)
inline

Definition at line 35 of file PolymorphMap.h.

36  {
37  _map.insert(first, last);
38  }
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ operator const typename std::map< Key, Val > &()

template<typename Key, typename Val>
MINT::PolymorphMap< Key, Val >::operator const typename std::map< Key, Val > & ( ) const
inline

Definition at line 52 of file PolymorphMap.h.

52  {
53  return this->theMap();
54  }
std::map< Key, Val > & theMap()
Definition: PolymorphMap.h:20

◆ operator typename std::map< Key, Val > &()

template<typename Key, typename Val>
MINT::PolymorphMap< Key, Val >::operator typename std::map< Key, Val > & ( )
inline

Definition at line 55 of file PolymorphMap.h.

55  {
56  return this->theMap();
57  }
std::map< Key, Val > & theMap()
Definition: PolymorphMap.h:20

◆ operator!=()

template<typename Key, typename Val>
bool MINT::PolymorphMap< Key, Val >::operator!= ( const MINT::PolymorphMap< Key, Val > &  v2) const
inline

Definition at line 62 of file PolymorphMap.h.

62  {
63  return !(_map == v2.theMap());
64  }
std::map< Key, Val > & theMap()
Definition: PolymorphMap.h:20
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ operator<()

template<typename Key, typename Val>
bool MINT::PolymorphMap< Key, Val >::operator< ( const MINT::PolymorphMap< Key, Val > &  v2) const
inline

Definition at line 66 of file PolymorphMap.h.

66  {
67  return _map < v2.theMap();
68  }
std::map< Key, Val > & theMap()
Definition: PolymorphMap.h:20
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ operator=()

template<typename Key, typename Val>
PolymorphMap<Key, Val>& MINT::PolymorphMap< Key, Val >::operator= ( const PolymorphMap< Key, Val > &  other)
inline

Definition at line 43 of file PolymorphMap.h.

43  {
44  _map = other._map;
45  return *this;
46  }
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ operator==()

template<typename Key, typename Val>
bool MINT::PolymorphMap< Key, Val >::operator== ( const MINT::PolymorphMap< Key, Val > &  v2) const
inline

Definition at line 59 of file PolymorphMap.h.

59  {
60  return _map == v2.theMap();
61  }
std::map< Key, Val > & theMap()
Definition: PolymorphMap.h:20
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ operator>()

template<typename Key, typename Val>
bool MINT::PolymorphMap< Key, Val >::operator> ( const MINT::PolymorphMap< Key, Val > &  v2) const
inline

Definition at line 69 of file PolymorphMap.h.

69  {
70  return v2 < _map.theMap();
71  }
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ operator[]() [1/2]

template<typename Key, typename Val>
Val& MINT::PolymorphMap< Key, Val >::operator[] ( const Key &  k)
inline

Definition at line 23 of file PolymorphMap.h.

23 {return _map[k];}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ operator[]() [2/2]

template<typename Key, typename Val>
const Val& MINT::PolymorphMap< Key, Val >::operator[] ( const Key &  k) const
inline

Definition at line 24 of file PolymorphMap.h.

24 {return _map[k];}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ resize() [1/2]

template<typename Key, typename Val>
void MINT::PolymorphMap< Key, Val >::resize ( unsigned int  N)
inline

Definition at line 49 of file PolymorphMap.h.

49 {_map.resize(N);}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ resize() [2/2]

template<typename Key, typename Val>
void MINT::PolymorphMap< Key, Val >::resize ( unsigned int  N,
const Val &  c 
)
inline

Definition at line 50 of file PolymorphMap.h.

50 {_map.resize(N, c);}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ size()

template<typename Key, typename Val>
unsigned int MINT::PolymorphMap< Key, Val >::size ( ) const
inline

Definition at line 40 of file PolymorphMap.h.

40 {return _map.size();}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ theMap() [1/2]

template<typename Key, typename Val>
std::map<Key, Val>& MINT::PolymorphMap< Key, Val >::theMap ( )
inline

Definition at line 20 of file PolymorphMap.h.

20 {return _map;}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

◆ theMap() [2/2]

template<typename Key, typename Val>
const std::map<Key, Val>& MINT::PolymorphMap< Key, Val >::theMap ( ) const
inline

Definition at line 21 of file PolymorphMap.h.

21 {return _map;}
std::map< Key, Val > _map
Definition: PolymorphMap.h:11

Member Data Documentation

◆ _map

template<typename Key, typename Val>
std::map<Key, Val> MINT::PolymorphMap< Key, Val >::_map
protected

Definition at line 11 of file PolymorphMap.h.


The documentation for this class was generated from the following file: