Detailed Description
Property in a data set relating to a single component.
Introduction
A property is stored in a properties collection and contains the meta data for a specific property in a data set.
Get
A property can be fetched from a properties collection in one of two ways:
By Index : The fiftyoneDegreesPropertyGet method return the property at a specified index. This provides a way to access a property at a known index, or iterate over all properties.
By Name : If the index of a property is not known, then the property can be fetched using the fiftyoneDegreesPropertyGetByName method to find the property in a properties collection.
Collaboration diagram for Property:
Structs | |
| struct | fiftyoneDegreesProperty |
| Property structure containing all the meta data relating to a property. More... | |
| struct | fiftyoneDegreesPropertyTypeRecord |
| Property structure containing stored type of a property. More... | |
Enumerations | |
| enum | fiftyoneDegreesPropertyText { FIFTYONE_DEGREES_PROPERTY_TEXT_NAME = 0 , FIFTYONE_DEGREES_PROPERTY_TEXT_DESCRIPTION = 1 , FIFTYONE_DEGREES_PROPERTY_TEXT_CATEGORY = 2 , FIFTYONE_DEGREES_PROPERTY_TEXT_URL = 3 , FIFTYONE_DEGREES_PROPERTY_TEXT_DEFAULT_VALUE = 4 } |
| The text of a property that fiftyoneDegreesPropertyGetText gives. More... | |
Functions | |
| const fiftyoneDegreesString * | fiftyoneDegreesPropertyGetName (const fiftyoneDegreesCollection *stringsCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception) |
| Returns the string name of the property using the item provided. | |
| fiftyoneDegreesPropertyValueType | fiftyoneDegreesPropertyGetStoredType (const fiftyoneDegreesCollection *propertyTypesCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesException *exception) |
| Returns the type the property is stored as. | |
| fiftyoneDegreesPropertyValueType | fiftyoneDegreesPropertyGetStoredTypeByIndex (const fiftyoneDegreesCollection *propertyTypesCollection, uint32_t index, fiftyoneDegreesException *exception) |
| Returns the type the property is stored as. | |
| const fiftyoneDegreesString * | fiftyoneDegreesPropertyGetDescription (const fiftyoneDegreesCollection *stringsCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception) |
| Returns the string description of the property using the item provided. | |
| const fiftyoneDegreesString * | fiftyoneDegreesPropertyGetCategory (const fiftyoneDegreesCollection *stringsCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception) |
| Returns the string category of the property using the item provided. | |
| const fiftyoneDegreesString * | fiftyoneDegreesPropertyGetUrl (const fiftyoneDegreesCollection *stringsCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception) |
| Returns the string URL of the property using the item provided. | |
| byte | fiftyoneDegreesPropertyGetValueType (fiftyoneDegreesCollection *properties, uint32_t index, fiftyoneDegreesException *exception) |
| Gets the value type for the property at the index in the collection. | |
| fiftyoneDegreesProperty * | fiftyoneDegreesPropertyGet (fiftyoneDegreesCollection *properties, uint32_t index, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception) |
| Gets the property at the requested index from the properties collection provided. | |
| const fiftyoneDegreesProperty * | fiftyoneDegreesPropertyGetByName (fiftyoneDegreesCollection *properties, fiftyoneDegreesCollection *strings, const char *requiredPropertyName, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception) |
| Gets the property with the requested name from the properties collection provided. | |
| int | fiftyoneDegreesPropertyGetIndexByName (fiftyoneDegreesCollection *properties, fiftyoneDegreesCollection *strings, const char *propertyName, fiftyoneDegreesException *exception) |
| Gets the index in the properties collection of the property with the name provided, which must match exactly. | |
| char * | fiftyoneDegreesPropertyGetText (const fiftyoneDegreesCollection *values, const fiftyoneDegreesCollection *strings, const fiftyoneDegreesCollection *propertyTypes, const fiftyoneDegreesProperty *property, fiftyoneDegreesPropertyText text, char *buffer, size_t bufferLength, fiftyoneDegreesException *exception) |
| Gets a text of the property as the metadata gives it. | |
| char * | fiftyoneDegreesPropertyGetMapText (const fiftyoneDegreesCollection *strings, const fiftyoneDegreesCollection *maps, const fiftyoneDegreesProperty *property, uint32_t mapIndex, char *buffer, size_t bufferLength, fiftyoneDegreesException *exception) |
| Gets the name of one of the maps the property is in, which the metadata gives as the data files the property is present in, such as "Lite". | |
| uint32_t | fiftyoneDegreesPropertyGetValueCount (const fiftyoneDegreesCollection *values, const fiftyoneDegreesProperty *property) |
Gets the number of values the values collection holds for the property, which are at the indexes from its firstValueIndex to its lastValueIndex. | |
Enumeration Type Documentation
◆ fiftyoneDegreesPropertyText
The text of a property that fiftyoneDegreesPropertyGetText gives.
Enumerator | |
| FIFTYONE_DEGREES_PROPERTY_TEXT_NAME | The property's name. |
| FIFTYONE_DEGREES_PROPERTY_TEXT_DESCRIPTION | The property's description, empty when it has none. |
| FIFTYONE_DEGREES_PROPERTY_TEXT_CATEGORY | The name of the category the property is in, empty when it is in none. |
| FIFTYONE_DEGREES_PROPERTY_TEXT_URL | The URL of more about the property, empty when it has none. |
| FIFTYONE_DEGREES_PROPERTY_TEXT_DEFAULT_VALUE | The property's default value, as fiftyoneDegreesValueGetDefaultText gives it. |
Function Documentation
◆ fiftyoneDegreesPropertyGet()
| fiftyoneDegreesProperty * fiftyoneDegreesPropertyGet | ( | fiftyoneDegreesCollection * | properties, |
| uint32_t | index, | ||
| fiftyoneDegreesCollectionItem * | item, | ||
| fiftyoneDegreesException * | exception ) |
Gets the property at the requested index from the properties collection provided.
- Parameters
-
properties to get the property from index of the property to get item to store the property item in exception pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
- Returns
- the property requested or NULL
◆ fiftyoneDegreesPropertyGetByName()
| const fiftyoneDegreesProperty * fiftyoneDegreesPropertyGetByName | ( | fiftyoneDegreesCollection * | properties, |
| fiftyoneDegreesCollection * | strings, | ||
| const char * | requiredPropertyName, | ||
| fiftyoneDegreesCollectionItem * | item, | ||
| fiftyoneDegreesException * | exception ) |
Gets the property with the requested name from the properties collection provided.
- Parameters
-
properties to get the property from strings collection containing the names of the properties requiredPropertyName name of the property to get item to store the property item in exception pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
- Returns
- the property requested or NULL
◆ fiftyoneDegreesPropertyGetCategory()
| const fiftyoneDegreesString * fiftyoneDegreesPropertyGetCategory | ( | const fiftyoneDegreesCollection * | stringsCollection, |
| const fiftyoneDegreesProperty * | property, | ||
| fiftyoneDegreesCollectionItem * | item, | ||
| fiftyoneDegreesException * | exception ) |
Returns the string category of the property using the item provided.
The collection item must be released when the caller is finished with the string.
- Parameters
-
stringsCollection collection of strings retrieved by offsets. property structure for the category 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.
◆ fiftyoneDegreesPropertyGetDescription()
| const fiftyoneDegreesString * fiftyoneDegreesPropertyGetDescription | ( | const fiftyoneDegreesCollection * | stringsCollection, |
| const fiftyoneDegreesProperty * | property, | ||
| fiftyoneDegreesCollectionItem * | item, | ||
| fiftyoneDegreesException * | exception ) |
Returns the string description of the property using the item provided.
The collection item must be released when the caller is finished with the string.
- Parameters
-
stringsCollection collection of strings retrieved by offsets. property 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.
◆ fiftyoneDegreesPropertyGetIndexByName()
| int fiftyoneDegreesPropertyGetIndexByName | ( | fiftyoneDegreesCollection * | properties, |
| fiftyoneDegreesCollection * | strings, | ||
| const char * | propertyName, | ||
| fiftyoneDegreesException * | exception ) |
Gets the index in the properties collection of the property with the name provided, which must match exactly.
This finds the property that fiftyoneDegreesPropertyGetByName gets.
- Parameters
-
properties collection to find the property in strings collection containing the names of the properties propertyName name of the property to find exception pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
- Returns
- the 0 based index of the property, or -1 when no property has the name or reading a property or a name sets the exception. A property whose name the strings collection gives nothing for is taken as the one named, so its index is returned.
◆ fiftyoneDegreesPropertyGetMapText()
| char * fiftyoneDegreesPropertyGetMapText | ( | const fiftyoneDegreesCollection * | strings, |
| const fiftyoneDegreesCollection * | maps, | ||
| const fiftyoneDegreesProperty * | property, | ||
| uint32_t | mapIndex, | ||
| char * | buffer, | ||
| size_t | bufferLength, | ||
| fiftyoneDegreesException * | exception ) |
Gets the name of one of the maps the property is in, which the metadata gives as the data files the property is present in, such as "Lite".
The name is written as fiftyoneDegreesPropertyGetText writes a text.
- Parameters
-
strings collection containing the names of the maps maps collection of the offsets in stringsof the map namesproperty the property to get the name of a map of mapIndex the 0 based place of the map among the property's mapCountmapsbuffer memory the name is written into when it fits bufferLength the bytes bufferholdsexception pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
- Returns
- the null terminated name, or NULL. NULL with no exception set means the strings collection gives nothing at the map's offset, and NULL with the exception set means
mapIndexis not less than the property'smapCountor the name cannot be read or written.
◆ fiftyoneDegreesPropertyGetName()
| const fiftyoneDegreesString * fiftyoneDegreesPropertyGetName | ( | const fiftyoneDegreesCollection * | stringsCollection, |
| const fiftyoneDegreesProperty * | property, | ||
| fiftyoneDegreesCollectionItem * | item, | ||
| fiftyoneDegreesException * | exception ) |
Returns the string name of the property using the item provided.
The collection item must be released when the caller is finished with the string.
- Parameters
-
stringsCollection collection of strings retrieved by offsets. property 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.
◆ fiftyoneDegreesPropertyGetStoredType()
| fiftyoneDegreesPropertyValueType fiftyoneDegreesPropertyGetStoredType | ( | const fiftyoneDegreesCollection * | propertyTypesCollection, |
| const fiftyoneDegreesProperty * | property, | ||
| fiftyoneDegreesException * | exception ) |
Returns the type the property is stored as.
- Parameters
-
propertyTypesCollection collection of property types retrieved by offsets. property structure for the type required. exception pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
- Returns
- a type the property is stored as.
◆ fiftyoneDegreesPropertyGetStoredTypeByIndex()
| fiftyoneDegreesPropertyValueType fiftyoneDegreesPropertyGetStoredTypeByIndex | ( | const fiftyoneDegreesCollection * | propertyTypesCollection, |
| uint32_t | index, | ||
| fiftyoneDegreesException * | exception ) |
Returns the type the property is stored as.
- Parameters
-
propertyTypesCollection collection of property types retrieved by offsets. index of the property to get exception pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
- Returns
- a type the property is stored as.
◆ fiftyoneDegreesPropertyGetText()
| char * fiftyoneDegreesPropertyGetText | ( | const fiftyoneDegreesCollection * | values, |
| const fiftyoneDegreesCollection * | strings, | ||
| const fiftyoneDegreesCollection * | propertyTypes, | ||
| const fiftyoneDegreesProperty * | property, | ||
| fiftyoneDegreesPropertyText | text, | ||
| char * | buffer, | ||
| size_t | bufferLength, | ||
| fiftyoneDegreesException * | exception ) |
Gets a text of the property as the metadata gives it.
A description, category or URL the property does not have is an empty text, as is a string the strings collection gives nothing for. The text is written into buffer when it fits, and otherwise into memory the caller frees, as fiftyoneDegreesStoredBinaryValueToText describes.
- Parameters
-
values collection containing the property's values, which only FIFTYONE_DEGREES_PROPERTY_TEXT_DEFAULT_VALUE reads strings collection containing the property's strings propertyTypes collection of the type each property's values are stored as, or NULL when every value is stored as a string, which only FIFTYONE_DEGREES_PROPERTY_TEXT_DEFAULT_VALUE reads property the property to get the text of text which text of the property to get buffer memory the text is written into when it fits bufferLength the bytes bufferholdsexception pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
- Returns
- the null terminated text, or NULL when it cannot be read or written or
textis none of fiftyoneDegreesPropertyText
◆ fiftyoneDegreesPropertyGetUrl()
| const fiftyoneDegreesString * fiftyoneDegreesPropertyGetUrl | ( | const fiftyoneDegreesCollection * | stringsCollection, |
| const fiftyoneDegreesProperty * | property, | ||
| fiftyoneDegreesCollectionItem * | item, | ||
| fiftyoneDegreesException * | exception ) |
Returns the string URL of the property using the item provided.
The collection item must be released when the caller is finished with the string.
- Parameters
-
stringsCollection collection of strings retrieved by offsets. property 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, or to an empty string if the property has no URL.
◆ fiftyoneDegreesPropertyGetValueCount()
| uint32_t fiftyoneDegreesPropertyGetValueCount | ( | const fiftyoneDegreesCollection * | values, |
| const fiftyoneDegreesProperty * | property ) |
Gets the number of values the values collection holds for the property, which are at the indexes from its firstValueIndex to its lastValueIndex.
A property whose value indexes are not both in the collection, as when both are -1, has none.
- Parameters
-
values collection containing the property's values property the property to count the values of
- Returns
- the number of values
◆ fiftyoneDegreesPropertyGetValueType()
| byte fiftyoneDegreesPropertyGetValueType | ( | fiftyoneDegreesCollection * | properties, |
| uint32_t | index, | ||
| fiftyoneDegreesException * | exception ) |
Gets the value type for the property at the index in the collection.
- Parameters
-
properties collection to retrieve the property type from index of the property in the collection exception pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
- Returns
- the value type as a byte for the property at the index.
