📄 classogrsfdriver.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>OGR: OGRSFDriver Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.1 --><div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li id="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> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul></div><div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul></div><h1>OGRSFDriver Class Reference</h1><!-- doxytag: class="OGRSFDriver" --><code>#include <<a class="el" href="ogrsf__frmts_8h-source.html">ogrsf_frmts.h</a>></code><p><a href="classOGRSFDriver-members.html">List of all members.</a><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">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriver.html#0e7f90e5c390bccc9e708b75235a2735">GetName</a> ()=0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classOGRDataSource.html">OGRDataSource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriver.html#ee265c3b0a3d4fa3572020d255bb4564">Open</a> (const char *pszName, int bUpdate=FALSE)=0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriver.html#6c37cb7552902cd27cd6d4b904d7c744">TestCapability</a> (const char *)=0</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classOGRDataSource.html">OGRDataSource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriver.html#4339101b2d0851e788b6bcfd248780f6">CreateDataSource</a> (const char *pszName, char **=NULL)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">virtual OGRErr </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriver.html#d8d0872f7fe97e82a05dfbacc2c82be3">DeleteDataSource</a> (const char *pszName)</td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>Represents an operational format driver.<p>One <a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> derived class will normally exist for each file format registered for use, regardless of whether a file has or will be opened. The list of available drivers is normally managed by the <a class="el" href="classOGRSFDriverRegistrar.html">OGRSFDriverRegistrar</a>. <p><hr><h2>Member Function Documentation</h2><a class="anchor" name="0e7f90e5c390bccc9e708b75235a2735"></a><!-- doxytag: member="OGRSFDriver::GetName" ref="0e7f90e5c390bccc9e708b75235a2735" args="()=0" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">const char * OGRSFDriver::GetName </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [pure virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Fetch name of driver (file format). This name should be relatively short (10-40 characters), and should reflect the underlying file format. For instance "ESRI Shapefile".<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#fd11ea603491207a89c75b6b9480e091">OGR_Dr_GetName()</a>.<p><dl class="return" compact><dt><b>Returns:</b></dt><dd>driver name. This is an internal string and should not be modified or freed. </dd></dl></div></div><p><a class="anchor" name="ee265c3b0a3d4fa3572020d255bb4564"></a><!-- doxytag: member="OGRSFDriver::Open" ref="ee265c3b0a3d4fa3572020d255bb4564" args="(const char *pszName, int bUpdate=FALSE)=0" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOGRDataSource.html">OGRDataSource</a> * OGRSFDriver::Open </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>bUpdate</em> = <code>FALSE</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [pure virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Attempt to open file with this driver.<p>This method is what <a class="el" href="classOGRSFDriverRegistrar.html">OGRSFDriverRegistrar</a> uses to implement its <a class="el" href="classOGRSFDriver.html#ee265c3b0a3d4fa3572020d255bb4564">Open()</a> method. See it for more details.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#bd35488a77aae79835b8b753095cebc7">OGR_Dr_Open()</a>.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pszName</em> </td><td>the name of the file, or data source to try and open. </td></tr> <tr><td valign="top"></td><td valign="top"><em>bUpdate</em> </td><td>TRUE if update access is required, otherwise FALSE (the default).</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>NULL on error or if the pass name is not supported by this driver, otherwise a pointer to an <a class="el" href="classOGRDataSource.html">OGRDataSource</a>. This <a class="el" href="classOGRDataSource.html">OGRDataSource</a> should be closed by deleting the object when it is no longer needed. </dd></dl></div></div><p><a class="anchor" name="6c37cb7552902cd27cd6d4b904d7c744"></a><!-- doxytag: member="OGRSFDriver::TestCapability" ref="6c37cb7552902cd27cd6d4b904d7c744" args="(const char *)=0" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">int OGRSFDriver::TestCapability </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszCapability</em> </td> <td> ) </td> <td width="100%"><code> [pure virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Test if capability is available.<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><b>ODrCCreateDataSource</b>: True if this driver can support creating data sources.<p></li><li><b>ODrCDeleteDataSource</b>: True if this driver supports deleting data sources.<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>This method is the same as the C function <a class="el" href="ogr__api_8h.html#9010219bbc2e32627064ed860048d979">OGR_Dr_TestCapability()</a>.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pszCapability</em> </td><td>the capability to test.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if capability available otherwise FALSE. </dd></dl></div></div><p><a class="anchor" name="4339101b2d0851e788b6bcfd248780f6"></a><!-- doxytag: member="OGRSFDriver::CreateDataSource" ref="4339101b2d0851e788b6bcfd248780f6" args="(const char *pszName, char **=NULL)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOGRDataSource.html">OGRDataSource</a> * OGRSFDriver::CreateDataSource </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char ** </td> <td class="paramname"> <em>papszOptions</em> = <code>NULL</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>This method attempts to create a new data source based on the passed driver. The papszOptions argument can be used to control driver specific creation options. These options are normally documented in the format specific documentation.<p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#09a9c68495afce08505b8bbe36c1b96e">OGR_Dr_CreateDataSource()</a>.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pszName</em> </td><td>the name for the new data source. </td></tr> <tr><td valign="top"></td><td valign="top"><em>papszOptions</em> </td><td>a StringList of name=value options. Options are driver specific, and driver information can be found at the following url: <a href="http://gdal.velocet.ca/projects/opengis/ogrhtml/ogr_formats.html">http://gdal.velocet.ca/projects/opengis/ogrhtml/ogr_formats.html</a></td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>NULL is returned on failure, or a new <a class="el" href="classOGRDataSource.html">OGRDataSource</a> on success. </dd></dl></div></div><p><a class="anchor" name="d8d0872f7fe97e82a05dfbacc2c82be3"></a><!-- doxytag: member="OGRSFDriver::DeleteDataSource" ref="d8d0872f7fe97e82a05dfbacc2c82be3" args="(const char *pszName)" --><div class="memitem"><div class="memproto"> <table class="memname"> <tr> <td class="memname">OGRErr OGRSFDriver::DeleteDataSource </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"> <em>pszDataSource</em> </td> <td> ) </td> <td width="100%"><code> [virtual]</code></td> </tr> </table></div><div class="memdoc"><p>Destroy a datasource.<p>Destroy the named datasource. Normally it would be safest if the datasource was not open at the time.<p>Whether this is a supported operation on this driver case be tested using <a class="el" href="classOGRSFDriver.html#6c37cb7552902cd27cd6d4b904d7c744">TestCapability()</a> on ODrCDeleteDataSource.<p>This method is the same as the C function OGR_Dr_DeleteDataSource().<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>pszDataSource</em> </td><td>the name of the datasource to delete.</td></tr> </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>OGRERR_NONE on success, and OGRERR_UNSUPPORTED_OPERATION if this is not supported by this driver. </dd></dl></div></div><p><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>ogrsf_frmts.dox<li>ogrsfdriver.cpp</ul><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.5.1.</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -