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

FiftyoneDegrees::Common::ValueMetaDataKey Class Reference

Detailed Description

Key used to store ValueMetaData in a Collection.

A value name is not unique, however it is unique within the collection of values for a single property. For this reason, the key consists of the property name and the value name.

Public Member Functions

Constructors

 ValueMetaDataKey ()
 Default constructor.
 ValueMetaDataKey (string propertyName, string valueName)
 Construct a new instance of ValueMetaDataKey from the unique combination of property and value names.
 ValueMetaDataKey (const string &propertyName, const uint8_t *valueName, long valueNameLength)
 Construct a new instance of ValueMetaDataKey from the unique combination of property and value names.

Getters

const string getPropertyName () const
 Get the name of the property that the value keyed relates to.
const string getValueName () const
 Get the name of the value which is being keyed.

Operators

const bool operator< (ValueMetaDataKey other) const
 Override the less than operator so the unique key can be used to order lists.
const bool operator== (ValueMetaDataKey other) const
 Override the equality operator so the unique key can be found in a generic collection.

Constructor & Destructor Documentation

◆ ValueMetaDataKey() [1/3]

FiftyoneDegrees::Common::ValueMetaDataKey::ValueMetaDataKey ( )

Default constructor.

This should not be used externally as it returns an invalid instance.

◆ ValueMetaDataKey() [2/3]

FiftyoneDegrees::Common::ValueMetaDataKey::ValueMetaDataKey ( string propertyName,
string valueName )

Construct a new instance of ValueMetaDataKey from the unique combination of property and value names.

Parameters
propertyNamethe name of the property the value relates to
valueNamethe name of the value

◆ ValueMetaDataKey() [3/3]

FiftyoneDegrees::Common::ValueMetaDataKey::ValueMetaDataKey ( const string & propertyName,
const uint8_t * valueName,
long valueNameLength )

Construct a new instance of ValueMetaDataKey from the unique combination of property and value names.

Parameters
propertyNamethe name of the property the value relates to
valueNamethe name of the value
valueNameLengththe length of the name of the value

Member Function Documentation

◆ getPropertyName()

const string FiftyoneDegrees::Common::ValueMetaDataKey::getPropertyName ( ) const

Get the name of the property that the value keyed relates to.

Returns
name of the property

◆ getValueName()

const string FiftyoneDegrees::Common::ValueMetaDataKey::getValueName ( ) const

Get the name of the value which is being keyed.

Returns
name of the value

◆ operator<()

const bool FiftyoneDegrees::Common::ValueMetaDataKey::operator< ( ValueMetaDataKey other) const

Override the less than operator so the unique key can be used to order lists.

Parameters
otherthe other key to compare
Returns
true if this key comes before the other key

◆ operator==()

const bool FiftyoneDegrees::Common::ValueMetaDataKey::operator== ( ValueMetaDataKey other) const

Override the equality operator so the unique key can be found in a generic collection.

Parameters
otherthe other key to compare
Returns
true if both keys are equal

The documentation for this class was generated from the following file: