hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SphinxNodeOptions.cpp
Go to the documentation of this file.
1 #include "SphinxNodeOptions.hpp"
2 
3 namespace HCE
4 {
5 namespace sphinx
6 {
7 //-----------------------------------------------------------------------------
8 SphinxNodeOptions::SphinxNodeOptions(const std::string& nodeName_, unsigned int nodeNumber_, const std::string& homeDir_, const std::string& indexName_)
9  : nodeName(nodeName_), nodeNumber(nodeNumber_), homeDir(""), indexName(indexName_), dataDir(""), runDir(""), logDir(""), etcDir("")
10 {
11  setHomeDir(homeDir_);
12 }
13 //-----------------------------------------------------------------------------
14 void SphinxNodeOptions::setHomeDir(const std::string& homeDir_)
15 {
16  homeDir = (homeDir_.empty())?sphinx_search_const::defaultHomeDir:homeDir_;
17  dataDir = homeDir+"/"+sphinx_search_const::defaultDataDir;
18  runDir = homeDir+"/"+sphinx_search_const::defaultRunDir;
19  logDir = homeDir+"/"+sphinx_search_const::defaultLogDir;
20  etcDir = homeDir+"/"+sphinx_search_const::defaultEtcDir;
21 }
22 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
24 } // namespace sphinx
25 } // namespace HCE
26 
27 
28 
29 
30