<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>libgdamm: Gnome::Gda::DataModelArray Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">libgdamm  <span id="projectnumber">4.99.6</span> </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5.1-20110925 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceGnome.html">Gnome</a> </li> <li class="navelem"><a class="el" href="namespaceGnome_1_1Gda.html">Gda</a> </li> <li class="navelem"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html">DataModelArray</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="#pro-methods">Protected Member Functions</a> | <a href="#related">Related Functions</a> </div> <div class="headertitle"> <div class="title">Gnome::Gda::DataModelArray Class Reference<div class="ingroups"><a class="el" href="group__DataModels.html">Data Models</a></div></div> </div> </div> <div class="contents"> <!-- doxytag: class="Gnome::Gda::DataModelArray" --><!-- doxytag: inherits="Glib::Object,Gnome::Gda::DataModel" --> <p>An implementation of <a class="el" href="classGnome_1_1Gda_1_1DataModel.html" title="Abstract DataModel (Base class for all DataModels).">DataModel</a> based on an array. <a href="classGnome_1_1Gda_1_1DataModelArray.html#details">More...</a></p> <div class="dynheader"> Inheritance diagram for Gnome::Gda::DataModelArray:</div> <div class="dyncontent"> <div class="center"><img src="classGnome_1_1Gda_1_1DataModelArray__inherit__graph.png" border="0" usemap="#Gnome_1_1Gda_1_1DataModelArray_inherit__map" alt="Inheritance graph"/></div> <map name="Gnome_1_1Gda_1_1DataModelArray_inherit__map" id="Gnome_1_1Gda_1_1DataModelArray_inherit__map"> <area shape="rect" id="node2" /></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <div class="dynheader"> Collaboration diagram for Gnome::Gda::DataModelArray:</div> <div class="dyncontent"> <div class="center"><img src="classGnome_1_1Gda_1_1DataModelArray__coll__graph.png" border="0" usemap="#Gnome_1_1Gda_1_1DataModelArray_coll__map" alt="Collaboration graph"/></div> <map name="Gnome_1_1Gda_1_1DataModelArray_coll__map" id="Gnome_1_1Gda_1_1DataModelArray_coll__map"> <area shape="rect" id="node2" /></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classGnome_1_1Gda_1_1DataModelArray-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html#acf6b97c46c4f1f40cee77e8559a02122">~DataModelArray</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">GdaDataModelArray* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html#a0cf8a628099c6b3b23e114458bb1b16b">gobj</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a0cf8a628099c6b3b23e114458bb1b16b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const GdaDataModelArray* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html#a7e017ea29516df7b3c3ce587d04743f3">gobj</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a7e017ea29516df7b3c3ce587d04743f3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">GdaDataModelArray* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html#a91fc6818a5690a2fd982658b04f162ff">gobj_copy</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <a href="#a91fc6818a5690a2fd982658b04f162ff"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html#a51edeb99f7cc1ac3b3989ee02b6c8eb5">set_column_g_type</a> (int col, GType <a class="elRef" >type</a>)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html#a631fb85f9013380bfc2c60871387e689">set_n_columns</a> (int cols)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the number of columns for rows inserted in this model. <a href="#a631fb85f9013380bfc2c60871387e689"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html#af5a315c84b408caf65f2fba70209a3e8">clear</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Frees all the rows in <em>model</em>. <a href="#af5a315c84b408caf65f2fba70209a3e8"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" >get_row</a> (int row)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get a pointer to a row in <em>model</em>. <a href="#a292fc96fbcbe03b3151ee3a7ff855e3b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" >get_row</a> (int row) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get a pointer to a row in <em>model</em>. <a href="#a7036691a6820ead8e70b16f788b6068b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" >property_n_columns</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The number of columns in the model. <a href="#ad7b7c5dbf7c69ff80c8cd23a1382dd9a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" /> < guint > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html#ad1836e4277f13c3577a835dc284e4f73">property_n_columns</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The number of columns in the model. <a href="#ad1836e4277f13c3577a835dc284e4f73"></a><br/></td></tr> <tr><td colspan="2"><h2><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" /> < <a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html">DataModelArray</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html#a5a702e69fef67d561291dea6f2c6351d">create</a> (int cols)</td></tr> <tr><td colspan="2"><h2><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html#aa9e2cc2e69d66c6ba5476a2864be08e9">DataModelArray</a> (int cols)</td></tr> <tr><td colspan="2"><h2><a name="related"></a> Related Functions</h2></td></tr> <tr><td class="ititle" colspan="2"><p>(Note that these are not member functions.) </p> </td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" /> < <a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html">Gnome::Gda::DataModelArray</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html#af82135792c065fc0ffaa9519d8915efc">wrap</a> (GdaDataModelArray* object, bool take_copy=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="elRef" ></a><br/></td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>An implementation of <a class="el" href="classGnome_1_1Gda_1_1DataModel.html" title="Abstract DataModel (Base class for all DataModels).">DataModel</a> based on an array. </p> <p>The <a class="el" href="classGnome_1_1Gda_1_1DataModelArray.html" title="An implementation of DataModel based on an array.">Gda::DataModelArray</a> object is a data model which internally uses a GArray to index all its rows (represented as <a class="el" href="classGnome_1_1Gda_1_1Row.html" title="Row for a Gda::DataModelArray object.">Gda::Row</a> objects). In this data model, all the data is stored in memory, which can be a memory limitation if the number of rows is huge. This type of data model is easy to use to store some temporary data, and has a random access mode (any value can be accessed at any time without the need for an iterator). </p> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="acf6b97c46c4f1f40cee77e8559a02122"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::~DataModelArray" ref="acf6b97c46c4f1f40cee77e8559a02122" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual Gnome::Gda::DataModelArray::~DataModelArray </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="aa9e2cc2e69d66c6ba5476a2864be08e9"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::DataModelArray" ref="aa9e2cc2e69d66c6ba5476a2864be08e9" args="(int cols)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gnome::Gda::DataModelArray::DataModelArray </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>cols</em></td><td>)</td> <td><code> [explicit, protected]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="af5a315c84b408caf65f2fba70209a3e8"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::clear" ref="af5a315c84b408caf65f2fba70209a3e8" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gnome::Gda::DataModelArray::clear </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Frees all the rows in <em>model</em>. </p> </div> </div> <a class="anchor" id="a5a702e69fef67d561291dea6f2c6351d"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::create" ref="a5a702e69fef67d561291dea6f2c6351d" args="(int cols)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="elRef" >DataModelArray</a>> Gnome::Gda::DataModelArray::create </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>cols</em></td><td>)</td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a292fc96fbcbe03b3151ee3a7ff855e3b"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::get_row" ref="a292fc96fbcbe03b3151ee3a7ff855e3b" args="(int row)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Row</a>> Gnome::Gda::DataModelArray::get_row </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>row</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Get a pointer to a row in <em>model</em>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">row</td><td><a class="el" href="classGnome_1_1Gda_1_1Row.html" title="Row for a Gda::DataModelArray object.">Row</a> number (starting from 0). </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classGnome_1_1Gda_1_1Row.html" title="Row for a Gda::DataModelArray object.">Gda::Row</a>, or <code>0</code> if an error occurred. </dd></dl> </div> </div> <a class="anchor" id="a7036691a6820ead8e70b16f788b6068b"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::get_row" ref="a7036691a6820ead8e70b16f788b6068b" args="(int row) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Row</a>> Gnome::Gda::DataModelArray::get_row </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>row</em></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>Get a pointer to a row in <em>model</em>. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">row</td><td><a class="el" href="classGnome_1_1Gda_1_1Row.html" title="Row for a Gda::DataModelArray object.">Row</a> number (starting from 0). </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>The <a class="el" href="classGnome_1_1Gda_1_1Row.html" title="Row for a Gda::DataModelArray object.">Gda::Row</a>, or <code>0</code> if an error occurred. </dd></dl> </div> </div> <a class="anchor" id="a0cf8a628099c6b3b23e114458bb1b16b"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::gobj" ref="a0cf8a628099c6b3b23e114458bb1b16b" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GdaDataModelArray* Gnome::Gda::DataModelArray::gobj </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="el" href="classGnome_1_1Gda_1_1DataModel.html#a63b551e8308d050dbd5ab8964b405e76">Gnome::Gda::DataModel</a>.</p> </div> </div> <a class="anchor" id="a7e017ea29516df7b3c3ce587d04743f3"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::gobj" ref="a7e017ea29516df7b3c3ce587d04743f3" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GdaDataModelArray* Gnome::Gda::DataModelArray::gobj </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="el" href="classGnome_1_1Gda_1_1DataModel.html#af06bc95c0e33adf8a3faca1870190a7f">Gnome::Gda::DataModel</a>.</p> </div> </div> <a class="anchor" id="a91fc6818a5690a2fd982658b04f162ff"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::gobj_copy" ref="a91fc6818a5690a2fd982658b04f162ff" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GdaDataModelArray* Gnome::Gda::DataModelArray::gobj_copy </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. </p> </div> </div> <a class="anchor" id="ad7b7c5dbf7c69ff80c8cd23a1382dd9a"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::property_n_columns" ref="ad7b7c5dbf7c69ff80c8cd23a1382dd9a" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Glib::PropertyProxy</a><guint> Gnome::Gda::DataModelArray::property_n_columns </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>The number of columns in the model. </p> <p>You rarely need to use properties because there are get_ and set_ methods for almost all of them. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes. </dd></dl> </div> </div> <a class="anchor" id="ad1836e4277f13c3577a835dc284e4f73"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::property_n_columns" ref="ad1836e4277f13c3577a835dc284e4f73" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Glib::PropertyProxy_ReadOnly</a><guint> Gnome::Gda::DataModelArray::property_n_columns </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>The number of columns in the model. </p> <p>You rarely need to use properties because there are get_ and set_ methods for almost all of them. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes. </dd></dl> </div> </div> <a class="anchor" id="a51edeb99f7cc1ac3b3989ee02b6c8eb5"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::set_column_g_type" ref="a51edeb99f7cc1ac3b3989ee02b6c8eb5" args="(int col, GType type)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gnome::Gda::DataModelArray::set_column_g_type </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>col</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">GType </td> <td class="paramname"><em>type</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a631fb85f9013380bfc2c60871387e689"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::set_n_columns" ref="a631fb85f9013380bfc2c60871387e689" args="(int cols)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gnome::Gda::DataModelArray::set_n_columns </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>cols</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Sets the number of columns for rows inserted in this model. </p> <p><em>cols</em> must be greated than or equal to 0.</p> <p>Also clears <em>model's</em> contents. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">cols</td><td>Number of columns for rows this data model should use. </td></tr> </table> </dd> </dl> </div> </div> <hr/><h2>Friends And Related Function Documentation</h2> <a class="anchor" id="af82135792c065fc0ffaa9519d8915efc"></a><!-- doxytag: member="Gnome::Gda::DataModelArray::wrap" ref="af82135792c065fc0ffaa9519d8915efc" args="(GdaDataModelArray *object, bool take_copy=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" >Gnome::Gda::DataModelArray</a> > wrap </td> <td>(</td> <td class="paramtype">GdaDataModelArray * </td> <td class="paramname"><em>object</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>take_copy</em> = <code>false</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [related]</code></td> </tr> </table> </div> <div class="memdoc"> <p>A <a class="elRef" >Glib::wrap()</a> method for this object. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">object</td><td>The C instance. </td></tr> <tr><td class="paramname">take_copy</td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>libgdamm/datamodelarray.h</li> </ul> </div> <hr class="footer"/><address class="footer"><small> Generated on Sun Nov 20 2011 22:38:13 for libgdamm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.7.5.1-20110925 </small></address> </body> </html>