Upstream version 5.34.92.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / doc_generated / pepper_beta / c / struct_p_p_b___var_dictionary__1__0.html
1 {{+bindTo:partials.standard_nacl_article}}
2 <h1>PPB_VarDictionary Struct Reference</h1>
3 <div>
4 <!-- Generated by Doxygen 1.7.6.1 -->
5
6
7 </div>
8 <!--header-->
9 <div class="contents">
10 <!-- doxytag: class="PPB_VarDictionary" --><h2>
11 Data Fields</h2><table class="memberdecls">
12
13 <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_dictionary__1__0.html#a1fad06939f6d2c711a319d6b984f45f5">Create</a> )(void)</td></tr>
14 <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_dictionary__1__0.html#ac078e850f04e097ee67cefc3a475ec77">Get</a> )(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> dict, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> key)</td></tr>
15 <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_dictionary__1__0.html#a8af80f44eaab36b5c8bc670be405dc21">Set</a> )(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> dict, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> key, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> value)</td></tr>
16 <tr><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_p_p_b___var_dictionary__1__0.html#a2df16916e3bd3ecc2de6e27100bb71db">Delete</a> )(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> dict, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> key)</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_dictionary__1__0.html#a2b7c0b449352d77b0c36c2bdb270eb9a">HasKey</a> )(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> dict, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> key)</td></tr>
18 <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_dictionary__1__0.html#ab481ddec5b69bf964b63e859decc1e97">GetKeys</a> )(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> dict)</td></tr>
19 </table>
20 <hr /><a name="details" id="details"></a><h2>Detailed Description</h2>
21 <div class="textblock"><p>A dictionary var contains key-value pairs with unique keys. </p>
22 <p>The keys are strings while the values can be arbitrary vars. Key comparison is always done by value instead of by reference. </p>
23 </div><hr /><h2>Field Documentation</h2>
24 <a class="anchor" id="a1fad06939f6d2c711a319d6b984f45f5"></a><!-- doxytag: member="PPB_VarDictionary::Create" ref="a1fad06939f6d2c711a319d6b984f45f5" args=")(void)" -->
25 <div class="memitem">
26 <div class="memproto">
27 <table class="memname">
28 <tr>
29 <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_dictionary__1__0.html#a1fad06939f6d2c711a319d6b984f45f5">PPB_VarDictionary::Create</a>)(void)<code> [read]</code></td>
30 </tr>
31 </table>
32 </div>
33 <div class="memdoc">
34 <p>Creates a dictionary 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_DICTIONARY</code>. </p>
35 <dl class="return"><dt><b>Returns:</b></dt><dd>An empty dictionary var, whose reference count is set to 1 on behalf of the caller. </dd></dl>
36 </div>
37 </div>
38 <a class="anchor" id="a2df16916e3bd3ecc2de6e27100bb71db"></a><!-- doxytag: member="PPB_VarDictionary::Delete" ref="a2df16916e3bd3ecc2de6e27100bb71db" args=")(struct PP_Var dict, struct PP_Var key)" -->
39 <div class="memitem">
40 <div class="memproto">
41 <table class="memname">
42 <tr>
43 <td class="memname">void(* <a class="el" href="struct_p_p_b___var_dictionary__1__0.html#a2df16916e3bd3ecc2de6e27100bb71db">PPB_VarDictionary::Delete</a>)(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> dict, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> key)</td>
44 </tr>
45 </table>
46 </div>
47 <div class="memdoc">
48 <p>Deletes the specified key and its associated value, if the key exists. </p>
49 <p>The reference to the element will be released.</p>
50 <dl class="params"><dt><b>Parameters:</b></dt><dd>
51 <table class="params">
52 <tr><td class="paramdir">[in]</td><td class="paramname">dict</td><td>A dictionary var. </td></tr>
53 <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>A string var. </td></tr>
54 </table>
55 </dd>
56 </dl>
57 </div>
58 </div>
59 <a class="anchor" id="ac078e850f04e097ee67cefc3a475ec77"></a><!-- doxytag: member="PPB_VarDictionary::Get" ref="ac078e850f04e097ee67cefc3a475ec77" args=")(struct PP_Var dict, struct PP_Var key)" -->
60 <div class="memitem">
61 <div class="memproto">
62 <table class="memname">
63 <tr>
64 <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_dictionary__1__0.html#ac078e850f04e097ee67cefc3a475ec77">PPB_VarDictionary::Get</a>)(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> dict, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> key)<code> [read]</code></td>
65 </tr>
66 </table>
67 </div>
68 <div class="memdoc">
69 <p>Gets the value associated with the specified key. </p>
70 <dl class="params"><dt><b>Parameters:</b></dt><dd>
71 <table class="params">
72 <tr><td class="paramdir">[in]</td><td class="paramname">dict</td><td>A dictionary var. </td></tr>
73 <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>A string var.</td></tr>
74 </table>
75 </dd>
76 </dl>
77 <dl class="return"><dt><b>Returns:</b></dt><dd>The value that is associated with <code>key</code>. The reference count of the element returned is incremented on behalf of the caller. If <code>key</code> is not a string var, or it doesn't exist in <code>dict</code>, an undefined var is returned. </dd></dl>
78 </div>
79 </div>
80 <a class="anchor" id="ab481ddec5b69bf964b63e859decc1e97"></a><!-- doxytag: member="PPB_VarDictionary::GetKeys" ref="ab481ddec5b69bf964b63e859decc1e97" args=")(struct PP_Var dict)" -->
81 <div class="memitem">
82 <div class="memproto">
83 <table class="memname">
84 <tr>
85 <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_dictionary__1__0.html#ab481ddec5b69bf964b63e859decc1e97">PPB_VarDictionary::GetKeys</a>)(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> dict)<code> [read]</code></td>
86 </tr>
87 </table>
88 </div>
89 <div class="memdoc">
90 <p>Gets all the keys in a dictionary. </p>
91 <p>Please note that for each key that you set into the dictionary, a string var with the same contents is returned; but it may not be the same string var (i.e., <code>value.as_id</code> may be different).</p>
92 <dl class="params"><dt><b>Parameters:</b></dt><dd>
93 <table class="params">
94 <tr><td class="paramdir">[in]</td><td class="paramname">dict</td><td>A dictionary var.</td></tr>
95 </table>
96 </dd>
97 </dl>
98 <dl class="return"><dt><b>Returns:</b></dt><dd>An array var which contains all the keys of <code>dict</code>. Its reference count is incremented on behalf of the caller. The elements are string vars. Returns a null var if failed. </dd></dl>
99 </div>
100 </div>
101 <a class="anchor" id="a2b7c0b449352d77b0c36c2bdb270eb9a"></a><!-- doxytag: member="PPB_VarDictionary::HasKey" ref="a2b7c0b449352d77b0c36c2bdb270eb9a" args=")(struct PP_Var dict, struct PP_Var key)" -->
102 <div class="memitem">
103 <div class="memproto">
104 <table class="memname">
105 <tr>
106 <td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___var_dictionary__1__0.html#a2b7c0b449352d77b0c36c2bdb270eb9a">PPB_VarDictionary::HasKey</a>)(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> dict, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> key)</td>
107 </tr>
108 </table>
109 </div>
110 <div class="memdoc">
111 <p>Checks whether a key exists. </p>
112 <dl class="params"><dt><b>Parameters:</b></dt><dd>
113 <table class="params">
114 <tr><td class="paramdir">[in]</td><td class="paramname">dict</td><td>A dictionary var. </td></tr>
115 <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>A string var.</td></tr>
116 </table>
117 </dd>
118 </dl>
119 <dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Bool</code> indicating whether the key exists. </dd></dl>
120 </div>
121 </div>
122 <a class="anchor" id="a8af80f44eaab36b5c8bc670be405dc21"></a><!-- doxytag: member="PPB_VarDictionary::Set" ref="a8af80f44eaab36b5c8bc670be405dc21" args=")(struct PP_Var dict, struct PP_Var key, struct PP_Var value)" -->
123 <div class="memitem">
124 <div class="memproto">
125 <table class="memname">
126 <tr>
127 <td class="memname"><a class="el" href="group___enums.html#ga4f272d99be14aacafe08dfd4ef830918">PP_Bool</a>(* <a class="el" href="struct_p_p_b___var_dictionary__1__0.html#a8af80f44eaab36b5c8bc670be405dc21">PPB_VarDictionary::Set</a>)(struct <a class="el" href="struct_p_p___var.html">PP_Var</a> dict, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> key, struct <a class="el" href="struct_p_p___var.html">PP_Var</a> value)</td>
128 </tr>
129 </table>
130 </div>
131 <div class="memdoc">
132 <p>Sets the value associated with the specified key. </p>
133 <dl class="params"><dt><b>Parameters:</b></dt><dd>
134 <table class="params">
135 <tr><td class="paramdir">[in]</td><td class="paramname">dict</td><td>A dictionary var. </td></tr>
136 <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>A string var. If this key hasn't existed in <code>dict</code>, it is added and associated with <code>value</code>; otherwise, the previous value is replaced with <code>value</code>. </td></tr>
137 <tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The value to set. The dictionary holds a reference to it on success.</td></tr>
138 </table>
139 </dd>
140 </dl>
141 <dl class="return"><dt><b>Returns:</b></dt><dd>A <code>PP_Bool</code> indicating whether the operation succeeds. </dd></dl>
142 </div>
143 </div>
144 <hr />The documentation for this struct was generated from the following file:<ul>
145 <li><a class="el" href="ppb__var__dictionary_8h.html">ppb_var_dictionary.h</a></li>
146 </ul>
147 </div><!-- contents -->
148 {{/partials.standard_nacl_article}}