51Degrees Common C/C++  4.1

A shared functionality library that is used 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. More...
 ValueMetaDataKey (string propertyName, string valueName)
Construct a new instance of ValueMetaDataKey from the unique combination of property and value names. More...

Getters

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

Operators

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

Constructor & Destructor Documentation

◆ ValueMetaDataKey() [1/2]

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

Default constructor.

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

◆ ValueMetaDataKey() [2/2]

ValueMetaDataKey::ValueMetaDataKey ( string   propertyName,
string   valueName  
)

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

Parameters
propertyName - the name of the property the value relates to
valueName - the name of the value

Member Function Documentation

◆ getPropertyName()

const string ValueMetaDataKey::getPropertyName ( ) const

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

Get the name of the property which the key relates to.

Returns
name of the property
name of property

◆ getValueName()

const string ValueMetaDataKey::getValueName ( ) const

Get the name of the value which is being keyed.

Get the name of the value which the key relates to.

Returns
name of the value

◆ operator<()

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

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

Compare two keys for ordering.

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

Keys are ordered first on property name, then value name.

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

◆ operator==()

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

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

Return true if the two keys are equal.

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

To be equal, both keys must have the same property and value names.

Parameters
other - key to compare
Returns
true if equal

The documentation for this class was generated from the following files:
On This Page