ddc
ServerOptions.h
Go to the documentation of this file.
1 //-*- Mode: C++ -*-
2 //
3 // DDC originally by Alexey Sokirko
4 // Changes and modifications 2011-2018 by Bryan Jurish
5 //
6 // This file is part of DDC.
7 //
8 // DDC is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Lesser General Public License as published by
10 // the Free Software Foundation, either version 3 of the License, or
11 // (at your option) any later version.
12 //
13 // DDC is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public License
19 // along with DDC. If not, see <http://www.gnu.org/licenses/>.
20 //
21 #include "../CommonLib/ddcVersion.h"
22 #ifndef DDC_SERVER_OPTIONS_H
23 #define DDC_SERVER_OPTIONS_H
24 
25 #include "../CommonLib/string_socket.h"
26 #include "../CommonLib/utilit.h"
27 
28 //==============================================================================
31 {
32 public:
33  //--------------------------------------------------------------
34  // logging
35 
38 
41 
42  /* OBSOLETE time window for mocing average query time (seconds, default=600: 10 minutes) */
43  //size_t m_StatsWindow;
44 
45  //--------------------------------------------------------------
46  // client threads & parallelization
47 
49  size_t m_nWorkers;
50 
53 
56 
57  //--------------------------------------------------------------
58  // navigation cache
59 
62 
65 
66  //--------------------------------------------------------------
67  // compatibility
68 
71 
73 
74 public:
75  //--------------------------------------------------------------
76  // Constructors etc.
77 
80 
81 public:
82  //--------------------------------------------------------------
83  // I/O
84 
86  void LoadFile(const string& Filename);
87 
89  void LoadString(const string& Options, const string& srcName="String");
90 
92  void LoadLines(const vector<string>& Lines, const string& srcName="Lines");
93 
101  bool Set(const string& Option, const string& Value="", const string& srcName="Option");
102 
104  string toString() const;
105 };
106 
107 #endif /* DDC_SERVER_OPTIONS_H */
108 
109 /*--- emacs style variables ---
110  * Local Variables:
111  * mode: C++
112  * c-file-style: "ellemtel"
113  * c-basic-offset: 4
114  * tab-width: 8
115  * indent-tabs-mode: nil
116  * End:
117  */
size_t m_ThreadQueueSize
Definition: ServerOptions.h:52
DDCLogLevel m_LogLevel
Definition: ServerOptions.h:37
mode_t m_UnixSocketPerms
Definition: ServerOptions.h:72
bool m_bHitStringsParallel
Definition: ServerOptions.h:55
bool Set(const string &Option, const string &Value="", const string &srcName="Option")
Definition: ServerOptions.cpp:79
size_t m_nWorkers
Definition: ServerOptions.h:49
size_t m_NavCacheStep
Definition: ServerOptions.h:64
int DDCLogLevel
Definition: ddcLog.h:38
DDCVersionT m_VersionCompat
Definition: ServerOptions.h:70
string toString() const
Definition: ServerOptions.cpp:125
void LoadFile(const string &Filename)
Definition: ServerOptions.cpp:47
CDDCServerOptions()
Definition: ServerOptions.cpp:33
void LoadString(const string &Options, const string &srcName="String")
Definition: ServerOptions.cpp:56
size_t m_NavCacheSize
Definition: ServerOptions.h:61
double m_SlowQueryTimeout
Definition: ServerOptions.h:40
Definition: ServerOptions.h:30
void LoadLines(const vector< string > &Lines, const string &srcName="Lines")
Definition: ServerOptions.cpp:63
Definition: ddcVersion.h:12