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

RequiredPropertiesConfig.hpp

1/* *********************************************************************
2 * This Original Work is copyright of 51 Degrees Mobile Experts Limited.
3 * Copyright 2026 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_REQUIRED_PROPERTIES_HPP
24#define FIFTYONE_DEGREES_REQUIRED_PROPERTIES_HPP
25
26#include <string>
27#include <vector>
28#include "properties.h"
29
30using std::string;
31using std::vector;
32
33namespace FiftyoneDegrees {
34 namespace Common {
35 FIFTYONE_DEGREES_COMMON_CXX_BEGIN
60 public:
65
72
79 RequiredPropertiesConfig(const vector<string> *properties);
80
87 RequiredPropertiesConfig(vector<string> *properties);
88
95 RequiredPropertiesConfig(const char *properties);
96
103 RequiredPropertiesConfig(const string &properties);
104
111 RequiredPropertiesConfig(const string *properties);
112
118
124
129 vector<string> getProperties() const;
130
138
144 int getCount() const;
145
149
156 bool containsProperty(const char *property) const;
157
164 bool containsProperty(const string property) const;
165 private:
168 };
169 FIFTYONE_DEGREES_COMMON_CXX_END
170 }
171}
172
173#endif
bool containsProperty(const char *property) const
Get whether or not the property name supplied is contained in the required properties configuration.
fiftyoneDegreesPropertiesRequired * getConfig()
Get a pointer to the underlying C required properties structure.
RequiredPropertiesConfig(const string *properties)
Construct a new instance of required RequiredPropertiesConfig using the list of property names suppli...
RequiredPropertiesConfig(const char *properties)
Construct a new instance of required RequiredPropertiesConfig using the list of property names suppli...
int getCount() const
Get the number of properties contained within the required properties configuration.
RequiredPropertiesConfig()
Constructs a new instance of the RequiredPropertiesConfig so that all possible properties contained i...
RequiredPropertiesConfig(vector< string > *properties)
Construct a new instance of required RequiredPropertiesConfig using the list of property names suppli...
RequiredPropertiesConfig(const vector< string > *properties)
Construct a new instance of required RequiredPropertiesConfig using the list of property names suppli...
virtual ~RequiredPropertiesConfig()
Destroy the configuration, freeing all the memory allocated within it.
vector< string > getProperties() const
Get the list of properties which are required.
RequiredPropertiesConfig(const string &properties)
Construct a new instance of required RequiredPropertiesConfig using the list of property names suppli...
bool containsProperty(const string property) const
Get whether or not the property name supplied is contained in the required properties configuration.
Shared classes.
Definition Collection.hpp:31
A C++ wrapper class for transform.h conversion routines.
Definition ComponentMetaDataBuilderHash.hpp:33
Defines a set of properties which are required by a caller.
Definition properties.h:229