<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="cutter-Convenience-test-data-API">
<refmeta>
<refentrytitle role="top_of_page" id="cutter-Convenience-test-data-API.top_of_page">Convenience test data API</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>CUTTER Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Convenience test data API</refname>
<refpurpose>API to create test data without
structure definition.</refpurpose>
</refnamediv>

<refsect1 id="cutter-Convenience-test-data-API.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-add-datum">gcut_add_datum</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-data-has-field">gcut_data_has_field</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="gcut-data-get-char">gcut_data_get_char</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-data-get-string">gcut_data_get_string</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-data-get-int">gcut_data_get_int</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-data-get-uint">gcut_data_get_uint</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="gcut-data-get-int64">gcut_data_get_int64</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="gcut-data-get-uint64">gcut_data_get_uint64</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="gcut-data-get-size">gcut_data_get_size</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-data-get-flags">gcut_data_get_flags</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-data-get-enum">gcut_data_get_enum</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gconstpointer"><returnvalue>gconstpointer</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-data-get-pointer">gcut_data_get_pointer</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gconstpointer"><returnvalue>gconstpointer</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-data-get-boxed">gcut_data_get_boxed</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GObject"><returnvalue>GObject</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gcut-data-get-object">gcut_data_get_object</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-data-get-boolean">gcut_data_get_boolean</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
</entry><entry role="function_name"><link linkend="gcut-data-get-double">gcut_data_get_double</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>


<refsect1 id="cutter-Convenience-test-data-API.description" role="desc">
<title role="desc.title">Description</title>
<para>cut_add_data() requires custom data type for complex test
data. But it's not easy to write. <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>
provides API to use complex test data without custom data
type. It uses <link linkend="GType"><type>GType</type></link> for providing complex data.</para>

</refsect1>
<refsect1 id="cutter-Convenience-test-data-API.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gcut-add-datum" role="function" condition="since:1.0.6">
<title>gcut_add_datum&#160;()</title>
<indexterm zone="gcut-add-datum" role="1.0.6"><primary>gcut_add_datum</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gcut_add_datum (<parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>,
                <parameter>const <link linkend="gchar"><type>gchar</type></link> *first_field_name</parameter>,
                <parameter>...</parameter>);</programlisting>
<para>Adds a datum to be used in data driven test. It's
convenient rather than <link linkend="cut-add-data"><function>cut_add_data()</function></link> because you doesn't
need to define a new structure for a complex test data.</para>
<para>e.g.:</para>
<informalexample><programlisting><![CDATA[
#include <gcutter.h>

void data_translate (void);
void test_translate (gconstpointer data);

static const gchar*
translate (gint input)
{
   switch(input) {
   case 1:
       return "first";
   case 111:
       return "a hundred eleven";
   default:
       return "unsupported";
   }
}

void
data_translate(void)
{
    gcut_add_datum("simple data",
                   "translated", G_TYPE_STRING, "first",
                   "input", G_TYPE_INT, 1,
                   NULL);
    gcut_add_datum("complex data",
                   "translated", G_TYPE_STRING, "a hundred eleven",
                   "input", G_TYPE_INT, 111,
                   NULL);
}

void
test_translate(gconstpointer data)
{
    cut_assert_equal_string(gcut_data_get_string(data, "translated"),
                            translate(gcut_data_get_int(data, "input")));
}
]]></programlisting></informalexample>
<para></para>
<para>Available types and their values are the followings:</para>
<variablelist>
  <varlistentry>
    <term><link linkend="G-TYPE-CHAR:CAPS"><type>G_TYPE_CHAR</type></link></term>
    <listitem>
      <para><link linkend="gchar"><type>gchar</type></link> value</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", G_TYPE_CHAR, 'X',
               NULL);
]]></programlisting></informalexample>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term><link linkend="G-TYPE-STRING:CAPS"><type>G_TYPE_STRING</type></link></term>
    <listitem>
      <para>const <link linkend="gchar"><type>gchar</type></link> *value</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", G_TYPE_STRING, "string value",
               NULL);
]]></programlisting></informalexample>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term><link linkend="G-TYPE-INT:CAPS"><type>G_TYPE_INT</type></link></term>
    <listitem>
      <para><link linkend="gint"><type>gint</type></link> value</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", G_TYPE_INT, 100,
               NULL);
]]></programlisting></informalexample>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term><link linkend="G-TYPE-UINT:CAPS"><type>G_TYPE_UINT</type></link></term>
    <listitem>
      <para><link linkend="guint"><type>guint</type></link> value</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", G_TYPE_UINT, 100,
               NULL);
]]></programlisting></informalexample>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term><link linkend="G-TYPE-INT64:CAPS"><type>G_TYPE_INT64</type></link></term>
    <listitem>
      <para><link linkend="gint64"><type>gint64</type></link> value</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", G_TYPE_INT64, G_GINT64_CONSTANT(100),
               NULL);
]]></programlisting></informalexample>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term><link linkend="G-TYPE-UINT64:CAPS"><type>G_TYPE_UINT64</type></link></term>
    <listitem>
      <para><link linkend="guint64"><type>guint64</type></link> value</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", G_TYPE_UINT64, G_GUINT64_CONSTANT(100),
               NULL);
]]></programlisting></informalexample>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term><link linkend="G-TYPE-GTYPE:CAPS"><type>G_TYPE_GTYPE</type></link></term>
    <listitem>
      <para><link linkend="GType"><type>GType</type></link> value</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", G_TYPE_GTYPE, G_TYPE_OBJECT,
               NULL);
]]></programlisting></informalexample>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>GFlags types</term>
    <listitem>
      <para>its type value.</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", GTK_TYPE_WIDGET_FLAGS, GTK_TOPLEVEL | GTK_MAPPED,
               NULL);
]]></programlisting></informalexample>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>GEnum types</term>
    <listitem>
      <para>its type value.</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", GTK_TYPE_WRAP_MODE, GTK_WRAP_NONE,
               NULL);
]]></programlisting></informalexample>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term><link linkend="G-TYPE-POINTER:CAPS"><type>G_TYPE_POINTER</type></link></term>
    <listitem>
      <para><link linkend="gconstpointer"><type>gconstpointer</type></link> value, <link linkend="GDestroyNotify"><type>GDestroyNotify</type></link> notify</para>
      <para>notify is called when value is destroyed.</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", G_TYPE_POINTER, my_structure_new(...), my_structure_free,
               NULL);
]]></programlisting></informalexample>
      </para>
      <para>NOTE: value's ownership is passed to Cutter. Don't free it.</para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>GBoxed types</term>
    <listitem>
      <para>its type value.</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", G_TYPE_HASH_TABLE,
               gcut_hash_table_string_string_new("name1", "value1",
                                                 "name2", "value2",
                                                 NULL),
               NULL);
]]></programlisting></informalexample>
      </para>
      <para>NOTE: value's ownership is passed to Cutter. Don't free it.</para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term><link linkend="G-TYPE-BOOLEAN:CAPS"><type>G_TYPE_BOOLEAN</type></link></term>
    <listitem>
      <para><link linkend="gboolean"><type>gboolean</type></link> value</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", G_TYPE_BOOLEAN, TRUE,
               NULL);
]]></programlisting></informalexample>
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term><link linkend="G-TYPE-DOUBLE:CAPS"><type>G_TYPE_DOUBLE</type></link></term>
    <listitem>
      <para><link linkend="gdouble"><type>gdouble</type></link> value</para>
      <para>e.g.:
<informalexample><programlisting><![CDATA[
gcut_add_datum("data name",
               "field-name", G_TYPE_DOUBLE, 2.9,
               NULL);
]]></programlisting></informalexample>
      </para>
    </listitem>
  </varlistentry>
</variablelist>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>name</para></entry>
<entry role="parameter_description"><para>the name of the data.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>first_field_name</para></entry>
<entry role="parameter_description"><para>the first field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>the type and value pair of the first field,
followed optionally by the next field name, type
and value triples. <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminated. See
description for more details.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.6">1.0.6</link></para></refsect2>
<refsect2 id="gcut-data-has-field" role="function" condition="since:1.1.5">
<title>gcut_data_has_field&#160;()</title>
<indexterm zone="gcut-data-has-field" role="1.1.5"><primary>gcut_data_has_field</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gcut_data_has_field (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> data</parameter>,
                     <parameter>const <link linkend="gchar"><type>gchar</type></link> *field_name</parameter>);</programlisting>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>data</parameter>
has a <parameter>field_name</parameter>
field is
available, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.5">1.1.5</link></para></refsect2>
<refsect2 id="gcut-data-get-char" role="macro" condition="since:1.1.3">
<title>gcut_data_get_char()</title>
<indexterm zone="gcut-data-get-char" role="1.1.3"><primary>gcut_data_get_char</primary></indexterm>
<programlisting language="C">#define             gcut_data_get_char(data, field_name)</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as char.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.3">1.1.3</link></para></refsect2>
<refsect2 id="gcut-data-get-string" role="function" condition="since:1.0.6">
<title>gcut_data_get_string&#160;()</title>
<indexterm zone="gcut-data-get-string" role="1.0.6"><primary>gcut_data_get_string</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gcut_data_get_string (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> data</parameter>,
                      <parameter>const <link linkend="gchar"><type>gchar</type></link> *field_name</parameter>);</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as string.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.6">1.0.6</link></para></refsect2>
<refsect2 id="gcut-data-get-int" role="function" condition="since:1.0.6">
<title>gcut_data_get_int&#160;()</title>
<indexterm zone="gcut-data-get-int" role="1.0.6"><primary>gcut_data_get_int</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gcut_data_get_int (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> data</parameter>,
                   <parameter>const <link linkend="gchar"><type>gchar</type></link> *field_name</parameter>);</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as integer.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.6">1.0.6</link></para></refsect2>
<refsect2 id="gcut-data-get-uint" role="function" condition="since:1.0.6">
<title>gcut_data_get_uint&#160;()</title>
<indexterm zone="gcut-data-get-uint" role="1.0.6"><primary>gcut_data_get_uint</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gcut_data_get_uint (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> data</parameter>,
                    <parameter>const <link linkend="gchar"><type>gchar</type></link> *field_name</parameter>);</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as
unsigned integer.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.6">1.0.6</link></para></refsect2>
<refsect2 id="gcut-data-get-int64" role="macro" condition="since:1.1.3">
<title>gcut_data_get_int64()</title>
<indexterm zone="gcut-data-get-int64" role="1.1.3"><primary>gcut_data_get_int64</primary></indexterm>
<programlisting language="C">#define             gcut_data_get_int64(data, field_name)</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as 64-bit
integer.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.3">1.1.3</link></para></refsect2>
<refsect2 id="gcut-data-get-uint64" role="macro" condition="since:1.1.3">
<title>gcut_data_get_uint64()</title>
<indexterm zone="gcut-data-get-uint64" role="1.1.3"><primary>gcut_data_get_uint64</primary></indexterm>
<programlisting language="C">#define             gcut_data_get_uint64(data, field_name)</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as
64-bit unsigned integer.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.3">1.1.3</link></para></refsect2>
<refsect2 id="gcut-data-get-size" role="macro" condition="since:1.1.3">
<title>gcut_data_get_size()</title>
<indexterm zone="gcut-data-get-size" role="1.1.3"><primary>gcut_data_get_size</primary></indexterm>
<programlisting language="C">#define             gcut_data_get_size(data, field_name)</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as size_t.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.3">1.1.3</link></para></refsect2>
<refsect2 id="gcut-data-get-flags" role="function" condition="since:1.0.6">
<title>gcut_data_get_flags&#160;()</title>
<indexterm zone="gcut-data-get-flags" role="1.0.6"><primary>gcut_data_get_flags</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gcut_data_get_flags (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> data</parameter>,
                     <parameter>const <link linkend="gchar"><type>gchar</type></link> *field_name</parameter>);</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as
unsigned integer of GFlags.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.6">1.0.6</link></para></refsect2>
<refsect2 id="gcut-data-get-enum" role="function" condition="since:1.0.6">
<title>gcut_data_get_enum&#160;()</title>
<indexterm zone="gcut-data-get-enum" role="1.0.6"><primary>gcut_data_get_enum</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gcut_data_get_enum (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> data</parameter>,
                    <parameter>const <link linkend="gchar"><type>gchar</type></link> *field_name</parameter>);</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as
integer of GEnum type.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.6">1.0.6</link></para></refsect2>
<refsect2 id="gcut-data-get-pointer" role="function" condition="since:1.0.6">
<title>gcut_data_get_pointer&#160;()</title>
<indexterm zone="gcut-data-get-pointer" role="1.0.6"><primary>gcut_data_get_pointer</primary></indexterm>
<programlisting language="C"><link linkend="gconstpointer"><returnvalue>gconstpointer</returnvalue></link>
gcut_data_get_pointer (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> data</parameter>,
                       <parameter>const <link linkend="gchar"><type>gchar</type></link> *field_name</parameter>);</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as
pointer.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.6">1.0.6</link></para></refsect2>
<refsect2 id="gcut-data-get-boxed" role="function" condition="since:1.0.7">
<title>gcut_data_get_boxed&#160;()</title>
<indexterm zone="gcut-data-get-boxed" role="1.0.7"><primary>gcut_data_get_boxed</primary></indexterm>
<programlisting language="C"><link linkend="gconstpointer"><returnvalue>gconstpointer</returnvalue></link>
gcut_data_get_boxed (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> data</parameter>,
                     <parameter>const <link linkend="gchar"><type>gchar</type></link> *field_name</parameter>);</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as
GBoxed type value.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.7">1.0.7</link></para></refsect2>
<refsect2 id="gcut-data-get-object" role="function" condition="since:1.1.1">
<title>gcut_data_get_object&#160;()</title>
<indexterm zone="gcut-data-get-object" role="1.1.1"><primary>gcut_data_get_object</primary></indexterm>
<programlisting language="C"><link linkend="GObject"><returnvalue>GObject</returnvalue></link>&#160;*
gcut_data_get_object (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> data</parameter>,
                      <parameter>const <link linkend="gchar"><type>gchar</type></link> *field_name</parameter>);</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as
<link linkend="GObject"><type>GObject</type></link> type value.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.1">1.1.1</link></para></refsect2>
<refsect2 id="gcut-data-get-boolean" role="function" condition="since:1.1.3">
<title>gcut_data_get_boolean&#160;()</title>
<indexterm zone="gcut-data-get-boolean" role="1.1.3"><primary>gcut_data_get_boolean</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gcut_data_get_boolean (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> data</parameter>,
                       <parameter>const <link linkend="gchar"><type>gchar</type></link> *field_name</parameter>);</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as boolean.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.3">1.1.3</link></para></refsect2>
<refsect2 id="gcut-data-get-double" role="function" condition="since:1.1.3">
<title>gcut_data_get_double&#160;()</title>
<indexterm zone="gcut-data-get-double" role="1.1.3"><primary>gcut_data_get_double</primary></indexterm>
<programlisting language="C"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
gcut_data_get_double (<parameter><link linkend="gconstpointer"><type>gconstpointer</type></link> data</parameter>,
                      <parameter>const <link linkend="gchar"><type>gchar</type></link> *field_name</parameter>);</programlisting>
<para>Gets a field value identified by <parameter>field_name</parameter>
 as double
floating point number.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>data</para></entry>
<entry role="parameter_description"><para>the data added by <link linkend="gcut-add-datum"><function>gcut_add_datum()</function></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>field_name</para></entry>
<entry role="parameter_description"><para>the field name.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para> a field value corresponded to <parameter>field_name</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.1.3">1.1.3</link></para></refsect2>

</refsect1>
<refsect1 id="cutter-Convenience-test-data-API.other_details" role="details">
<title role="details.title">Types and Values</title>

</refsect1>

</refentry>
