\r\n

51Degrees Device Detection C/C++  4.4

A device detection library that is used natively or by 51Degrees products

ConfigHash.hpp

1 /* *********************************************************************
2  * This Original Work is copyright of 51 Degrees Mobile Experts Limited.
3  * Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
4  * Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
5  *
6  * This Original Work is licensed under the European Union Public Licence
7  * (EUPL) v.1.2 and is subject to its terms as set out below.
8  *
9  * If a copy of the EUPL was not distributed with this file, You can obtain
10  * one at https://opensource.org/licenses/EUPL-1.2.
11  *
12  * The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
13  * amended by the European Commission) shall be deemed incompatible for
14  * the purposes of the Work and the provisions of the compatibility
15  * clause in Article 5 of the EUPL shall not apply.
16  *
17  * If using the Work as, or as part of, a network application, by
18  * including the attribution notice(s) required under Article 5 of the EUPL
19  * in the end user terms of the application under an appropriate heading,
20  * such notice(s) shall fulfill the requirements of that article.
21  * ********************************************************************* */
22 
23 #ifndef FIFTYONE_DEGREES_CONFIG_HASH_HPP
24 #define FIFTYONE_DEGREES_CONFIG_HASH_HPP
25 
26 #include "../common-cxx/CollectionConfig.hpp"
27 #include "../ConfigDeviceDetection.hpp"
28 #include "hash.h"
29 
30 using std::min_element;
31 using namespace FiftyoneDegrees::Common;
32 
33 namespace FiftyoneDegrees {
34  namespace DeviceDetection {
35  namespace Hash {
73  public:
83  ConfigHash();
84 
92 
104  void setHighPerformance();
105 
110  void setBalanced();
111 
116  void setBalancedTemp();
117 
122  void setLowMemory();
123 
129  void setMaxPerformance();
130 
139  void setDifference(int32_t difference);
140 
147  void setDrift(int32_t drift);
148 
159  void setUsePerformanceGraph(bool use);
160 
170  void setUsePredictiveGraph(bool use);
171 
180  void setConcurrency(uint16_t concurrency);
181 
189  void setTraceRoute(bool shouldTrace);
190 
201  CollectionConfig getStrings();
202 
207  CollectionConfig getProperties();
208 
213  CollectionConfig getValues();
214 
219  CollectionConfig getProfiles();
220 
225  CollectionConfig getNodes();
226 
231  CollectionConfig getProfileOffsets();
232 
238  int getDrift();
239 
246  int getDifference();
247 
253  bool getUsePerformanceGraph();
254 
260  bool getUsePredictiveGraph();
261 
267  uint16_t getConcurrency() const;
268 
276  bool getTraceRoute();
277 
284  fiftyoneDegreesConfigHash* getConfig();
285 
289  private:
292 
294  CollectionConfig strings;
295 
297  CollectionConfig properties;
298 
300  CollectionConfig values;
301 
303  CollectionConfig profiles;
304 
306  CollectionConfig nodes;
307 
309  CollectionConfig profileOffsets;
310 
312  CollectionConfig maps;
313 
315  CollectionConfig components;
316 
321  void initCollectionConfig();
322 
328  void setPerformanceFromExistingConfig(
329  fiftyoneDegreesConfigHash *existing);
330  };
331  };
332  }
333 }
334 #endif
C++ class wrapper for the fiftyoneDegreesCollectionConfig structure.
Definition: CollectionConfig.hpp:50
C++ class wrapper for the fiftyoneDegreesConfigDeviceDetection configuration structure.
Definition: ConfigDeviceDetection.hpp:65
51Degrees base namespace.
Definition: ComponentMetaDataBuilderHash.hpp:33
C++ class wrapper for the fiftyoneDegreesConfigHash configuration structure.
Definition: ConfigHash.hpp:72
fiftyoneDegreesConfigHash ConfigHash
Synonym for fiftyoneDegreesConfigHash type.
Definition: fiftyone.h:51
Hash specific configuration structure.
Definition: hash.h:243
Shared classes.
Definition: Collection.hpp:31