LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
DataUnit.h
1 #ifndef RHESUS_COMPONENTDATA_H_
2 #define RHESUS_COMPONENTDATA_H_
3 
4 #include <string>
5 #include <hash_map>
6 
7 #include "../Utilities/Generic.h"
8 #include "../Tasks/Mutex.h"
9 
10 namespace Rhesus
11 {
12 namespace Toolkit
13 {
14 namespace InterCommunication
15 {
16 
22  class DataUnit
23  {
24  public:
25  DataUnit();
26 
32  template <typename T>
33  void Set(std::string key, T value);
34 
39  template <typename T>
40  T Get(std::string key);
41 
45  void Clear();
46 
47  private:
48  typedef std::hash_map<std::string, Rhesus::Toolkit::Utilities::Generic> DataMap;
49 
50  DataMap m_dataMap;
51 
52  Rhesus::Toolkit::Tasks::Mutex m_syncObject;
53  };
54 
55 }
56 }
57 }
58 
59 #endif