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
SphinxResultDataMemoryManager.hpp
Go to the documentation of this file.
1 
14 #ifndef SPHINX_RESULT_DATA_MEMORY_MANAGER_HPP
15 #define SPHINX_RESULT_DATA_MEMORY_MANAGER_HPP
16 
17 #include "SphinxResultData.hpp"
18 
19 namespace HCE
20 {
21 namespace sphinx
22 {
23 //-----------------------------------------------------------------------------
25 {
26 public:
27  explicit SphinxResultDataMemoryManager(SphinxResultData& resultData);
29 
30  void resetMatchInfo(void);
31  void setMatchInfoDocId(unsigned long long docId);
32  void setMatchInfoWeight(const std::string& weight);
33  bool addMatchInfoAttr(AttrInfo&& attrInfo);
34  bool applyMatchInfo(void);
35 
36  void reset(void);
37  void resize(size_t , size_t);
38 
39  size_t getMatchesCount(void) const {return matchesCount;}
40  size_t getAttributesCount(void) const {return attributesCount;}
41 private:
42  SphinxMatchInfo matchInfo;
43  SphinxResultData& resultData;
44  size_t matchesCount;
45  size_t attributesCount;
46 };
47 //-----------------------------------------------------------------------------
48 //-----------------------------------------------------------------------------
49 } // namespace sphinx
50 } // namespace HCE
51 
52 #endif // SPHINX_RESULT_DATA_MEMORY_MANAGER_HPP