Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 7fd7c575020aa78a8e2e309ea8909f43 > files > 723

gdal-1.6.2-6.fc13.i686.rpm

<!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>OGR: OGRDataSource Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>OGRDataSource Class Reference</h1><!-- doxytag: class="OGRDataSource" -->
<p><code>#include &lt;<a class="el" href="ogrsf__frmts_8h_source.html">ogrsf_frmts.h</a>&gt;</code></p>

<p><a href="classOGRDataSource-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a682c885a30cbc3a35ed59ed39f316a55">GetName</a> ()=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a031694429394662fd50353c5e2b68692">GetLayerCount</a> ()=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classOGRLayer.html">OGRLayer</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a618c2fdb1067c9357ca2de9fa6cd5962">GetLayer</a> (int)=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classOGRLayer.html">OGRLayer</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#aa0fafafc83084ad140ecdf17d9e139f9">GetLayerByName</a> (const char *)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#ae108ddad49607c80d3511071ffe248a5">DeleteLayer</a> (int)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a3b7c054c376151e1a1f63861d7239c8b">TestCapability</a> (const char *)=0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classOGRLayer.html">OGRLayer</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a39cfc6e0ee790506d7638b0dce03c7da">CreateLayer</a> (const char *pszName, <a class="el" href="classOGRSpatialReference.html">OGRSpatialReference</a> *poSpatialRef=NULL, <a class="el" href="ogr__core_8h.html#a800236a0d460ef66e687b7b65610f12a">OGRwkbGeometryType</a> eGType=wkbUnknown, char **papszOptions=NULL)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOGRStyleTable.html">OGRStyleTable</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a82b1e41c460dda4633e3c4dd8f24326e">GetStyleTable</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a4946597d697db8dd802e20fc49c0c9ea">SetStyleTableDirectly</a> (<a class="el" href="classOGRStyleTable.html">OGRStyleTable</a> *poStyleTable)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a36054cdc7e65827c05d3a27c7290f8d2">SetStyleTable</a> (<a class="el" href="classOGRStyleTable.html">OGRStyleTable</a> *poStyleTable)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classOGRLayer.html">OGRLayer</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#aa6acc228db6513784a56ce12334a8c33">ExecuteSQL</a> (const char *pszStatement, <a class="el" href="classOGRGeometry.html">OGRGeometry</a> *poSpatialFilter, const char *pszDialect)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a7d3ee7601f510a87afc76de8a51aa9b1">ReleaseResultSet</a> (<a class="el" href="classOGRLayer.html">OGRLayer</a> *poResultsSet)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a1af1c7cf202f9a2ca2310bbfa3d00cca">SyncToDisk</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a82733127f4498fb4ee1d061d73dd549c">Reference</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a538760ac249d06681fd26c383e678cb1">Dereference</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a265abe39da0a136335ca9b4d60e122d9">GetRefCount</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#ab7e7f2d617ad3df448d3e8ebaa800a6a">GetSummaryRefCount</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">OGRErr&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#ae4b1cb2d75f251cfb70d8a9c185a001d">Release</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#ad269574d5e2f63c5b76e001df4a98ffb">GetDriver</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#ada74eb42fd282aa285e9e527a5caeaed">SetDriver</a> (<a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> *poDriver)</td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9fc178ae5e198a19784b23d896ee884c"></a><!-- doxytag: member="OGRDataSource::OGRSFDriverRegistrar" ref="a9fc178ae5e198a19784b23d896ee884c" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRDataSource.html#a9fc178ae5e198a19784b23d896ee884c">OGRSFDriverRegistrar</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This class represents a data source. A data source potentially consists of many layers (<a class="el" href="classOGRLayer.html">OGRLayer</a>). A data source normally consists of one, or a related set of files, though the name doesn't have to be a real item in the file system.</p>
<p>When an <a class="el" href="classOGRDataSource.html">OGRDataSource</a> is destroyed, all it's associated OGRLayers objects are also destroyed. </p>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a39cfc6e0ee790506d7638b0dce03c7da"></a><!-- doxytag: member="OGRDataSource::CreateLayer" ref="a39cfc6e0ee790506d7638b0dce03c7da" args="(const char *pszName, OGRSpatialReference *poSpatialRef=NULL, OGRwkbGeometryType eGType=wkbUnknown, char **papszOptions=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOGRLayer.html">OGRLayer</a> * OGRDataSource::CreateLayer </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>pszName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classOGRSpatialReference.html">OGRSpatialReference</a> *&nbsp;</td>
          <td class="paramname"> <em>poSpatialRef</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="ogr__core_8h.html#a800236a0d460ef66e687b7b65610f12a">OGRwkbGeometryType</a>&nbsp;</td>
          <td class="paramname"> <em>eGType</em> = <code>wkbUnknown</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&nbsp;</td>
          <td class="paramname"> <em>papszOptions</em> = <code>NULL</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This method attempts to create a new layer on the data source with the indicated name, coordinate system, geometry type. The papszOptions argument can be used to control driver specific creation options. These options are normally documented in the format specific documentation.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pszName</em>&nbsp;</td><td>the name for the new layer. This should ideally not match any existing layer on the datasource. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>poSpatialRef</em>&nbsp;</td><td>the coordinate system to use for the new layer, or NULL if no coordinate system is available. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>eGType</em>&nbsp;</td><td>the geometry type for the layer. Use wkbUnknown if there are no constraints on the types geometry to be written. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>papszOptions</em>&nbsp;</td><td>a StringList of name=value options. Options are driver specific.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>NULL is returned on failure, or a new <a class="el" href="classOGRLayer.html">OGRLayer</a> handle on success.</dd></dl>
<p><b>Example:</b></p>
<div class="fragment"><pre class="fragment"><span class="preprocessor">#include &quot;<a class="code" href="ogrsf__frmts_8h.html">ogrsf_frmts.h</a>&quot;</span> 
<span class="preprocessor">#include &quot;<a class="code" href="cpl__string_8h.html">cpl_string.h</a>&quot;</span>

...

        <a class="code" href="classOGRLayer.html">OGRLayer</a> *poLayer;
        <span class="keywordtype">char</span>     *papszOptions;

        <span class="keywordflow">if</span>( !poDS-&gt;<a class="code" href="classOGRDataSource.html#a3b7c054c376151e1a1f63861d7239c8b">TestCapability</a>( ODsCCreateLayer ) )
        {
            ...
        }

        papszOptions = CSLSetNameValue( papszOptions, <span class="stringliteral">&quot;DIM&quot;</span>, <span class="stringliteral">&quot;2&quot;</span> );
        poLayer = poDS-&gt;<a class="code" href="classOGRDataSource.html#a39cfc6e0ee790506d7638b0dce03c7da">CreateLayer</a>( <span class="stringliteral">&quot;NewLayer&quot;</span>, NULL, <a class="code" href="ogr__core_8h.html#a800236a0d460ef66e687b7b65610f12aa3645f782f9b9f7632d7e7cdd0451d58f">wkbUnknown</a>,
                                     papszOptions );
        CSLDestroy( papszOptions );

        <span class="keywordflow">if</span>( poLayer == NULL )
        {
            ...
        }        
</pre></div> 
</div>
</div>
<a class="anchor" id="ae108ddad49607c80d3511071ffe248a5"></a><!-- doxytag: member="OGRDataSource::DeleteLayer" ref="ae108ddad49607c80d3511071ffe248a5" args="(int)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OGRErr OGRDataSource::DeleteLayer </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>iLayer</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Delete the indicated layer from the datasource. If this method is supported the ODsCDeleteLayer capability will test TRUE on the <a class="el" href="classOGRDataSource.html">OGRDataSource</a>.</p>
<p>This method is the same as the C function OGR_DS_DeleteLayer().</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iLayer</em>&nbsp;</td><td>the index of the layer to delete.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>OGRERR_NONE on success, or OGRERR_UNSUPPORTED_OPERATION if deleting layers is not supported for this datasource. </dd></dl>

</div>
</div>
<a class="anchor" id="a538760ac249d06681fd26c383e678cb1"></a><!-- doxytag: member="OGRDataSource::Dereference" ref="a538760ac249d06681fd26c383e678cb1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int OGRDataSource::Dereference </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Decrement datasource reference count.</p>
<p>This method is the same as the C function OGR_DS_Dereference().</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the reference count after decrementing. </dd></dl>

<p>Referenced by <a class="el" href="ogrdatasource_8cpp_source.html#l00642">ExecuteSQL()</a>.</p>

</div>
</div>
<a class="anchor" id="aa6acc228db6513784a56ce12334a8c33"></a><!-- doxytag: member="OGRDataSource::ExecuteSQL" ref="aa6acc228db6513784a56ce12334a8c33" args="(const char *pszStatement, OGRGeometry *poSpatialFilter, const char *pszDialect)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOGRLayer.html">OGRLayer</a> * OGRDataSource::ExecuteSQL </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>pszStatement</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classOGRGeometry.html">OGRGeometry</a> *&nbsp;</td>
          <td class="paramname"> <em>poSpatialFilter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>pszDialect</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Execute an SQL statement against the data store.</p>
<p>The result of an SQL query is either NULL for statements that are in error, or that have no results set, or an <a class="el" href="classOGRLayer.html">OGRLayer</a> pointer representing a results set from the query. Note that this <a class="el" href="classOGRLayer.html">OGRLayer</a> is in addition to the layers in the data store and must be destroyed with OGRDataSource::ReleaseResultsSet() before the data source is closed (destroyed).</p>
<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a9892ecb0bf61add295bd9decdb13797a">OGR_DS_ExecuteSQL()</a>.</p>
<p>For more information on the SQL dialect supported internally by OGR review the <a href="ogr_sql.html">OGR SQL</a> document. Some drivers (ie. Oracle and PostGIS) pass the SQL directly through to the underlying RDBMS.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pszStatement</em>&nbsp;</td><td>the SQL statement to execute. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>poSpatialFilter</em>&nbsp;</td><td>geometry which represents a spatial filter. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pszDialect</em>&nbsp;</td><td>allows control of the statement dialect. By default it is assumed to be "generic" SQL, whatever that is.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>an <a class="el" href="classOGRLayer.html">OGRLayer</a> containing the results of the query. Deallocate with ReleaseResultsSet(). </dd></dl>

<p>References <a class="el" href="ogrdatasource_8cpp_source.html#l00126">Dereference()</a>, <a class="el" href="ogr__feature_8h_source.html#l00130">OGRFeatureDefn::GetFieldCount()</a>, <a class="el" href="ogrfeaturedefn_8cpp_source.html#l00277">OGRFeatureDefn::GetFieldDefn()</a>, <a class="el" href="ogrdatasource_8cpp_source.html#l00371">GetLayerByName()</a>, <a class="el" href="classOGRLayer.html#a80473bcfd11341e70dd35bebe94026cf">OGRLayer::GetLayerDefn()</a>, <a class="el" href="ogr__feature_8h_source.html#l00068">OGRFieldDefn::GetNameRef()</a>, <a class="el" href="ogr__feature_8h_source.html#l00070">OGRFieldDefn::GetType()</a>, <a class="el" href="ogr__core_8h_source.html#l00208">OFTInteger</a>, <a class="el" href="ogr__core_8h_source.html#l00210">OFTReal</a>, and <a class="el" href="ogr__core_8h_source.html#l00212">OFTString</a>.</p>

</div>
</div>
<a class="anchor" id="ad269574d5e2f63c5b76e001df4a98ffb"></a><!-- doxytag: member="OGRDataSource::GetDriver" ref="ad269574d5e2f63c5b76e001df4a98ffb" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> * OGRDataSource::GetDriver </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the driver that the dataset was opened with.</p>
<p>This method is the same as the C function OGR_DS_GetDriver().</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>NULL if driver info is not available, or pointer to a driver owned by the OGRSFDriverManager. </dd></dl>

<p>Referenced by <a class="el" href="ogrsfdriver_8cpp_source.html#l00062">OGR_Dr_CreateDataSource()</a>, <a class="el" href="ogrsfdriver_8cpp_source.html#l00133">OGR_Dr_Open()</a>, and <a class="el" href="ogrsfdriverregistrar_8cpp_source.html#l00183">OGRSFDriverRegistrar::Open()</a>.</p>

</div>
</div>
<a class="anchor" id="a618c2fdb1067c9357ca2de9fa6cd5962"></a><!-- doxytag: member="OGRDataSource::GetLayer" ref="a618c2fdb1067c9357ca2de9fa6cd5962" args="(int)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOGRLayer.html">OGRLayer</a> * OGRDataSource::GetLayer </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>iLayer</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fetch a layer by index. The returned layer remains owned by the <a class="el" href="classOGRDataSource.html">OGRDataSource</a> and should not be deleted by the application.</p>
<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a03998029f904d1c3b12de40114e7503e">OGR_DS_GetLayer()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>iLayer</em>&nbsp;</td><td>a layer number between 0 and <a class="el" href="classOGRDataSource.html#a031694429394662fd50353c5e2b68692">GetLayerCount()</a>-1.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the layer, or NULL if iLayer is out of range or an error occurs. </dd></dl>

<p>Referenced by <a class="el" href="ogrdatasource_8cpp_source.html#l00371">GetLayerByName()</a>, <a class="el" href="ogrdatasource_8cpp_source.html#l00170">GetSummaryRefCount()</a>, and <a class="el" href="ogrdatasource_8cpp_source.html#l00934">SyncToDisk()</a>.</p>

</div>
</div>
<a class="anchor" id="aa0fafafc83084ad140ecdf17d9e139f9"></a><!-- doxytag: member="OGRDataSource::GetLayerByName" ref="aa0fafafc83084ad140ecdf17d9e139f9" args="(const char *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classOGRLayer.html">OGRLayer</a> * OGRDataSource::GetLayerByName </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>pszLayerName</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fetch a layer by name. The returned layer remains owned by the <a class="el" href="classOGRDataSource.html">OGRDataSource</a> and should not be deleted by the application.</p>
<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a74af4912b67bf2a7b6e3230711a40d0e">OGR_DS_GetLayerByName()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pszLayerName</em>&nbsp;</td><td>the layer name of the layer to fetch.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the layer, or NULL if Layer is not found or an error occurs. </dd></dl>

<p>References <a class="el" href="classOGRDataSource.html#a618c2fdb1067c9357ca2de9fa6cd5962">GetLayer()</a>, <a class="el" href="classOGRDataSource.html#a031694429394662fd50353c5e2b68692">GetLayerCount()</a>, <a class="el" href="classOGRLayer.html#a80473bcfd11341e70dd35bebe94026cf">OGRLayer::GetLayerDefn()</a>, and <a class="el" href="ogr__feature_8h_source.html#l00128">OGRFeatureDefn::GetName()</a>.</p>

<p>Referenced by <a class="el" href="ogrdatasource_8cpp_source.html#l00642">ExecuteSQL()</a>.</p>

</div>
</div>
<a class="anchor" id="a031694429394662fd50353c5e2b68692"></a><!-- doxytag: member="OGRDataSource::GetLayerCount" ref="a031694429394662fd50353c5e2b68692" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int OGRDataSource::GetLayerCount </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Get the number of layers in this data source.</p>
<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#ac6da541cb655ab631df729e71da2e762">OGR_DS_GetLayerCount()</a>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>layer count. </dd></dl>

<p>Referenced by <a class="el" href="ogrdatasource_8cpp_source.html#l00371">GetLayerByName()</a>, <a class="el" href="ogrdatasource_8cpp_source.html#l00170">GetSummaryRefCount()</a>, and <a class="el" href="ogrdatasource_8cpp_source.html#l00934">SyncToDisk()</a>.</p>

</div>
</div>
<a class="anchor" id="a682c885a30cbc3a35ed59ed39f316a55"></a><!-- doxytag: member="OGRDataSource::GetName" ref="a682c885a30cbc3a35ed59ed39f316a55" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char * OGRDataSource::GetName </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the name of the data source. This string should be sufficient to open the data source if passed to the same <a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> that this data source was opened with, but it need not be exactly the same string that was used to open the data source. Normally this is a filename.</p>
<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#aea8cc826474b55371b1b4e24a24ba1db">OGR_DS_GetName()</a>.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to an internal name string which should not be modified or freed by the caller. </dd></dl>

</div>
</div>
<a class="anchor" id="a265abe39da0a136335ca9b4d60e122d9"></a><!-- doxytag: member="OGRDataSource::GetRefCount" ref="a265abe39da0a136335ca9b4d60e122d9" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int OGRDataSource::GetRefCount </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fetch reference count.</p>
<p>This method is the same as the C function OGR_DS_GetRefCount().</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the current reference count for the datasource object itself. </dd></dl>

</div>
</div>
<a class="anchor" id="a82b1e41c460dda4633e3c4dd8f24326e"></a><!-- doxytag: member="OGRDataSource::GetStyleTable" ref="a82b1e41c460dda4633e3c4dd8f24326e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OGRDataSource::GetStyleTable </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns data source style table.</p>
<p>This method is the same as the C function OGR_DS_GetStyleTable().</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to a style table which should not be modified or freed by the caller. </dd></dl>

</div>
</div>
<a class="anchor" id="ab7e7f2d617ad3df448d3e8ebaa800a6a"></a><!-- doxytag: member="OGRDataSource::GetSummaryRefCount" ref="ab7e7f2d617ad3df448d3e8ebaa800a6a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int OGRDataSource::GetSummaryRefCount </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fetch reference count of datasource and all owned layers.</p>
<p>This method is the same as the C function OGR_DS_GetSummaryRefCount().</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the current summary reference count for the datasource and its layers. </dd></dl>

<p>References <a class="el" href="classOGRDataSource.html#a618c2fdb1067c9357ca2de9fa6cd5962">GetLayer()</a>, <a class="el" href="classOGRDataSource.html#a031694429394662fd50353c5e2b68692">GetLayerCount()</a>, and <a class="el" href="ogrlayer_8cpp_source.html#l00135">OGRLayer::GetRefCount()</a>.</p>

</div>
</div>
<a class="anchor" id="a82733127f4498fb4ee1d061d73dd549c"></a><!-- doxytag: member="OGRDataSource::Reference" ref="a82733127f4498fb4ee1d061d73dd549c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int OGRDataSource::Reference </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Increment datasource reference count.</p>
<p>This method is the same as the C function OGR_DS_Reference().</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the reference count after incrementing. </dd></dl>

<p>Referenced by <a class="el" href="ogrsfdriverregistrar_8cpp_source.html#l00183">OGRSFDriverRegistrar::Open()</a>.</p>

</div>
</div>
<a class="anchor" id="ae4b1cb2d75f251cfb70d8a9c185a001d"></a><!-- doxytag: member="OGRDataSource::Release" ref="ae4b1cb2d75f251cfb70d8a9c185a001d" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OGRErr OGRDataSource::Release </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Drop a reference to this datasource, and if the reference count drops to zero close (destroy) the datasource. Internally this actually calls the OGRSFDriverRegistrary::ReleaseDataSource() method. This method is essentially a convenient alias.</p>
<p>This method is the same as the C function OGRReleaseDataSource().</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>OGRERR_NONE on success or an error code. </dd></dl>

<p>References <a class="el" href="ogrsfdriverregistrar_8cpp_source.html#l00168">OGRSFDriverRegistrar::GetRegistrar()</a>.</p>

</div>
</div>
<a class="anchor" id="a7d3ee7601f510a87afc76de8a51aa9b1"></a><!-- doxytag: member="OGRDataSource::ReleaseResultSet" ref="a7d3ee7601f510a87afc76de8a51aa9b1" args="(OGRLayer *poResultsSet)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OGRDataSource::ReleaseResultSet </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOGRLayer.html">OGRLayer</a> *&nbsp;</td>
          <td class="paramname"> <em>poResultsSet</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Release results of <a class="el" href="classOGRDataSource.html#aa6acc228db6513784a56ce12334a8c33">ExecuteSQL()</a>.</p>
<p>This method should only be used to deallocate OGRLayers resulting from an <a class="el" href="classOGRDataSource.html#aa6acc228db6513784a56ce12334a8c33">ExecuteSQL()</a> call on the same <a class="el" href="classOGRDataSource.html">OGRDataSource</a>. Failure to deallocate a results set before destroying the <a class="el" href="classOGRDataSource.html">OGRDataSource</a> may cause errors.</p>
<p>This method is the same as the C function OGR_L_ReleaseResultsSet().</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>poResultsSet</em>&nbsp;</td><td>the result of a previous <a class="el" href="classOGRDataSource.html#aa6acc228db6513784a56ce12334a8c33">ExecuteSQL()</a> call. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ada74eb42fd282aa285e9e527a5caeaed"></a><!-- doxytag: member="OGRDataSource::SetDriver" ref="ada74eb42fd282aa285e9e527a5caeaed" args="(OGRSFDriver *poDriver)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OGRDataSource::SetDriver </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> *&nbsp;</td>
          <td class="paramname"> <em>poDriver</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Sets the driver that the dataset was created or opened with.</p>
<dl class="note"><dt><b>Note:</b></dt><dd>This method is not exposed as the OGR C API function.</dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>poDriver</em>&nbsp;</td><td>pointer to driver instance associated with the data source. </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="ogrsfdriver_8cpp_source.html#l00062">OGR_Dr_CreateDataSource()</a>, and <a class="el" href="ogrsfdriver_8cpp_source.html#l00133">OGR_Dr_Open()</a>.</p>

</div>
</div>
<a class="anchor" id="a36054cdc7e65827c05d3a27c7290f8d2"></a><!-- doxytag: member="OGRDataSource::SetStyleTable" ref="a36054cdc7e65827c05d3a27c7290f8d2" args="(OGRStyleTable *poStyleTable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OGRDataSource::SetStyleTable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOGRStyleTable.html">OGRStyleTable</a> *&nbsp;</td>
          <td class="paramname"> <em>poStyleTable</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set data source style table.</p>
<p>This method operate exactly as <a class="el" href="classOGRDataSource.html#a4946597d697db8dd802e20fc49c0c9ea">OGRDataSource::SetStyleTableDirectly()</a> except that it does not assume ownership of the passed table.</p>
<p>This method is the same as the C function OGR_DS_SetStyleTable().</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>poStyleTable</em>&nbsp;</td><td>pointer to style table to set </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="ogrfeaturestyle_8cpp_source.html#l00893">OGRStyleTable::Clone()</a>.</p>

</div>
</div>
<a class="anchor" id="a4946597d697db8dd802e20fc49c0c9ea"></a><!-- doxytag: member="OGRDataSource::SetStyleTableDirectly" ref="a4946597d697db8dd802e20fc49c0c9ea" args="(OGRStyleTable *poStyleTable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void OGRDataSource::SetStyleTableDirectly </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classOGRStyleTable.html">OGRStyleTable</a> *&nbsp;</td>
          <td class="paramname"> <em>poStyleTable</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Set data source style table.</p>
<p>This method operate exactly as <a class="el" href="classOGRDataSource.html#a36054cdc7e65827c05d3a27c7290f8d2">OGRDataSource::SetStyleTable()</a> except that it assumes ownership of the passed table.</p>
<p>This method is the same as the C function OGR_DS_SetStyleTableDirectly().</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>poStyleTable</em>&nbsp;</td><td>pointer to style table to set </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a1af1c7cf202f9a2ca2310bbfa3d00cca"></a><!-- doxytag: member="OGRDataSource::SyncToDisk" ref="a1af1c7cf202f9a2ca2310bbfa3d00cca" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OGRErr OGRDataSource::SyncToDisk </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Flush pending changes to disk.</p>
<p>This call is intended to force the datasource to flush any pending writes to disk, and leave the disk file in a consistent state. It would not normally have any effect on read-only datasources.</p>
<p>Some data sources do not implement this method, and will still return OGRERR_NONE. An error is only returned if an error occurs while attempting to flush to disk.</p>
<p>The default implementation of this method just calls the <a class="el" href="classOGRDataSource.html#a1af1c7cf202f9a2ca2310bbfa3d00cca">SyncToDisk()</a> method on each of the layers. Conceptionally, calling <a class="el" href="classOGRDataSource.html#a1af1c7cf202f9a2ca2310bbfa3d00cca">SyncToDisk()</a> on a datasource should include any work that might be accomplished by calling <a class="el" href="classOGRDataSource.html#a1af1c7cf202f9a2ca2310bbfa3d00cca">SyncToDisk()</a> on layers in that data source.</p>
<p>This method is the same as the C function OGR_DS_SyncToDisk().</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>OGRERR_NONE if no error occurs (even if nothing is done) or an error code. </dd></dl>

<p>References <a class="el" href="classOGRDataSource.html#a618c2fdb1067c9357ca2de9fa6cd5962">GetLayer()</a>, <a class="el" href="classOGRDataSource.html#a031694429394662fd50353c5e2b68692">GetLayerCount()</a>, and <a class="el" href="ogrlayer_8cpp_source.html#l00853">OGRLayer::SyncToDisk()</a>.</p>

</div>
</div>
<a class="anchor" id="a3b7c054c376151e1a1f63861d7239c8b"></a><!-- doxytag: member="OGRDataSource::TestCapability" ref="a3b7c054c376151e1a1f63861d7239c8b" args="(const char *)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int OGRDataSource::TestCapability </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>pszCapability</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Test if capability is available.</p>
<p>One of the following data source capability names can be passed into this method, and a TRUE or FALSE value will be returned indicating whether or not the capability is available for this object.</p>
<ul>
<li>
<p class="startli"><b>ODsCCreateLayer</b>: True if this datasource can create new layers.</p>
<p class="endli"></p>
</li>
</ul>
<p>The #define macro forms of the capability names should be used in preference to the strings themselves to avoid mispelling.</p>
<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#ad0fefab726442fa71ab5ef74fe8549a6">OGR_DS_TestCapability()</a>.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pszCapability</em>&nbsp;</td><td>the capability to test.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if capability available otherwise FALSE. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="ogrsf__frmts_8h_source.html">ogrsf_frmts.h</a></li>
<li>ogrsf_frmts.dox</li>
<li>ogrdatasource.cpp</li>
</ul>
</div>
<hr>

Generated for GDAL by 
<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.6.2-20100208.
</body>
</html>