51Degrees Common C/C++  4.1

A shared functionality library that is used by 51Degrees products

ConfigBase.hpp

1 /* *********************************************************************
2  * This Source Code Form is copyright of 51 Degrees Mobile Experts Limited.
3  * Copyright 2019 51 Degrees Mobile Experts Limited, 5 Charlotte Close,
4  * Caversham, Reading, Berkshire, United Kingdom RG4 7BY
5  *
6  * This Source Code Form is subject to the terms of the Mozilla Public
7  * License, v. 2.0.
8  *
9  * If a copy of the MPL was not distributed with this file, You can obtain
10  * one at http://mozilla.org/MPL/2.0/.
11  *
12  * This Source Code Form is "Incompatible With Secondary Licenses", as
13  * defined by the Mozilla Public License, v. 2.0.
14  * ********************************************************************* */
15 
16 #ifndef FIFTYONE_DEGREES_CONFIG_BASE_HPP
17 #define FIFTYONE_DEGREES_CONFIG_BASE_HPP
18 
19 #include <vector>
20 #include <string>
21 #include "Exceptions.hpp"
22 #include "config.h"
23 
24 using namespace std;
25 
26 namespace FiftyoneDegrees {
27  namespace Common {
53  class ConfigBase {
54  public:
66 
70  virtual ~ConfigBase();
71 
83  void setUseUpperPrefixHeaders(bool use);
84 
90  void setUseTempFile(bool use);
91 
97  void setReuseTempFile(bool reuse);
98 
107  void setTempDirectories(vector<string> tempDirs);
108 
115  void setFreeData(bool shouldFree);
116 
129  bool getUseUpperPrefixHeaders();
130 
136  bool getUseTempFile();
137 
143  bool getReuseTempFile();
144 
151  vector<string> getTempDirectories();
152 
157  virtual uint16_t getConcurrency();
158 
162  private:
165 
168  vector<string> tempDirs;
169 
173  void freeTempDirectories();
174 
179  void mapTempDirectories();
180  };
181  }
182 }
183 
184 #endif
51Degrees base namespace.
Definition: Collection.hpp:24
C++ class wrapper for the fiftyoneDegreesConfigBase configuration structure.
Definition: ConfigBase.hpp:53
Base configuration structure containing common configuration options, and options that apply to struc...
Definition: config.h:42