struct_p_p_b___var_array__1__0.html revision cedac228d2dd51db4b79ea1e72c7f249408ee061
1{{+bindTo:partials.standard_nacl_api}}
2<h1>PPB_VarArray Struct Reference</h1>
3<div id="doxygen-ref">
4{{- dummy div to appease doxygen -}}
5  <div>
6<!-- Generated by Doxygen 1.7.6.1 -->
7
8
9</div>
10<!--header-->
11<div class="contents">
12<!-- doxytag: class="PPB_VarArray" --><h2>
13Data Fields</h2><table class="memberdecls">
14
15<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___var_array__1__0.html#af70ca94305325f09306058ec87f50ca5">Create</a> )(void)</td></tr>
16<tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___var_array__1__0.html#a20431bfeea806a1af61d4cca2f1f1437">Get</a> )(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> array, uint32_t index)</td></tr>
17<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___var_array__1__0.html#aea60f6d4917fa248237c6bfd1eda92fe">Set</a> )(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> array, uint32_t index, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> value)</td></tr>
18<tr><td class="memItemLeft" align="right" valign="top">uint32_t(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___var_array__1__0.html#ab1163119c730c95fea571a4618b8cc8f">GetLength</a> )(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> array)</td></tr>
19<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___var_array__1__0.html#a4868611700bcca797bfae701870ce83b">SetLength</a> )(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> array, uint32_t length)</td></tr>
20</table>
21<hr /><h2>Field Documentation</h2>
22<a class="anchor" id="af70ca94305325f09306058ec87f50ca5"></a><!-- doxytag: member="PPB_VarArray::Create" ref="af70ca94305325f09306058ec87f50ca5" args=")(void)" -->
23<div class="memitem">
24<div class="memproto">
25<table class="memname">
26<tr>
27<td class="memname">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(* <a class="el" href="struct_p_p_b___var_array__1__0.html#af70ca94305325f09306058ec87f50ca5">PPB_VarArray::Create</a>)(void)<code> [read]</code></td>
28</tr>
29</table>
30</div>
31<div class="memdoc">
32<p>Creates an array var, i.e., a <code><a class="el" href="struct_p_p___var.html" title="The PP_VAR struct is a variant data type and can contain any value of one of the types named in the P...">PP_Var</a></code> with type set to <code>PP_VARTYPE_ARRAY</code>. </p>
33<p>The array length is set to 0.</p>
34<dl class="return"><dt><b>Returns:</b></dt><dd>An empty array var, whose reference count is set to 1 on behalf of the caller. </dd></dl>
35</div>
36</div>
37<a class="anchor" id="a20431bfeea806a1af61d4cca2f1f1437"></a><!-- doxytag: member="PPB_VarArray::Get" ref="a20431bfeea806a1af61d4cca2f1f1437" args=")(struct PP_Var array, uint32_t index)" -->
38<div class="memitem">
39<div class="memproto">
40<table class="memname">
41<tr>
42<td class="memname">struct <a class="el" href="struct_p_p___var.html">PP_Var</a>(* <a class="el" href="struct_p_p_b___var_array__1__0.html#a20431bfeea806a1af61d4cca2f1f1437">PPB_VarArray::Get</a>)(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> array, uint32_t index)<code> [read]</code></td>
43</tr>
44</table>
45</div>
46<div class="memdoc">
47<p>Gets an element from the array. </p>
48<dl class="params"><dt><b>Parameters:</b></dt><dd>
49<table class="params">
50<tr><td class="paramdir">[in]</td><td class="paramname">array</td><td>An array var. </td></tr>
51<tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>An index indicating which element to return.</td></tr>
52</table>
53</dd>
54</dl>
55<dl class="return"><dt><b>Returns:</b></dt><dd>The element at the specified position. The reference count of the element returned is incremented on behalf of the caller. If <code>index</code> is larger than or equal to the array length, an undefined var is returned. </dd></dl>
56</div>
57</div>
58<a class="anchor" id="ab1163119c730c95fea571a4618b8cc8f"></a><!-- doxytag: member="PPB_VarArray::GetLength" ref="ab1163119c730c95fea571a4618b8cc8f" args=")(struct PP_Var array)" -->
59<div class="memitem">
60<div class="memproto">
61<table class="memname">
62<tr>
63<td class="memname">uint32_t(* <a class="el" href="struct_p_p_b___var_array__1__0.html#ab1163119c730c95fea571a4618b8cc8f">PPB_VarArray::GetLength</a>)(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> array)</td>
64</tr>
65</table>
66</div>
67<div class="memdoc">
68<p>Gets the array length. </p>
69<dl class="params"><dt><b>Parameters:</b></dt><dd>
70<table class="params">
71<tr><td class="paramdir">[in]</td><td class="paramname">array</td><td>An array var.</td></tr>
72</table>
73</dd>
74</dl>
75<dl class="return"><dt><b>Returns:</b></dt><dd>The array length. </dd></dl>
76</div>
77</div>
78<a class="anchor" id="aea60f6d4917fa248237c6bfd1eda92fe"></a><!-- doxytag: member="PPB_VarArray::Set" ref="aea60f6d4917fa248237c6bfd1eda92fe" args=")(struct PP_Var array, uint32_t index, struct PP_Var value)" -->
79<div class="memitem">
80<div class="memproto">
81<table class="memname">
82<tr>
83<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___var_array__1__0.html#aea60f6d4917fa248237c6bfd1eda92fe">PPB_VarArray::Set</a>)(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> array, uint32_t index, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> value)</td>
84</tr>
85</table>
86</div>
87<div class="memdoc">
88<p>Sets the value of an element in the array. </p>
89<dl class="params"><dt><b>Parameters:</b></dt><dd>
90<table class="params">
91<tr><td class="paramdir">[in]</td><td class="paramname">array</td><td>An array var. </td></tr>
92<tr><td class="paramdir">[in]</td><td class="paramname">index</td><td>An index indicating which element to modify. If <code>index</code> is larger than or equal to the array length, the length is updated to be <code>index</code> + 1. Any position in the array that hasn't been set before is set to undefined, i.e., <code><a class="el" href="struct_p_p___var.html" title="The PP_VAR struct is a variant data type and can contain any value of one of the types named in the P...">PP_Var</a></code> of type <code>PP_VARTYPE_UNDEFINED</code>. </td></tr>
93<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The value to set. The array holds a reference to it on success.</td></tr>
94</table>
95</dd>
96</dl>
97<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Bool</code> indicating whether the operation succeeds. </dd></dl>
98</div>
99</div>
100<a class="anchor" id="a4868611700bcca797bfae701870ce83b"></a><!-- doxytag: member="PPB_VarArray::SetLength" ref="a4868611700bcca797bfae701870ce83b" args=")(struct PP_Var array, uint32_t length)" -->
101<div class="memitem">
102<div class="memproto">
103<table class="memname">
104<tr>
105<td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___var_array__1__0.html#a4868611700bcca797bfae701870ce83b">PPB_VarArray::SetLength</a>)(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> array, uint32_t length)</td>
106</tr>
107</table>
108</div>
109<div class="memdoc">
110<p>Sets the array length. </p>
111<dl class="params"><dt><b>Parameters:</b></dt><dd>
112<table class="params">
113<tr><td class="paramdir">[in]</td><td class="paramname">array</td><td>An array var. </td></tr>
114<tr><td class="paramdir">[in]</td><td class="paramname">length</td><td>The new array length. If <code>length</code> 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 <code>length</code> is larger than its current value, undefined vars are appended to increase the array to the specified length.</td></tr>
115</table>
116</dd>
117</dl>
118<dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Bool</code> indicating whether the operation succeeds. </dd></dl>
119</div>
120</div>
121<hr />The documentation for this struct was generated from the following file:<ul>
122<li><a class="el" href="ppb__var__array_8h.html">ppb_var_array.h</a></li>
123</ul>
124</div><!-- contents -->
125</div>
126{{/partials.standard_nacl_api}}
127