Pepper_56_C_interfaces
Pepper_56_C_interfaces
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
PPB_VarArray_1_0 Struct Reference

Public Attributes

struct PP_Var(* Create )(void)
 
struct PP_Var(* Get )(struct PP_Var array, uint32_t index)
 
PP_Bool(* Set )(struct PP_Var array, uint32_t index, struct PP_Var value)
 
uint32_t(* GetLength )(struct PP_Var array)
 
PP_Bool(* SetLength )(struct PP_Var array, uint32_t length)
 

Member Data Documentation

struct PP_Var(* PPB_VarArray_1_0::Create)(void)

Creates an array var, i.e., a PP_Var with type set to PP_VARTYPE_ARRAY. The array length is set to 0.

Returns
An empty array var, whose reference count is set to 1 on behalf of the caller.
struct PP_Var(* PPB_VarArray_1_0::Get)(struct PP_Var array, uint32_t index)

Gets an element from the array.

Parameters
[in]arrayAn array var.
[in]indexAn index indicating which element to return.
Returns
The element at the specified position. The reference count of the element returned is incremented on behalf of the caller. If index is larger than or equal to the array length, an undefined var is returned.
uint32_t(* PPB_VarArray_1_0::GetLength)(struct PP_Var array)

Gets the array length.

Parameters
[in]arrayAn array var.
Returns
The array length.
PP_Bool(* PPB_VarArray_1_0::Set)(struct PP_Var array, uint32_t index, struct PP_Var value)

Sets the value of an element in the array.

Parameters
[in]arrayAn array var.
[in]indexAn index indicating which element to modify. If index is larger than or equal to the array length, the length is updated to be index + 1. Any position in the array that hasn't been set before is set to undefined, i.e., PP_Var of type PP_VARTYPE_UNDEFINED.
[in]valueThe value to set. The array holds a reference to it on success.
Returns
A PP_Bool indicating whether the operation succeeds.
PP_Bool(* PPB_VarArray_1_0::SetLength)(struct PP_Var array, uint32_t length)

Sets the array length.

Parameters
[in]arrayAn array var.
[in]lengthThe new array length. If length is smaller than its current value, the array is truncated to the new length; any elements that no longer fit are removed and the references to them will be released. If length is larger than its current value, undefined vars are appended to increase the array to the specified length.
Returns
A PP_Bool indicating whether the operation succeeds.

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