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
SphinxTaskReducersStorage.hpp
Go to the documentation of this file.
1 
14 #ifndef SPHINXTASKREDUCERSSTORAGE_HPP_
15 #define SPHINXTASKREDUCERSSTORAGE_HPP_
16 
19 #include "Exceptions.hpp"
20 #include <map>
21 #include <utility>
22 
23 namespace HCE{
24 namespace sphinx{
25 namespace reduce_task{
26 
28 public:
29  typedef std::map<unsigned long long, Poco::SharedPtr<SphinxTaskReducerIf> >::
30  iterator StorageIterator;
31 
34 
35  Poco::SharedPtr<SphinxTaskReducerIf>findByKey (unsigned long long taskId);
36  void deleteByKey(unsigned long long taskId);
37  void addWithKey(unsigned long long taskId, Poco::SharedPtr<SphinxTaskReducerIf>&
38  sphinxTaskReducer);
39 
40 private:
41  std::map<unsigned long long, Poco::SharedPtr<SphinxTaskReducerIf> >storage;
42 
43  StorageIterator findIteratorBy(unsigned long long taskId);
44 };
45 
46 }
47 }
48 }
49 
50 #endif