\r\n

51Degrees Device Detection C/C++  4.4

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

Values

Detailed Description

Value of a data set relating to a property.

Introduction

A Value is stored in a values collection and contains the meta data for a specific value of a property in a data set.

Get

A value can be fetched from a values collection in one of two ways:

By Index : the fiftyoneDegreesValueGet method return the value at a specified index. This provides a way to access a value at a known index, or iterate over all values.

By Name : if the index of a value is not known, then the value can be fetched using the fiftyoneDegreesValueGetByName method to find the value in a values collection. This requires that the property the value relates to is also known, as values are only unique within the values which relate to a single property. For example "True" could be a value of many properties.

Collaboration diagram for Values:

Structs

struct  fiftyoneDegreesValue
Value structure containing meta data relating to the value. More...

Functions

fiftyoneDegreesString *  fiftyoneDegreesValueGetName (fiftyoneDegreesCollection *strings, fiftyoneDegreesValue *value, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Returns the string name of the value using the item provided. More...
fiftyoneDegreesString *  fiftyoneDegreesValueGetDescription (fiftyoneDegreesCollection *strings, fiftyoneDegreesValue *value, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Returns the string description of the value using the item provided. More...
fiftyoneDegreesString *  fiftyoneDegreesValueGetUrl (fiftyoneDegreesCollection *strings, fiftyoneDegreesValue *value, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Returns the string URL of the value using the item provided. More...
fiftyoneDegreesValue *  fiftyoneDegreesValueGet (fiftyoneDegreesCollection *values, uint32_t valueIndex, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Gets the value for the requested index from the collection provided. More...
fiftyoneDegreesValue *  fiftyoneDegreesValueGetByName (fiftyoneDegreesCollection *values, fiftyoneDegreesCollection *strings, fiftyoneDegreesProperty *property, const char *valueName, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Get the value for the requested name from the collection provided. More...
long  fiftyoneDegreesValueGetIndexByName (fiftyoneDegreesCollection *values, fiftyoneDegreesCollection *strings, fiftyoneDegreesProperty *property, const char *valueName, fiftyoneDegreesException *exception)
Get index of the value for the requested name from the collection provided. More...

Function Documentation

◆ fiftyoneDegreesValueGet()

fiftyoneDegreesValue* fiftyoneDegreesValueGet ( fiftyoneDegreesCollection *   values,
uint32_t   valueIndex,
fiftyoneDegreesCollectionItem *   item,
fiftyoneDegreesException *   exception  
)

Gets the value for the requested index from the collection provided.

Parameters
values - collection to get the value from
valueIndex - index of the value to get
item - to store the value in
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
pointer to the value or NULL

◆ fiftyoneDegreesValueGetByName()

fiftyoneDegreesValue* fiftyoneDegreesValueGetByName ( fiftyoneDegreesCollection *   values,
fiftyoneDegreesCollection *   strings,
fiftyoneDegreesProperty *   property,
const char *   valueName,
fiftyoneDegreesCollectionItem *   item,
fiftyoneDegreesException *   exception  
)

Get the value for the requested name from the collection provided.

Parameters
values - collection to get the value from
strings - collection containing the value names
property - that the value relates to
valueName - name of the value to get
item - to store the value in
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h
Returns
pointer to the value or NULL if it does not exist

◆ fiftyoneDegreesValueGetDescription()

fiftyoneDegreesString* fiftyoneDegreesValueGetDescription ( fiftyoneDegreesCollection *   strings,
fiftyoneDegreesValue *   value,
fiftyoneDegreesCollectionItem *   item,
fiftyoneDegreesException *   exception  
)

Returns the string description of the value using the item provided.

The collection item must be released when the caller is finished with the string.

Parameters
strings - collection of strings retrieved by offsets.
value - structure for the description required.
item - used to store the resulting string in.
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
a pointer to a string in the collection item data structure.

◆ fiftyoneDegreesValueGetIndexByName()

long fiftyoneDegreesValueGetIndexByName ( fiftyoneDegreesCollection *   values,
fiftyoneDegreesCollection *   strings,
fiftyoneDegreesProperty *   property,
const char *   valueName,
fiftyoneDegreesException *   exception  
)

Get index of the value for the requested name from the collection provided.

Parameters
values - collection to get the value from
strings - collection containing the value names
property - that the value relates to
valueName - name of the value to get
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h
Returns
the 0 based index of the item if found, otherwise -1

◆ fiftyoneDegreesValueGetName()

fiftyoneDegreesString* fiftyoneDegreesValueGetName ( fiftyoneDegreesCollection *   strings,
fiftyoneDegreesValue *   value,
fiftyoneDegreesCollectionItem *   item,
fiftyoneDegreesException *   exception  
)

Returns the string name of the value using the item provided.

The collection item must be released when the caller is finished with the string.

Parameters
strings - collection of strings retrieved by offsets.
value - structure for the name required.
item - used to store the resulting string in.
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
a pointer to a string in the collection item data structure.

◆ fiftyoneDegreesValueGetUrl()

fiftyoneDegreesString* fiftyoneDegreesValueGetUrl ( fiftyoneDegreesCollection *   strings,
fiftyoneDegreesValue *   value,
fiftyoneDegreesCollectionItem *   item,
fiftyoneDegreesException *   exception  
)

Returns the string URL of the value using the item provided.

The collection item must be released when the caller is finished with the string.

Parameters
strings - collection of strings retrieved by offsets.
value - structure for the URL required.
item - used to store the resulting string in.
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
a pointer to a string in the collection item data structure.
On This Page