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
SphinxReduceDataStorage.hpp
Go to the documentation of this file.
1 
15 #ifndef SPHINXREDUCEDATASTORAGE_HPP_
16 #define SPHINXREDUCEDATASTORAGE_HPP_
17 
18 #include "ReduceTaskCore.hpp"
19 #include "SphinxMatchInfo.hpp"
20 #include <map>
21 #include <utility>
22 
23 namespace HCE
24 {
25 namespace sphinx
26 {
27  namespace reduce_task
28  {
30  public:
31  typedef std::multimap<std::string, SphinxMatchInfo>::iterator DataBoundIterator;
32  typedef std::pair<DataBoundIterator, DataBoundIterator> DataRangeIterator;
33 
36 
37  bool hasNext();
38  void reset();
39  void getNext(std::string & key, std::string& value);
40 
41  void addData(const SphinxMatchInfo& sphinxMatchInfo);
42  DataRangeIterator getData(const std::string& key);
43 
44  private:
45  std::multimap<std::string, SphinxMatchInfo> _data;
46  DataBoundIterator _keyValueIterator;
47  };
48  }
49 }
50 }
51 #endif