hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SphinxConfigOptions.hpp
Go to the documentation of this file.
1 
14 #ifndef SPHINX_CONFIG_OPTIONS_HPP
15 #define SPHINX_CONFIG_OPTIONS_HPP
16 
17 #include <time.h>
18 #include <vector>
19 
20 namespace HCE
21 {
22 namespace sphinx
23 {
24 //-----------------------------------------------------------------------------
26 {
27 public:
28  SphinxConfigOptions(void);
30 
31  void clear(void);
32 
33  void setMaxDocId(unsigned long long maxDocId_) {maxDocId=maxDocId_;}
34  unsigned long long getMaxDocId(void) const {return maxDocId;}
35 
36  void setCreatedDate(time_t createdDate_) {createdDate=createdDate_;}
37  time_t getCreatedDate(void) const {return createdDate;}
38  void updateCreatedDate(void);
39 
40  void setMergedDate(time_t mergedDate_) {mergedDate=mergedDate_;}
41  time_t getMergedDate(void) const {return mergedDate;}
42  void updateMargedDate(void);
43 
44  void addBranch(const std::string& branchName);
45  void addBranch(std::string&& branchName);
46  void addBranches(const std::vector<std::string>& branches);
47 
48  size_t getBranchesCount(void) const;
49  std::string getBranchItem(size_t index) const;
50  std::string getBranchesAsString(void) const;
51 
52  void setRanker(unsigned int ranker_) {ranker=ranker_;}
53  unsigned int getRanker(void) const {return ranker;}
54 
55  void setRankerExpression(const std::string& rankerExpression_) {rankerExpression=rankerExpression_;}
56  std::string getRankerExpression(void) const {return rankerExpression;}
57 
58 private:
59  unsigned long long maxDocId;
60  time_t createdDate;
61  time_t mergedDate;
62  std::vector<std::string> branches;
63  unsigned int ranker;
64  std::string rankerExpression;
65 };
66 //-----------------------------------------------------------------------------
67 //-----------------------------------------------------------------------------
68 } // end namespace sphinx
69 } // end namespace HCE
70 
71 #endif // SPHINX_CONFIG_OPTIONS_HPP