MAK Data Logger API Documentation for HLA
multiKeyMap.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef multiKeyMap_H_
10 #define multiKeyMap_H_
11 
12 #include <map>
13 
14 namespace MAKLogger
15 {
20  template <typename Key1,typename Key2, typename Value>
21  class DtMultiKeyMap : public std::map<std::pair<Key1,Key2>,Value>
22  {
23  public:
25 
26  typedef std::pair<Key1,Key2> KeyPair;
27  typedef std::map<KeyPair,Value> KeyPairValueMap;
28  typedef typename KeyPairValueMap::iterator iterator;
29  typedef typename KeyPairValueMap::const_iterator const_iterator;
31 
33  DtMultiKeyMap();
34 
36  virtual ~DtMultiKeyMap();
37 
40 
44 
46  iterator insert(Key1 key1,Key2 key2,Value value);
47 
49 
50  iterator find(const Key1& key1);
51  const_iterator find(const Key1& key1) const;
53 
55 
56  iterator find(const Key2& key2);
57  const_iterator find(const Key2& key2) const;
59 
61  Value& operator[](const Key1& key1);
62 
64  Value& operator[](const Key2& key2);
65 
66  protected:
68  std::map<Key1,Key2> key2LookUp;
70  std::map<Key2,Key1> key1LookUp;
71  };
72 }
73 
74 #define multiKeyMap_INC_
75 #include "multiKeyMap.inl"
76 #undef multiKeyMap_INC_
77 
78 #endif

Document ID: Generated on Sun Dec 15 18:04:30 EST 2013 from SVN revision 134418
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)