⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 datasets.sgml

📁 GLib是GTK+和GNOME工程的基础底层核心程序库
💻 SGML
📖 第 1 页 / 共 2 页
字号:
</tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-dataset-id-remove-no-notify">g_dataset_id_remove_no_notify ()</title><programlisting><link linkend="gpointer">gpointer</link>    g_dataset_id_remove_no_notify   (<link linkend="gconstpointer">gconstpointer</link> dataset_location,                                             <link linkend="GQuark">GQuark</link> key_id);</programlisting><para>Removes an element, without calling its destroy notification function.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>dataset_location</parameter>&nbsp;:</entry><entry>the location identifying the dataset.</entry></row><row><entry align="right"><parameter>key_id</parameter>&nbsp;:</entry><entry>the <link linkend="GQuark">GQuark</link> ID identifying the data element.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the data previously stored at <parameter>key_id</parameter>, or <literal>NULL</literal> if none.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-dataset-set-data">g_dataset_set_data()</title><programlisting>#define     g_dataset_set_data(l, k, d)</programlisting><para>Sets the data corresponding to the given string identifier.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>l</parameter>&nbsp;:</entry><entry>the location identifying the dataset.</entry></row><row><entry align="right"><parameter>k</parameter>&nbsp;:</entry><entry>the string to identify the data element.</entry></row><row><entry align="right"><parameter>d</parameter>&nbsp;:</entry><entry>the data element.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-dataset-set-data-full">g_dataset_set_data_full()</title><programlisting>#define     g_dataset_set_data_full(l, k, d, f)</programlisting><para>Sets the data corresponding to the given string identifier, and the functionto call when the data element is destroyed.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>l</parameter>&nbsp;:</entry><entry>the location identifying the dataset.</entry></row><row><entry align="right"><parameter>k</parameter>&nbsp;:</entry><entry>the string to identify the data element.</entry></row><row><entry align="right"><parameter>d</parameter>&nbsp;:</entry><entry>the data element.</entry></row><row><entry align="right"><parameter>f</parameter>&nbsp;:</entry><entry>the function to call when the data element is removed. Thisfunction will be called with the data element and can be used to free anymemory allocated for it.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-dataset-get-data">g_dataset_get_data()</title><programlisting>#define     g_dataset_get_data(l, k)</programlisting><para>Gets the data element corresponding to a string.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>l</parameter>&nbsp;:</entry><entry>the location identifying the dataset.</entry></row><row><entry align="right"><parameter>k</parameter>&nbsp;:</entry><entry>the string identifying the data element.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the data element corresponding to the string, or <literal>NULL</literal> if it is notfound.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-dataset-remove-data">g_dataset_remove_data()</title><programlisting>#define     g_dataset_remove_data(l, k)</programlisting><para>Removes a data element corresponding to a string.Its destroy function is called if it has been set.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>l</parameter>&nbsp;:</entry><entry>the location identifying the dataset.</entry></row><row><entry align="right"><parameter>k</parameter>&nbsp;:</entry><entry>the string identifying the data element.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-dataset-remove-no-notify">g_dataset_remove_no_notify()</title><programlisting>#define     g_dataset_remove_no_notify(l, k)</programlisting><para>Removes an element, without calling its destroy notifier.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>l</parameter>&nbsp;:</entry><entry>the location identifying the dataset.</entry></row><row><entry align="right"><parameter>k</parameter>&nbsp;:</entry><entry>the string identifying the data element.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-dataset-foreach">g_dataset_foreach ()</title><programlisting>void        g_dataset_foreach               (<link linkend="gconstpointer">gconstpointer</link> dataset_location,                                             <link linkend="GDataForeachFunc">GDataForeachFunc</link> func,                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting><para>Calls the given function for each data element which is associated with thegiven location.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>dataset_location</parameter>&nbsp;:</entry><entry>the location identifying the dataset.</entry></row><row><entry align="right"><parameter>func</parameter>&nbsp;:</entry><entry>the function to call for each data element.</entry></row><row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry><entry>user data to pass to the function.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GDataForeachFunc">GDataForeachFunc ()</title><programlisting>void        (*GDataForeachFunc)             (<link linkend="GQuark">GQuark</link> key_id,                                             <link linkend="gpointer">gpointer</link> data,                                             <link linkend="gpointer">gpointer</link> user_data);</programlisting><para>Specifies the type of function passed to <link linkend="g-dataset-foreach">g_dataset_foreach</link>().It is called with each <link linkend="GQuark">GQuark</link> id and associated data element,together with the <parameter>user_data</parameter> parameter supplied to <link linkend="g-dataset-foreach">g_dataset_foreach</link>().</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>key_id</parameter>&nbsp;:</entry><entry>the <link linkend="GQuark">GQuark</link> id to identifying the data element.</entry></row><row><entry align="right"><parameter>data</parameter>&nbsp;:</entry><entry>the data element.</entry></row><row><entry align="right"><parameter>user_data</parameter>&nbsp;:</entry><entry>user data passed to <link linkend="g-dataset-foreach">g_dataset_foreach</link>().</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-dataset-destroy">g_dataset_destroy ()</title><programlisting>void        g_dataset_destroy               (<link linkend="gconstpointer">gconstpointer</link> dataset_location);</programlisting><para>Destroys the dataset, freeing all memory allocated, and calling anydestroy functions set for data elements.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>dataset_location</parameter>&nbsp;:</entry><entry>the location identifying the dataset.</entry></row></tbody></tgroup></informaltable></refsect2></refsect1></refentry>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -