Public Member Functions | Protected Attributes
MAKLogger::DtMultiKeyMap< Key1, Key2, Value > Class Template Reference

DtMultiKeyMap allows storage of a value with two unique keys of different types. More...

+ Inheritance diagram for MAKLogger::DtMultiKeyMap< Key1, Key2, Value >:
+ Collaboration diagram for MAKLogger::DtMultiKeyMap< Key1, Key2, Value >:

List of all members.

Public Types

typedef std::pair< Key1, Key2 > KeyPair
 The type definition for the map.
typedef std::map< KeyPair, Value > KeyPairValueMap
 The type definition for the map.
typedef KeyPairValueMap::iterator iterator
 The type definition for the map.
typedef
KeyPairValueMap::const_iterator 
const_iterator
 The type definition for the map.

Public Member Functions

 DtMultiKeyMap ()
 Ctr constructs an empty map.
virtual ~DtMultiKeyMap ()
 Dtr.
 DtMultiKeyMap (const DtMultiKeyMap< Key1, Key2, Value > &)
 Copy constructor.
DtMultiKeyMap< Key1, Key2,
Value > & 
operator= (const DtMultiKeyMap< Key1, Key2, Value > &)
 Assignement operator.
iterator insert (Key1 key1, Key2 key2, Value value)
 Insert a value with it's two unique keys.
Value & operator[] (const Key1 &key1)
 Access value via Key1;.
Value & operator[] (const Key2 &key2)
 Access value via Key2;.
iterator find (const Key1 &key1)
 Search for the position by Key1.
const_iterator find (const Key1 &key1) const
 Search for the position by Key1.
iterator find (const Key2 &key2)
 Search for the position by Key2.
const_iterator find (const Key2 &key2) const
 Search for the position by Key2.

Protected Attributes

std::map< Key1, Key2 > key2LookUp
 Map used to look up Key2 by Key1.
std::map< Key2, Key1 > key1LookUp
 Map used to look up Key1 by Key2.

Detailed Description

template<typename Key1, typename Key2, typename Value>
class MAKLogger::DtMultiKeyMap< Key1, Key2, Value >

DtMultiKeyMap allows storage of a value with two unique keys of different types.

Each key should be unique and of a different type. An example use of this class is to maintain a lookup map of values to both an integer constant and a name.


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

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)