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

MetaData.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_METADATA_HPP
24#define FIFTYONE_DEGREES_METADATA_HPP
25
26#include "Collection.hpp"
27#include "ComponentMetaData.hpp"
28#include "PropertyMetaData.hpp"
29#include "ProfileMetaData.hpp"
30#include "ValueMetaData.hpp"
31#include "resource.h"
32#include <memory>
33
34using std::shared_ptr;
35
36namespace FiftyoneDegrees {
37 namespace Common {
38 FIFTYONE_DEGREES_COMMON_CXX_BEGIN
71 class MetaData {
72 public:
77
84 MetaData(shared_ptr<fiftyoneDegreesResourceManager> manager);
85
89 virtual ~MetaData();
90
96
103
110
117
124
130
140
150
157 ProfileMetaData *profile) const = 0;
158
165 PropertyMetaData *property) const = 0;
166
174 ComponentMetaData *component) const = 0;
175
184 PropertyMetaData *property) const = 0;
185
196
203 ValueMetaData *value) const = 0;
204
215
219 protected:
226 shared_ptr<fiftyoneDegreesResourceManager> manager;
227
237 string getValue(
239 uint32_t offset,
240 fiftyoneDegreesPropertyValueType storedValueType);
241 };
242 FIFTYONE_DEGREES_COMMON_CXX_END
243 }
244}
245
246#endif
A group of items accessible by index or key.
Definition Collection.hpp:79
EntityMetaData relating to a component populated by an engine implementation.
Definition ComponentMetaData.hpp:37
virtual ~MetaData()
Free any data and handles used for the meta data.
virtual Collection< byte, ComponentMetaData > * getComponents() const =0
Get a new Collection instance of all component meta data keyed on the unique id of the component.
virtual Collection< ValueMetaDataKey, ValueMetaData > * getValues() const =0
Get a new Collection instance of all value meta data keyed on the name of the value and the property ...
virtual ValueMetaData * getDefaultValueForProperty(PropertyMetaData *property) const =0
Get the default value for the specified component.
virtual Collection< uint32_t, ProfileMetaData > * getProfiles() const =0
Get a new Collection instance of all profile meta data keyed on the unique id of the profile.
virtual Collection< string, PropertyMetaData > * getPropertiesForComponent(ComponentMetaData *component) const =0
Get a new Collection instance of the property meta data relating to the specified component,...
shared_ptr< fiftyoneDegreesResourceManager > manager
A shared pointer to the manager is passed around and referenced by all instances that hold open a res...
Definition MetaData.hpp:226
MetaData(shared_ptr< fiftyoneDegreesResourceManager > manager)
Construct a new instance of MetaData.
string getValue(fiftyoneDegreesCollection *strings, uint32_t offset, fiftyoneDegreesPropertyValueType storedValueType)
Get a value from the collection and copy it as string to a C++ string instance.
virtual Collection< string, PropertyMetaData > * getProperties() const =0
Get a new Collection instance of all property meta data keyed on the name of the property.
virtual PropertyMetaData * getPropertyForValue(ValueMetaData *value) const =0
Get the property which the value relates to.
virtual Collection< ValueMetaDataKey, ValueMetaData > * getValuesForProfile(ProfileMetaData *profile) const =0
Get a new Collection instance of value meta data for the specified profile, keyed on the name of the ...
virtual Collection< string, PropertyMetaData > * getEvidencePropertiesForProperty(PropertyMetaData *property) const =0
Get the properties which are required to fetch extra evidence for a specified property.
virtual ComponentMetaData * getComponentForProfile(ProfileMetaData *profile) const =0
Get the Component which the specified profile relates to.
virtual ComponentMetaData * getComponentForProperty(PropertyMetaData *property) const =0
Get the Component which the specified property relates to.
virtual ProfileMetaData * getDefaultProfileForComponent(ComponentMetaData *component) const =0
Get the default profile for the specified component.
virtual Collection< ValueMetaDataKey, ValueMetaData > * getValuesForProperty(PropertyMetaData *property) const =0
Get a new Collection instance of value meta data relating to the specified property,...
Meta data relating to a profile populated by an engine implementation.
Definition ProfileMetaData.hpp:38
Meta data relating to a property populated by an engine implementation.
Definition PropertyMetaData.hpp:38
Meta data relating to a value populated by an engine implementation.
Definition ValueMetaData.hpp:130
Shared classes.
Definition Collection.hpp:31
A C++ wrapper class for transform.h conversion routines.
Definition ComponentMetaDataBuilderHash.hpp:33
All the shared methods and fields required by file, memory and cached collections.
Definition collection.h:408