<?xml version="1.0" encoding="UTF-8"?> <!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" lang="en_US" xml:lang="en_US"> <head> <title>libkdegames: KGrid2D::Generic< Type > Class Template Reference (libkdegames)</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org" r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org" r (n 0 s 0 v 0 l 0))' /> <meta name="trademark" content="KDE e.V." /> <meta name="description" content="K Desktop Environment Homepage, KDE.org" /> <meta name="MSSmartTagsPreventParsing" content="true" /> <meta name="robots" content="all" /> <link rel="shortcut icon" href="../../favicon.ico" /> <link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" /> </head> <body> <div id="nav_header_top" align="right"> <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a> <a href="../.."><img id="nav_header_logo" alt="Home" align="left" src="../../kde_gear_64.png" border="0" /></a> <span class="doNotDisplay">::</span> <div id="nav_header_title" align="left">KDE API Reference</div> </div> <div id="nav_header_bottom" align="right"> <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span> <div id="nav_header_bottom_right" style="text-align: left;"> / <a href="../..">API Reference</a> / <a href=".">libkdegames</a> </div> </div> <table id="main" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" class="menuheader" height="0"></td> <td id="contentcolumn" valign="top" rowspan="2" > <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;"> <a name="content"></a> <!-- Generated by Doxygen 1.5.5 --> <div class="navpath"><b>KGrid2D</b>::<a class="el" href="classKGrid2D_1_1Generic.html">Generic</a> </div> <div class="contents"> <h1>KGrid2D::Generic< Type > Class Template Reference</h1><!-- doxytag: class="KGrid2D::Generic" --><code>#include <<a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for KGrid2D::Generic< Type >:</div> <div class="dynsection"> <p><center><img src="classKGrid2D_1_1Generic.png" usemap="#KGrid2D::Generic< Type >_map" border="0" alt=""></center> <map name="KGrid2D::Generic< Type >_map"> <area href="classKGrid2D_1_1Hexagonal.html" alt="KGrid2D::Hexagonal< Type >" shape="rect" coords="0,56,178,80"> </map> </div> <p> <a href="classKGrid2D_1_1Generic-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2> <h3>template<class Type><br> class KGrid2D::Generic< Type ></h3> This template class represents a generic bidimensionnal grid. <p> Each node contains an element of the template type.<p> <dl class="since" compact><dt><b>Since:</b></dt><dd>3.2 </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00096">96</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#21be4dd4c916115b8e5eb9fc726dc116">Generic</a> (uint width=0, uint height=0)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#9e56a30f1e0c7b88233297ea1794d226">resize</a> (uint width, uint height)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#76987dd0b191f8ea71f8e877dd25aab1">fill</a> (const Type &value)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">uint </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#2e3b9af3bb6b9eccb27e6dfdfb684fab">width</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">uint </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#d74fd412d31702b267149789c582a404">height</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">uint </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#9dab1045e50f1bb07e575e3e555516e4">size</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">uint </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#4d1fbebc7657e75fe0c04a0361093017">index</a> (const Coord &c) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Coord </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#7adbdff43355ae9710369dc12dacf9c7">coord</a> (uint index) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const Type & </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#78c9836b380fca4d5ad0edf66898a8df">at</a> (const Coord &c) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Type & </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#a81cacf3b6194615156256c653cd9fe6">at</a> (const Coord &c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const Type & </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#43879cfa352b06837b78a2d6d7bf2654">operator[]</a> (const Coord &c) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Type & </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#c6874abfd5efb64af88971c76b411733">operator[]</a> (const Coord &c)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const Type & </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#7db4ef742436981df4058987e130433d">at</a> (uint index) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Type & </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#5cdbf1ced092545bc1d3e339f856e362">at</a> (uint index)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const Type & </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#734e0e9b5e51dda00d1aa9d0904f306f">operator[]</a> (uint index) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">Type & </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#25ca57641701213b5e9fd9e229a3b94d">operator[]</a> (uint index)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#f16fa88ab35dc89968fb93da1a3095e8">inside</a> (const Coord &c) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKGrid2D_1_1Generic.html#3d9bb9250d4dd65787b3a3a6097e6a9f">bound</a> (Coord &c) const </td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8e00ffef3af1234740fd5a7d392a2d5"></a><!-- doxytag: member="KGrid2D::Generic::_width" ref="a8e00ffef3af1234740fd5a7d392a2d5" args="" --> uint </td><td class="memItemRight" valign="bottom"><b>_width</b></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f14d7cb3fd2baa9066fd930f8ea6d02e"></a><!-- doxytag: member="KGrid2D::Generic::_height" ref="f14d7cb3fd2baa9066fd930f8ea6d02e" args="" --> uint </td><td class="memItemRight" valign="bottom"><b>_height</b></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e2c8fe2bcf9f20ed24a3927705d2baeb"></a><!-- doxytag: member="KGrid2D::Generic::_vector" ref="e2c8fe2bcf9f20ed24a3927705d2baeb" args="" --> QValueVector< Type > </td><td class="memItemRight" valign="bottom"><b>_vector</b></td></tr> </table> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="21be4dd4c916115b8e5eb9fc726dc116"></a><!-- doxytag: member="KGrid2D::Generic::Generic" ref="21be4dd4c916115b8e5eb9fc726dc116" args="(uint width=0, uint height=0)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname"><a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::<a class="el" href="classKGrid2D_1_1Generic.html">Generic</a> </td> <td>(</td> <td class="paramtype">uint </td> <td class="paramname"> <em>width</em> = <code>0</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint </td> <td class="paramname"> <em>height</em> = <code>0</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Constructor. <p> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00102">102</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="9e56a30f1e0c7b88233297ea1794d226"></a><!-- doxytag: member="KGrid2D::Generic::resize" ref="9e56a30f1e0c7b88233297ea1794d226" args="(uint width, uint height)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::resize </td> <td>(</td> <td class="paramtype">uint </td> <td class="paramname"> <em>width</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint </td> <td class="paramname"> <em>height</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Resize the grid. <p> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00111">111</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="76987dd0b191f8ea71f8e877dd25aab1"></a><!-- doxytag: member="KGrid2D::Generic::fill" ref="76987dd0b191f8ea71f8e877dd25aab1" args="(const Type &value)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::fill </td> <td>(</td> <td class="paramtype">const Type & </td> <td class="paramname"> <em>value</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Fill the nodes with the given value. <p> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00120">120</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="2e3b9af3bb6b9eccb27e6dfdfb684fab"></a><!-- doxytag: member="KGrid2D::Generic::width" ref="2e3b9af3bb6b9eccb27e6dfdfb684fab" args="() const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">uint <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::width </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the width. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00127">127</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="d74fd412d31702b267149789c582a404"></a><!-- doxytag: member="KGrid2D::Generic::height" ref="d74fd412d31702b267149789c582a404" args="() const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">uint <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::height </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the height. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00131">131</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="9dab1045e50f1bb07e575e3e555516e4"></a><!-- doxytag: member="KGrid2D::Generic::size" ref="9dab1045e50f1bb07e575e3e555516e4" args="() const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">uint <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::size </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the number of nodes (ie width*height). </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00135">135</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="4d1fbebc7657e75fe0c04a0361093017"></a><!-- doxytag: member="KGrid2D::Generic::index" ref="4d1fbebc7657e75fe0c04a0361093017" args="(const Coord &c) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">uint <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::index </td> <td>(</td> <td class="paramtype">const Coord & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the linear index for the given coordinate. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00140">140</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="7adbdff43355ae9710369dc12dacf9c7"></a><!-- doxytag: member="KGrid2D::Generic::coord" ref="7adbdff43355ae9710369dc12dacf9c7" args="(uint index) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">Coord <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::coord </td> <td>(</td> <td class="paramtype">uint </td> <td class="paramname"> <em>index</em> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the coordinate corresponding to the linear index. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00147">147</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="78c9836b380fca4d5ad0edf66898a8df"></a><!-- doxytag: member="KGrid2D::Generic::at" ref="78c9836b380fca4d5ad0edf66898a8df" args="(const Coord &c) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">const Type& <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::at </td> <td>(</td> <td class="paramtype">const Coord & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the value at the given coordinate. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00154">154</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="a81cacf3b6194615156256c653cd9fe6"></a><!-- doxytag: member="KGrid2D::Generic::at" ref="a81cacf3b6194615156256c653cd9fe6" args="(const Coord &c)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">Type& <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::at </td> <td>(</td> <td class="paramtype">const Coord & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the value at the given coordinate. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00158">158</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="43879cfa352b06837b78a2d6d7bf2654"></a><!-- doxytag: member="KGrid2D::Generic::operator[]" ref="43879cfa352b06837b78a2d6d7bf2654" args="(const Coord &c) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">const Type& <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::operator[] </td> <td>(</td> <td class="paramtype">const Coord & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the value at the given coordinate. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00162">162</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="c6874abfd5efb64af88971c76b411733"></a><!-- doxytag: member="KGrid2D::Generic::operator[]" ref="c6874abfd5efb64af88971c76b411733" args="(const Coord &c)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">Type& <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::operator[] </td> <td>(</td> <td class="paramtype">const Coord & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the value at the given coordinate. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00166">166</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="7db4ef742436981df4058987e130433d"></a><!-- doxytag: member="KGrid2D::Generic::at" ref="7db4ef742436981df4058987e130433d" args="(uint index) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">const Type& <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::at </td> <td>(</td> <td class="paramtype">uint </td> <td class="paramname"> <em>index</em> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the value at the given linear index. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00171">171</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="5cdbf1ced092545bc1d3e339f856e362"></a><!-- doxytag: member="KGrid2D::Generic::at" ref="5cdbf1ced092545bc1d3e339f856e362" args="(uint index)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">Type& <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::at </td> <td>(</td> <td class="paramtype">uint </td> <td class="paramname"> <em>index</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the value at the given linear index. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00175">175</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="734e0e9b5e51dda00d1aa9d0904f306f"></a><!-- doxytag: member="KGrid2D::Generic::operator[]" ref="734e0e9b5e51dda00d1aa9d0904f306f" args="(uint index) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">const Type& <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::operator[] </td> <td>(</td> <td class="paramtype">uint </td> <td class="paramname"> <em>index</em> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the value at the given linear index. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00179">179</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="25ca57641701213b5e9fd9e229a3b94d"></a><!-- doxytag: member="KGrid2D::Generic::operator[]" ref="25ca57641701213b5e9fd9e229a3b94d" args="(uint index)" --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">Type& <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::operator[] </td> <td>(</td> <td class="paramtype">uint </td> <td class="paramname"> <em>index</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>the value at the given linear index. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00183">183</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="f16fa88ab35dc89968fb93da1a3095e8"></a><!-- doxytag: member="KGrid2D::Generic::inside" ref="f16fa88ab35dc89968fb93da1a3095e8" args="(const Coord &c) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">bool <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::inside </td> <td>(</td> <td class="paramtype">const Coord & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>if the given coordinate is inside the grid. </dd></dl> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00188">188</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <a class="anchor" name="3d9bb9250d4dd65787b3a3a6097e6a9f"></a><!-- doxytag: member="KGrid2D::Generic::bound" ref="3d9bb9250d4dd65787b3a3a6097e6a9f" args="(Coord &c) const " --> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<class Type> </div> <table class="memname"> <tr> <td class="memname">void <a class="el" href="classKGrid2D_1_1Generic.html">KGrid2D::Generic</a>< Type >::bound </td> <td>(</td> <td class="paramtype">Coord & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Bound the given coordinate with the grid dimensions. <p> <p>Definition at line <a class="el" href="kgrid2d_8h-source.html#l00196">196</a> of file <a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="kgrid2d_8h-source.html">kgrid2d.h</a></ul> </div> </div></div> </td> </tr> <tr> <td valign="top" id="leftmenu" width="25%"> <a name="navigation"></a> <div class="menu_box"><h2>libkdegames</h2> <div class="nav_list"> <ul><li><a href="index.html">Main Page</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="functions.html">Class Members</a></li><li><a href="pages.html">Related Pages</a></li></ul> <!-- <h2>Class Picker</h2> <div style="text-align: center;"> <form name="guideform"> <select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value"> <option value="annotated.html">-- Choose --</option> <option value="classKCanvasRootPixmap.html">kcanvasrootpixmap</option>, <option value="classKCardDialog.html">kcarddialog</option>, <option value="classKChat.html">kchat</option>, <option value="classKChatBase.html">kchatbase</option>, <option value="classKChatBaseText.html">kchatbasetext</option>, <option value="classKExtHighscore_1_1Item.html">kexthighscore::item</option>, <option value="classKExtHighscore_1_1ItemArray.html">kexthighscore::itemarray</option>, <option value="classKExtHighscore_1_1Manager.html">kexthighscore::manager</option>, <option value="classKExtHighscore_1_1MultiplayerScores.html">kexthighscore::multiplayerscores</option>, <option value="classKExtHighscore_1_1Score.html">kexthighscore::score</option>, <option value="classKGame.html">kgame</option>, <option value="classKGameChat.html">kgamechat</option>, <option value="classKGameComputerIO.html">kgamecomputerio</option>, <option value="classKGameConnectDialog.html">kgameconnectdialog</option>, <option value="classKGameDialog.html">kgamedialog</option>, <option value="classKGameDialogChatConfig.html">kgamedialogchatconfig</option>, <option value="classKGameDialogConfig.html">kgamedialogconfig</option>, <option value="classKGameErrorDialog.html">kgameerrordialog</option>, <option value="classKGameErrorMessageDialog.html">kgameerrormessagedialog</option>, <option value="classKGameIO.html">kgameio</option>, <option value="classKGameKeyIO.html">kgamekeyio</option>, <option value="classKGameLCD.html">kgamelcd</option>, <option value="classKGameLCDClock.html">kgamelcdclock</option>, <option value="classKGameLCDList.html">kgamelcdlist</option>, <option value="classKGameMisc.html">kgamemisc</option>, <option value="classKGameMouseIO.html">kgamemouseio</option>, <option value="classKGameNetwork.html">kgamenetwork</option>, <option value="classKGameProcess.html">kgameprocess</option>, <option value="classKGameProcessIO.html">kgameprocessio</option>, <option value="classKGameProgress.html">kgameprogress</option>, <option value="classKGameProperty.html">kgameproperty</option>, <option value="classKGamePropertyBase.html">kgamepropertybase</option>, <option value="classKGamePropertyHandler.html">kgamepropertyhandler</option>, <option value="classKGameSequence.html">kgamesequence</option>, <option value="classKGrid2D_1_1Generic.html">kgrid2d::generic</option>, <option value="classKGrid2D_1_1Hexagonal.html">kgrid2d::hexagonal</option>, <option value="classKGrid2D_1_1HexagonalBase.html">kgrid2d::hexagonalbase</option>, <option value="classKGrid2D_1_1Square.html">kgrid2d::square</option>, <option value="classKGrid2D_1_1SquareBase.html">kgrid2d::squarebase</option>, <option value="classKHighscore.html">khighscore</option>, <option value="classKMessageClient.html">kmessageclient</option>, <option value="classKMessageDirect.html">kmessagedirect</option>, <option value="classKMessageIO.html">kmessageio</option>, <option value="classKMessageServer.html">kmessageserver</option>, <option value="classKMessageServerSocket.html">kmessageserversocket</option>, <option value="classKMessageSocket.html">kmessagesocket</option>, <option value="classKPlayer.html">kplayer</option>, <option value="classKScoreDialog.html">kscoredialog</option>, <option value="classKStdGameAction.html">kstdgameaction</option>, </select> </form> </div> --> </div></div> <div class="menu_box"><h2>API Dox</h2> <div class="nav_list"> <ul> <li><a href="../../libkdegames/html/index.html">libkdegames</a></li> </ul></div></div> </td> </tr> </table> <span class="doNotDisplay"> <a href="http://www.kde.org/" accesskey="8">KDE Home</a> | <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> | <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a> </span> <div style="height: 8px"></div> <div id="footer"> <div id="footer_left"> Maintained by <a href="mailto:groot@kde.org">Adriaan de Groot</a> and <a href="mailto:winter@kde.org">Allen Winter</a>. <br/> KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> | <a href="http://www.kde.org/contact/impressum.php">Legal</a> </div> <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div> </div> <!-- WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL BE BLOCKED INSTANTLY AND PERMANENTLY! <a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a> WARNING END --> </body> </html>