Detailed Description
Contains meta data for the properties, values, profiles and components that exist within the engine instance.
All Collections returned are new instances which hold a reference to the underlying data structures, so must be disposed of. All single meta data instances returned either by this class or the Collections it returns hold no reference and are safe to hold on to.
Example Usage
Inheritance diagram for FiftyoneDegrees::Common::MetaData:
Public Member Functions | |
Constructors and Destructors | |
| MetaData (shared_ptr< fiftyoneDegreesResourceManager > manager) | |
| Construct a new instance of MetaData. | |
| virtual | ~MetaData () |
| Free any data and handles used for the meta data. | |
Getters | |
| 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< string, PropertyMetaData > * | getProperties () const =0 |
| Get a new Collection instance of all property meta data keyed on the name of the property. | |
| 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< 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 it relates to. | |
Filtered Getters | |
| virtual Collection< ValueMetaDataKey, ValueMetaData > * | getValuesForProperty (PropertyMetaData *property) const =0 |
| Get a new Collection instance of value meta data relating to the specified property, keyed on the name of the value and 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 value and the property it relates to. | |
| 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 ValueMetaData * | getDefaultValueForProperty (PropertyMetaData *property) const =0 |
| Get the default value for the specified component. | |
| virtual Collection< string, PropertyMetaData > * | getPropertiesForComponent (ComponentMetaData *component) const =0 |
| Get a new Collection instance of the property meta data relating to the specified component, keyed on the name of the property. | |
| virtual PropertyMetaData * | getPropertyForValue (ValueMetaData *value) const =0 |
| Get the property which the value 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. | |
Protected Member Functions | |
| 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. | |
Protected Attributes | |
| shared_ptr< fiftyoneDegreesResourceManager > | manager |
| A shared pointer to the manager is passed around and referenced by all instances that hold open a resource handle. | |
Constructor & Destructor Documentation
◆ MetaData()
| FiftyoneDegrees::Common::MetaData::MetaData | ( | shared_ptr< fiftyoneDegreesResourceManager > | manager | ) |
Construct a new instance of MetaData.
This should only be used internally by engines.
- Parameters
-
manager shared pointer to the manager instance to get data from
Member Function Documentation
◆ getComponentForProfile()
|
pure virtual |
Get the Component which the specified profile relates to.
- Parameters
-
profile to get the component for
- Returns
- component the profile relates to
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
◆ getComponentForProperty()
|
pure virtual |
Get the Component which the specified property relates to.
- Parameters
-
property to get the component for
- Returns
- component the property relates to
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
◆ getComponents()
|
pure virtual |
Get a new Collection instance of all component meta data keyed on the unique id of the component.
- Returns
- all components
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
◆ getDefaultProfileForComponent()
|
pure virtual |
Get the default profile for the specified component.
This is the profile that will be used if there is no match.
- Parameters
-
component to get the default profile for
- Returns
- default profile for the component
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
◆ getDefaultValueForProperty()
|
pure virtual |
Get the default value for the specified component.
This is the value that will be used if a profile does not contain a value for the property.
- Parameters
-
property to get the default value for
- Returns
- default value for the property
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
◆ getEvidencePropertiesForProperty()
|
pure virtual |
Get the properties which are required to fetch extra evidence for a specified property.
If a property is not available (i.e. not set as a required property on engine construction) this will always be empty.
- Parameters
-
property to get the evidence properties for
- Returns
- evidence properties for the property
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
◆ getProfiles()
|
pure virtual |
Get a new Collection instance of all profile meta data keyed on the unique id of the profile.
- Returns
- all profiles
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
◆ getProperties()
|
pure virtual |
Get a new Collection instance of all property meta data keyed on the name of the property.
- Returns
- all properties
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
- Examples
- Hash/MetaData.cpp.
◆ getPropertiesForComponent()
|
pure virtual |
Get a new Collection instance of the property meta data relating to the specified component, keyed on the name of the property.
These are the properties which a profile relating to the component will contain.
- Parameters
-
component to get the properties for
- Returns
- properties for the component
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
◆ getPropertyForValue()
|
pure virtual |
Get the property which the value relates to.
- Parameters
-
value to get the property for
- Returns
- property the value relates to
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
◆ getValue()
|
protected |
Get a value from the collection and copy it as string to a C++ string instance.
This method releases the collection item before returning.
- Parameters
-
strings pointer to the collection containing the string offset of the string in the collection storedValueType format of byte array representation.
- Returns
- copy of the requested value from the collection as string
◆ getValues()
|
pure virtual |
Get a new Collection instance of all value meta data keyed on the name of the value and the property it relates to.
- Returns
- all values
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
◆ getValuesForProfile()
|
pure virtual |
Get a new Collection instance of value meta data for the specified profile, keyed on the name of the value and the property it relates to.
- Parameters
-
profile to get the values for
- Returns
- values for the profile
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
◆ getValuesForProperty()
|
pure virtual |
Get a new Collection instance of value meta data relating to the specified property, keyed on the name of the value and the property.
- Parameters
-
property to get the values for
- Returns
- values for the property
Implemented in FiftyoneDegrees::DeviceDetection::Hash::MetaDataHash.
Field Documentation
◆ manager
|
protected |
A shared pointer to the manager is passed around and referenced by all instances that hold open a resource handle.
This acts as a counter to ensure that the pointer to the manager remains valid until the last handle is freed. The shared pointer also handles freeing the pointer once no references remain. See resource.h for more information.
The documentation for this class was generated from the following file:
