\r\n

51Degrees Device Detection C/C++  4.4

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

ValueMetaData.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_VALUE_META_DATA_HPP
24 #define FIFTYONE_DEGREES_VALUE_META_DATA_HPP
25 
26 #include <string>
27 #include <vector>
28 #include "EntityMetaData.hpp"
29 #include "value.h"
30 
31 
32 namespace FiftyoneDegrees {
33  namespace Common {
41  public:
52 
60  ValueMetaDataKey(string propertyName, string valueName);
61 
72  const string getPropertyName() const;
73 
78  const string getValueName() const;
79 
92  const bool operator< (ValueMetaDataKey other) const;
93 
100  const bool operator== (ValueMetaDataKey other) const;
101 
105  private:
107  string propertyName;
108 
110  string valueName;
111  };
112 
116  class ValueMetaData : public EntityMetaData<ValueMetaDataKey> {
117  public:
127  ValueMetaData();
128 
136 
145  ValueMetaDataKey key,
146  string description,
147  string url);
148 
160  string getName() const;
161 
166  string getDescription() const;
167 
172  string getUrl() const;
173 
177  private:
179  string description;
180 
182  string url;
183  };
184  }
185 }
186 
187 #endif
const string getPropertyName() const
Get the name of the property that the value keyed relates to.
string getName() const
Get the name of the value.
string getDescription() const
Get the full description of the value.
ValueMetaData()
Default constructor, should not be used externally as it produces an invalid instance.
51Degrees base namespace.
Definition: ComponentMetaDataBuilderHash.hpp:33
const string getValueName() const
Get the name of the value which is being keyed.
string getUrl() const
Get the URL containing any extra information about the value.
Meta data relating to a value populated by an engine implementation.
Definition: ValueMetaData.hpp:116
const bool operator<(ValueMetaDataKey other) const
Override the less than operator so the unique key can be used to order lists.
Key used to store ValueMetaData in a Collection.
Definition: ValueMetaData.hpp:40
Base class for any entity meta data.
Definition: EntityMetaData.hpp:46
const bool operator==(ValueMetaDataKey other) const
Override the equality operator so the unique key can be found in a generic collection.