HCE project C++ developers source code library  1.1.1
HCE project developer library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ReduceAdditionsStorage.hpp
Go to the documentation of this file.
1 
14 #ifndef REDUCEADDITIONSSTORAGE_HPP_
15 #define REDUCEADDITIONSSTORAGE_HPP_
16 
18 #include "Exceptions.hpp"
19 #include <map>
20 #include <utility>
21 
22 namespace HCE{
23 namespace reduce{
24 
26 public:
28  virtual ~ReduceAdditionsStorage();
29 
30  Poco::SharedPtr<additions::TaskReducersManagerIf>findBy (HCE::types::MessageType key);
31  Poco::SharedPtr<additions::TaskReducersManagerIf>findBy (unsigned long long secondKey);
32  void deleteBy(unsigned long long secondKey);
34  Poco::SharedPtr<additions::TaskReducersManagerIf> taskReducersManager);
35  void addWith(unsigned long long secondKey,
36  Poco::SharedPtr<additions::TaskReducersManagerIf> taskReducersManager);
37 
38 private:
39  std::map<HCE::types::MessageType, Poco::SharedPtr<additions::TaskReducersManagerIf> >_storage;
40  std::map<unsigned long long, Poco::SharedPtr<additions::TaskReducersManagerIf> >_secondKeyStorage;
41 
42  typedef std::map<HCE::types::MessageType, Poco::SharedPtr<additions::TaskReducersManagerIf> >::
43  iterator StorageIterator;
44  typedef std::map<unsigned long long, Poco::SharedPtr<additions::TaskReducersManagerIf> >::
45  iterator SecondKeyStorageIterator;
46 
47  StorageIterator findIteratorBy(HCE::types::MessageType key);
48  SecondKeyStorageIterator findIteratorBy(unsigned long long secondKey);
49 };
50 
51 }
52 }
53 
54 #endif