\r\n

51Degrees Device Detection C/C++  4.4

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 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_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 
34 using std::shared_ptr;
35 
36 namespace FiftyoneDegrees {
37  namespace Common {
70  class MetaData {
71  public:
83  MetaData(shared_ptr<fiftyoneDegreesResourceManager> manager);
84 
88  virtual ~MetaData();
89 
102 
109 
116 
123 
138  getValuesForProperty(PropertyMetaData *property) const = 0;
139 
148  getValuesForProfile(ProfileMetaData *profile) const = 0;
149 
156  ProfileMetaData *profile) const = 0;
157 
164  PropertyMetaData *property) const = 0;
165 
173  ComponentMetaData *component) const = 0;
174 
183  PropertyMetaData *property) const = 0;
184 
194  getPropertiesForComponent(ComponentMetaData *component) const = 0;
195 
202  ValueMetaData *value) const = 0;
203 
214 
218  protected:
225  shared_ptr<fiftyoneDegreesResourceManager> manager;
226 
235  string getString(
236  fiftyoneDegreesCollection *strings,
237  uint32_t offset);
238  };
239  }
240 }
241 
242 #endif
string getString(fiftyoneDegreesCollection *strings, uint32_t offset)
Get a string from the collection and copy it to a C++ string instance.
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.
51Degrees base namespace.
Definition: ComponentMetaDataBuilderHash.hpp:33
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 Collection< string, PropertyMetaData > * getEvidencePropertiesForProperty(PropertyMetaData *property) const =0
Get the properties which are required to fetch extra evidence for a specified property.
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 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 ...
MetaData(shared_ptr< fiftyoneDegreesResourceManager > manager)
Construct a new instance of MetaData.
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:225
EntityMetaData relating to a component populated by an engine implementation.
Definition: ComponentMetaData.hpp:36
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 ProfileMetaData * getDefaultProfileForComponent(ComponentMetaData *component) const =0
Get the default profile for the specified component.
Meta data relating to a property populated by an engine implementation.
Definition: PropertyMetaData.hpp:37
Meta data relating to a value populated by an engine implementation.
Definition: ValueMetaData.hpp:116
Contains meta data for the properties, values, profiles and components that exist within the engine i...
Definition: MetaData.hpp:70
virtual ValueMetaData * getDefaultValueForProperty(PropertyMetaData *property) const =0
Get the default value 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,...
virtual ~MetaData()
Free any data and handles used for the meta data.
virtual Collection< string, PropertyMetaData > * getPropertiesForComponent(ComponentMetaData *component) const =0
Get a new Collection instance of the property meta data relating to the specified component,...
Meta data relating to a profile populated by an engine implementation.
Definition: ProfileMetaData.hpp:37
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 PropertyMetaData * getPropertyForValue(ValueMetaData *value) const =0
Get the property which the value relates to.
All the shared methods and fields required by file, memory and cached collections.
Definition: collection.h:408