Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
Typedefs | Functions
SHI_Attribute Class

A hierarchical typed elements collection data structure. More...

Typedefs

typedef struct SHI_Attribute SHI_Attribute
 SHI_Attribute objects represent named values that can be arranged in a tree structure. More...
 

Functions

SHI_PUBLIC_API SHI_Result SHI_Attribute_Release (SHI_Attribute *self)
 Releases this attribute object. More...
 
SHI_PUBLIC_API const char * SHI_Attribute_GetName (SHI_Attribute *self)
 Returns the name of this attribute. More...
 
SHI_PUBLIC_API SHI_AttributeType SHI_Attribute_GetType (SHI_Attribute *self)
 Returns the type of this attribute. More...
 
SHI_PUBLIC_API SHI_Flags SHI_Attribute_GetFlags (SHI_Attribute *self)
 Returns the flags of this attribute. More...
 
SHI_PUBLIC_API SHI_Result SHI_Attribute_GetValue (SHI_Attribute *self, SHI_AttributeValue *value)
 Gets the value of this attribute. More...
 
SHI_PUBLIC_API SHI_Cardinal SHI_Attribute_GetChildCount (SHI_Attribute *self)
 Returns the number of children of this attribute. More...
 
SHI_PUBLIC_API SHI_Result SHI_Attribute_GetChildByName (SHI_Attribute *self, const char *name, SHI_Attribute **child)
 Gets a child of this attribute by name. More...
 
SHI_PUBLIC_API SHI_Result SHI_Attribute_GetChildByIndex (SHI_Attribute *self, SHI_Ordinal indx, SHI_Attribute **child)
 Gets a child of this attribute by index. More...
 

Detailed Description

A hierarchical typed elements collection data structure.

Typedef Documentation

◆ SHI_Attribute

typedef struct SHI_Attribute SHI_Attribute

SHI_Attribute objects represent named values that can be arranged in a tree structure.

An attribute has a name (possibly empty), a type, flags, and a value. Attributes of type SHI_ATTRIBUTE_TYPE_LIST also have children. All other types do not.

Function Documentation

◆ SHI_Attribute_GetChildByIndex()

SHI_PUBLIC_API SHI_Result SHI_Attribute_GetChildByIndex ( SHI_Attribute self,
SHI_Ordinal  indx,
SHI_Attribute **  child 
)

Gets a child of this attribute by index.

If this attribute has fewer attributes than the index minus one, this method returns SHI_ERROR_NO_SUCH_ITEM. The child object must be released before this attribute is released.

Parameters
selfThe SHI_Attribute whose child will be returned.
indxThe index of the child.
childAddress of a SHI_Attribute pointer that will be set to refer to a SHI_Attribute object containing the child.

◆ SHI_Attribute_GetChildByName()

SHI_PUBLIC_API SHI_Result SHI_Attribute_GetChildByName ( SHI_Attribute self,
const char *  name,
SHI_Attribute **  child 
)

Gets a child of this attribute by name.

If this attribute does not have a child by that name, this method returns SHI_ERROR_NO_SUCH_ITEM. The child object must be released before this attribute is released.

Parameters
selfThe SHI_Attribute whose child will be returned.
nameThe child name.
childAddress of a SHI_Attribute pointer that will be set to refer to a SHI_Attribute object containing the child.

◆ SHI_Attribute_GetChildCount()

SHI_PUBLIC_API SHI_Cardinal SHI_Attribute_GetChildCount ( SHI_Attribute self)

Returns the number of children of this attribute.

Only attributes of type SHI_ATTRIBUTE_TYPE_LIST can have children. For all other types, this method returns 0.

Parameters
selfThe SHI_Attribute whose number of children will be returned.
Returns
The number of children this attribute has.

◆ SHI_Attribute_GetFlags()

SHI_PUBLIC_API SHI_Flags SHI_Attribute_GetFlags ( SHI_Attribute self)

Returns the flags of this attribute.

The flags are a combination of zero or more bit flags. The possible bit flag values are defined as the constants named SHI_ATTRIBUTE_FLAG_...

Parameters
selfThe SHI_Attribute whose flags will be returned.
Returns
The attribute flags.

◆ SHI_Attribute_GetName()

SHI_PUBLIC_API const char* SHI_Attribute_GetName ( SHI_Attribute self)

Returns the name of this attribute.

If the attribute has no name, this returns an empty string.

Parameters
selfThe SHI_Attribute whose name will be returned.
Returns
The attribute name.

◆ SHI_Attribute_GetType()

SHI_PUBLIC_API SHI_AttributeType SHI_Attribute_GetType ( SHI_Attribute self)

Returns the type of this attribute.

Parameters
selfThe SHI_Attribute whose type will be returned.
Returns
The attribute type.

◆ SHI_Attribute_GetValue()

SHI_PUBLIC_API SHI_Result SHI_Attribute_GetValue ( SHI_Attribute self,
SHI_AttributeValue value 
)

Gets the value of this attribute.

For attributes of type SHI_ATTRIBUTE_TYPE_LIST or SHI_ATTRIBUTE_TYPE_UNKNOWN, this method returns SHI_ERROR_NOT_SUPPORTED and the contents of the value are undefined when this attribute is released.

Parameters
selfThe SHI_Attribute whose value will be returned.
valueA pointer to a SHI_AttributeValue struct into which this method will return the value.

◆ SHI_Attribute_Release()

SHI_PUBLIC_API SHI_Result SHI_Attribute_Release ( SHI_Attribute self)

Releases this attribute object.

The object may no longer be used after this method returns. All objects obtained from method calls to this object must be released before this object is released. Any names obtained from the SHI_Attribute_GetName() method and any values returned from the SHI_Attribute_GetValue() method are also invalidated by a call to this method.

Parameters
selfThe SHI_Attribute to release.