51Degrees Device Detection C/C++  4.1

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 2019 51 Degrees Mobile Experts Limited, 5 Charlotte Close,
4  * Caversham, Reading, Berkshire, United Kingdom RG4 7BY.
5  *
6  * This Original Work is licensed under the European Union Public Licence (EUPL)
7  * 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 namespace FiftyoneDegrees {
35  namespace Common {
68  class MetaData {
69  public:
81  MetaData(shared_ptr<fiftyoneDegreesResourceManager> manager);
82 
86  virtual ~MetaData();
87 
100 
107 
114 
121 
136  getValuesForProperty(PropertyMetaData *property) = 0;
137 
146  getValuesForProfile(ProfileMetaData *profile) = 0;
147 
154  ProfileMetaData *profile) = 0;
155 
162  PropertyMetaData *property) = 0;
163 
171  ComponentMetaData *component) = 0;
172 
181  PropertyMetaData *property) = 0;
182 
193 
200  ValueMetaData *value) = 0;
201 
212 
216  protected:
223  shared_ptr<fiftyoneDegreesResourceManager> manager;
224 
233  string getString(
234  fiftyoneDegreesCollection *strings,
235  uint32_t offset);
236  };
237  }
238 }
239 
240 #endif
virtual Collection< byte, ComponentMetaData > * getComponents()=0
Get a new Collection instance of all component meta data keyed on the unique id of the component.
string getString(fiftyoneDegreesCollection *strings, uint32_t offset)
Get a string from the collection and copy it to a C++ string instance.
virtual Collection< ValueMetaDataKey, ValueMetaData > * getValuesForProfile(ProfileMetaData *profile)=0
Get a new Collection instance of value meta data for the specified profile, keyed on the name of the ...
virtual Collection< string, PropertyMetaData > * getProperties()=0
Get a new Collection instance of all property meta data keyed on the name of the property.
51Degrees base namespace.
Definition: ComponentMetaDataBuilderHash.hpp:34
virtual ComponentMetaData * getComponentForProperty(PropertyMetaData *property)=0
Get the Component which the specified property relates to.
virtual ProfileMetaData * getDefaultProfileForComponent(ComponentMetaData *component)=0
Get the default profile for the specified component.
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:223
EntityMetaData relating to a component populated by an engine implementation.
Definition: ComponentMetaData.hpp:37
virtual Collection< uint32_t, ProfileMetaData > * getProfiles()=0
Get a new Collection instance of all profile meta data keyed on the unique id of the profile.
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:117
Contains meta data for the properties, values, profiles and components that exist within the engine i...
Definition: MetaData.hpp:68
virtual PropertyMetaData * getPropertyForValue(ValueMetaData *value)=0
Get the property which the value relates to.
virtual Collection< ValueMetaDataKey, ValueMetaData > * getValuesForProperty(PropertyMetaData *property)=0
Get a new Collection instance of value meta data relating to the specified property,...
virtual Collection< string, PropertyMetaData > * getPropertiesForComponent(ComponentMetaData *component)=0
Get a new Collection instance of the property meta data relating to the specified component,...
virtual ~MetaData()
Free any data and handles used for the meta data.
virtual ValueMetaData * getDefaultValueForProperty(PropertyMetaData *property)=0
Get the default value for the specified component.
virtual Collection< string, PropertyMetaData > * getEvidencePropertiesForProperty(PropertyMetaData *property)=0
Get the properties which are required to fetch extra evidence for a specified property.
virtual Collection< ValueMetaDataKey, ValueMetaData > * getValues()=0
Get a new Collection instance of all value meta data keyed on the name of the value and the property ...
Meta data relating to a profile populated by an engine implementation.
Definition: ProfileMetaData.hpp:37
All the shared methods and fields required by file, memory and cached collections.
Definition: collection.h:407
virtual ComponentMetaData * getComponentForProfile(ProfileMetaData *profile)=0
Get the Component which the specified profile relates to.