SmartFoxServer 2X C++ API
ConfigData.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of ConfigData
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __ConfigData__
12 #define __ConfigData__
13 
14 #include "./Common.h"
15 
16 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
17 
18 #if defined(_MSC_VER)
19 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
20 #endif
21 #include <string> // STL library: string object
22 using namespace std; // STL library: declare the STL namespace
23 
24 namespace Sfs2X {
25 namespace Util {
26 
35  class DLLImportExport ConfigData
36  {
37  public:
38 
39  // -------------------------------------------------------------------
40  // Public methods
41  // -------------------------------------------------------------------
42 
43  ConfigData();
44 
52  string Host();
53 
61  void Host(string value);
62 
70  unsigned short int Port();
71 
79  void Port(unsigned short int value);
80 
88  string UdpHost();
89 
97  void UdpHost(string value);
98 
106  unsigned short int UdpPort();
107 
115  void UdpPort(unsigned short int value);
116 
124  string Zone();
125 
133  void Zone(string value);
134 
142  bool Debug();
143 
151  void Debug(bool value);
152 
160  unsigned short int HttpPort();
161 
169  void HttpPort(unsigned short int value);
170 
179  unsigned short int HttpsPort();
180 
189  void HttpsPort(unsigned short int value);
190 
198  bool UseBlueBox();
199 
207  void UseBlueBox(bool value);
208 
216  long int BlueBoxPollingRate();
217 
225  void BlueBoxPollingRate(long int value);
226 
234  bool ForceIPv6();
235 
244  void ForceIPv6(bool value);
245 
246  // -------------------------------------------------------------------
247  // Public members
248  // -------------------------------------------------------------------
249 
250  protected:
251 
252  // -------------------------------------------------------------------
253  // Protected methods
254  // -------------------------------------------------------------------
255 
256  // -------------------------------------------------------------------
257  // Protected members
258  // -------------------------------------------------------------------
259 
260 
261  private:
262 
263  // -------------------------------------------------------------------
264  // Private methods
265  // -------------------------------------------------------------------
266 
267  // -------------------------------------------------------------------
268  // Private members
269  // -------------------------------------------------------------------
270 
271  boost::shared_ptr<string> host;
272  unsigned short int port;
273  boost::shared_ptr<string> udpHost;
274  unsigned short int udpPort;
275  boost::shared_ptr<string> zone;
276  bool debug;
277 
278  unsigned short int httpPort;
279  unsigned short int httpsPort;
280  bool useBlueBox;
281  long int blueBoxPollingRate;
282  bool forceIPv6;
283  };
284 
285 } // namespace Util
286 } // namespace Sfs2X
287 
288 #endif
The ConfigData class stores the client configuration data loaded from an external XML file or passed ...
Definition: ConfigData.h:35
STL namespace.
Definition: SmartFox.cpp:24