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

PropertyMetaData.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_PROPERTY_META_DATA_HPP
24#define FIFTYONE_DEGREES_PROPERTY_META_DATA_HPP
25
26#include <string>
27#include <vector>
28#include "EntityMetaData.hpp"
29
30
31namespace FiftyoneDegrees {
32 namespace Common {
33 FIFTYONE_DEGREES_COMMON_CXX_BEGIN
38 class PropertyMetaData : public EntityMetaData<string> {
39 public:
44
50
58
89 string name,
90 vector<string> dataFilesWherePresent,
91 string type,
92 string category,
93 string url,
94 bool available,
95 byte displayOrder,
96 bool isMandatory,
97 bool isList,
98 bool isObsolete,
99 bool show,
100 bool showValues,
101 string description,
102 string defaultValue,
103 byte componentId,
104 vector<uint32_t> evidenceProperties);
105
111
116 string getName() const;
117
123 vector<string> getDataFilesWherePresent() const;
124
129 string getType() const;
130
135 string getCategory() const;
136
141 string getUrl() const;
142
148 bool getAvailable() const;
149
154 int getDisplayOrder() const;
155
161 bool getIsMandatory() const;
162
168 bool getIsList() const;
169
175 bool getIsObsolete() const;
176
181 bool getShow() const;
182
188 bool getShowValues() const;
189
194 string getDescription() const;
195
202 string getDefaultValue() const;
203
209 byte getComponentId() const;
210
215 vector<uint32_t> getEvidenceProperties() const;
216
220 private:
222 vector<string> dataFilesWherePresent;
223
225 string type;
226
228 string category;
229
231 string url;
232
234 bool available;
235
237 byte displayOrder;
238
240 bool isMandatory;
241
243 bool isList;
244
246 bool isObsolete;
247
249 bool show;
250
252 bool showValues;
253
255 string description;
256
258 string defaultValue;
259
261 byte componentId;
262
265 vector<uint32_t> evidenceProperties;
266 };
267 FIFTYONE_DEGREES_COMMON_CXX_END
268 }
269}
270
271#endif
EntityMetaData(string key)
Definition EntityMetaData.hpp:58
bool getAvailable() const
Get whether or not the property is available in the active data set.
bool getIsList() const
Get whether or not the value of the property is a list.
int getDisplayOrder() const
Get the order in which the property should be displayed.
PropertyMetaData(string name, vector< string > dataFilesWherePresent, string type, string category, string url, bool available, byte displayOrder, bool isMandatory, bool isList, bool isObsolete, bool show, bool showValues, string description, string defaultValue, byte componentId, vector< uint32_t > evidenceProperties)
Construct a new instance of PropertyMetaData.
PropertyMetaData()
Default constructor, should not be used externally as it produces an invalid instance.
string getName() const
Get the name of the property.
string getType() const
Get the type of data which the property refers to e.g.
string getCategory() const
Get the category which the property belongs to e.g.
bool getIsMandatory() const
Get whether or not the property is mandatory.
byte getComponentId() const
Get the component id of the property.
vector< uint32_t > getEvidenceProperties() const
Get the evidence property indexes for the property.
string getDescription() const
Get the full description of the property.
string getUrl() const
Get the URL related to the property.
bool getShowValues() const
Get whether or not the values of the property should be displayed.
PropertyMetaData(PropertyMetaData *property)
Construct a new instance of PropertyMetaData from an existing instance.
bool getShow() const
Get whether or not the property should be displayed.
bool getIsObsolete() const
Get whether or not the property is obsolete.
vector< string > getDataFilesWherePresent() const
Get the list of data file tiers where the property is available e.g.
string getDefaultValue() const
Gets the default value as a string for the property.
Shared classes.
Definition Collection.hpp:31
A C++ wrapper class for transform.h conversion routines.
Definition ComponentMetaDataBuilderHash.hpp:33