EVOLUTION-MANAGER
Edit File: classOGRSFDriverRegistrar.html
<!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"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.5"/> <title>OGR: OGRSFDriverRegistrar Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">OGR </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <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 class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</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="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div><!-- top --> <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="classOGRSFDriverRegistrar-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">OGRSFDriverRegistrar Class Reference</div> </div> </div><!--header--> <div class="contents"> <p><code>#include <<a class="el" href="ogrsf__frmts_8h_source.html">ogrsf_frmts.h</a>></code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a56a1c4fbd9bdfd484a2132963f52de1f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriverRegistrar.html#a56a1c4fbd9bdfd484a2132963f52de1f">RegisterDriver</a> (<a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> *poDriver)</td></tr> <tr class="memdesc:a56a1c4fbd9bdfd484a2132963f52de1f"><td class="mdescLeft"> </td><td class="mdescRight">Add a driver to the list of registered drivers. <a href="#a56a1c4fbd9bdfd484a2132963f52de1f">More...</a><br/></td></tr> <tr class="separator:a56a1c4fbd9bdfd484a2132963f52de1f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2ed3257e6310a7d14ce9be39498b87ad"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriverRegistrar.html#a2ed3257e6310a7d14ce9be39498b87ad">DeregisterDriver</a> (<a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> *poDriver)</td></tr> <tr class="memdesc:a2ed3257e6310a7d14ce9be39498b87ad"><td class="mdescLeft"> </td><td class="mdescRight">Remove the passed driver from the list of registered drivers. <a href="#a2ed3257e6310a7d14ce9be39498b87ad">More...</a><br/></td></tr> <tr class="separator:a2ed3257e6310a7d14ce9be39498b87ad"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad6e753df0c4548187f9fd7e3d5af3999"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriverRegistrar.html#ad6e753df0c4548187f9fd7e3d5af3999">GetDriverCount</a> (void)</td></tr> <tr class="memdesc:ad6e753df0c4548187f9fd7e3d5af3999"><td class="mdescLeft"> </td><td class="mdescRight">Fetch the number of registered drivers. <a href="#ad6e753df0c4548187f9fd7e3d5af3999">More...</a><br/></td></tr> <tr class="separator:ad6e753df0c4548187f9fd7e3d5af3999"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a359c5bcb65b737b1c59bab9c2ff78e7e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriverRegistrar.html#a359c5bcb65b737b1c59bab9c2ff78e7e">GetDriver</a> (int iDriver)</td></tr> <tr class="memdesc:a359c5bcb65b737b1c59bab9c2ff78e7e"><td class="mdescLeft"> </td><td class="mdescRight">Fetch the indicated driver. <a href="#a359c5bcb65b737b1c59bab9c2ff78e7e">More...</a><br/></td></tr> <tr class="separator:a359c5bcb65b737b1c59bab9c2ff78e7e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad214c51c2e38d486388f77fb9314143c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriverRegistrar.html#ad214c51c2e38d486388f77fb9314143c">GetDriverByName</a> (const char *)</td></tr> <tr class="memdesc:ad214c51c2e38d486388f77fb9314143c"><td class="mdescLeft"> </td><td class="mdescRight">Fetch the indicated driver. <a href="#ad214c51c2e38d486388f77fb9314143c">More...</a><br/></td></tr> <tr class="separator:ad214c51c2e38d486388f77fb9314143c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af22f975ae36d5b12f04e472d97dadd47"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriverRegistrar.html#af22f975ae36d5b12f04e472d97dadd47">GetOpenDSCount</a> ()</td></tr> <tr class="memdesc:af22f975ae36d5b12f04e472d97dadd47"><td class="mdescLeft"> </td><td class="mdescRight">Return the number of opened datasources. <a href="#af22f975ae36d5b12f04e472d97dadd47">More...</a><br/></td></tr> <tr class="separator:af22f975ae36d5b12f04e472d97dadd47"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab9bdaa724b3e1cdaa0b808872f49a48b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOGRDataSource.html">OGRDataSource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriverRegistrar.html#ab9bdaa724b3e1cdaa0b808872f49a48b">GetOpenDS</a> (int)</td></tr> <tr class="memdesc:ab9bdaa724b3e1cdaa0b808872f49a48b"><td class="mdescLeft"> </td><td class="mdescRight">Return the iDS th datasource opened. <a href="#ab9bdaa724b3e1cdaa0b808872f49a48b">More...</a><br/></td></tr> <tr class="separator:ab9bdaa724b3e1cdaa0b808872f49a48b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae98efe100c0ecea4f6868e008838f878"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriverRegistrar.html#ae98efe100c0ecea4f6868e008838f878">AutoLoadDrivers</a> ()</td></tr> <tr class="memdesc:ae98efe100c0ecea4f6868e008838f878"><td class="mdescLeft"> </td><td class="mdescRight">Auto-load GDAL drivers from shared libraries. <a href="#ae98efe100c0ecea4f6868e008838f878">More...</a><br/></td></tr> <tr class="separator:ae98efe100c0ecea4f6868e008838f878"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr class="memitem:afbd5602672ac5f1882055cc459375f8e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classOGRSFDriverRegistrar.html">OGRSFDriverRegistrar</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriverRegistrar.html#afbd5602672ac5f1882055cc459375f8e">GetRegistrar</a> ()</td></tr> <tr class="memdesc:afbd5602672ac5f1882055cc459375f8e"><td class="mdescLeft"> </td><td class="mdescRight">Return the driver manager, creating one if none exist. <a href="#afbd5602672ac5f1882055cc459375f8e">More...</a><br/></td></tr> <tr class="separator:afbd5602672ac5f1882055cc459375f8e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5ee13e09d55d146f45bb5417fa524f54"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classOGRDataSource.html">OGRDataSource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOGRSFDriverRegistrar.html#a5ee13e09d55d146f45bb5417fa524f54">Open</a> (const char *pszName, int bUpdate=FALSE, <a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> **ppoDriver=NULL)</td></tr> <tr class="memdesc:a5ee13e09d55d146f45bb5417fa524f54"><td class="mdescLeft"> </td><td class="mdescRight">Open a file / data source with one of the registered drivers. <a href="#a5ee13e09d55d146f45bb5417fa524f54">More...</a><br/></td></tr> <tr class="separator:a5ee13e09d55d146f45bb5417fa524f54"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Singleton manager for <a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> instances that will be used to try and open datasources. Normally the registrar is populated with standard drivers using the <a class="el" href="ogr__api_8h.html#ae904632d0bc86ba5501921ca594e18da" title="Register all drivers. ">OGRRegisterAll()</a> function and does not need to be directly accessed. The driver registrar and all registered drivers may be cleaned up on shutdown using <a class="el" href="ogr__api_8h.html#ae5d5a052ed1046ec85236fe4a92733e2" title="Cleanup all OGR related resources. ">OGRCleanupAll()</a>. </p> </div><h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="ae98efe100c0ecea4f6868e008838f878"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void OGRSFDriverRegistrar::AutoLoadDrivers </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Auto-load GDAL drivers from shared libraries. </p> <p>This function will automatically load drivers from shared libraries. It searches the "driver path" for .so (or .dll) files that start with the prefix "ogr_X.so". It then tries to load them and then tries to call a function within them called RegisterOGRX() where the 'X' is the same as the remainder of the shared library basename, or failing that to call GDALRegisterMe().</p> <p>There are a few rules for the driver path. If the GDAL_DRIVER_PATH environment variable it set, it is taken to be a list of directories to search separated by colons on unix, or semi-colons on Windows.</p> <p>Auto loading can be completely disabled by setting the GDAL_DRIVER_PATH config option to "disable".</p> <p>If that is not set the following defaults are used:</p> <ul> <li> Linux/Unix: <prefix>/lib/gdalplugins is searched or /usr/local/lib/gdalplugins if the install prefix is not known. </li> <li> MacOSX: <prefix>/PlugIns is searched, or /usr/local/lib/gdalplugins if the install prefix is not known. Also, the framework directory /Library/Application Support/GDAL/PlugIns is searched. </li> <li> Win32: <prefix>/lib/gdalplugins if the prefix is known (normally it is not), otherwise the gdalplugins subdirectory of the directory containing the currently running executable is used. </li> </ul> <p>References <a class="el" href="cpl__conv_8h.html#a5b990672a0221115c9b54a8931554136">CPLCalloc()</a>, <a class="el" href="cpl__error_8h.html#ad0c5d3481dd34c1f3a0f7775ebf74817">CPLDebug()</a>, <a class="el" href="cpl__conv_8h.html#aee0f81afed5b1b31da1b401822c7a2fb">CPLFormFilename()</a>, <a class="el" href="cpl__conv_8h.html#a913ec8c102e1dd312d9447cd815a8673">CPLGetBasename()</a>, <a class="el" href="cpl__conv_8h.html#a8b249211d68e4b6b1844004891e5ca5a">CPLGetConfigOption()</a>, <a class="el" href="cpl__conv_8h.html#a3c6f71eaf9b8e8f98242af533752d1bb">CPLGetDirname()</a>, <a class="el" href="cpl__conv_8h.html#a5325c900de0918020b747ed07d98da24">CPLGetExecPath()</a>, <a class="el" href="cpl__conv_8h.html#ae46fcfcea1b2e8c24738542613ba4752">CPLGetExtension()</a>, <a class="el" href="cpl__conv_8h.html#affa4a3c8bb4ecbbb9ae3d7ffb35d3572">CPLGetSymbol()</a>, <a class="el" href="cpl__string_8h.html#ac1ffd0e5baf9729f09388a38c07f5835">CSLCount()</a>, <a class="el" href="cpl__string_8h.html#a5a39b9c5896a273cc6f06c1d5be93238">CSLDestroy()</a>, and <a class="el" href="cpl__vsi_8h.html#ac92fbd5e6fc143b026001b32c4c19ed1">VSIStatL()</a>.</p> <p>Referenced by <a class="el" href="ogrsf__frmts_8h.html#ad1fef92f28a0ad3472ddbbaeebfa39a2">OGRRegisterAll()</a>.</p> </div> </div> <a class="anchor" id="a2ed3257e6310a7d14ce9be39498b87ad"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void OGRSFDriverRegistrar::DeregisterDriver </td> <td>(</td> <td class="paramtype"><a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> * </td> <td class="paramname"><em>poDriver</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Remove the passed driver from the list of registered drivers. </p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a18492d049ef3b65be20c12f5ad7e29a2" title="Remove the passed driver from the list of registered drivers. ">OGRDeregisterDriver()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">poDriver</td><td>the driver to deregister.</td></tr> </table> </dd> </dl> <dl class="section since"><dt>Since</dt><dd>GDAL 1.8.0 </dd></dl> <p>Referenced by <a class="el" href="ogr__api_8h.html#a18492d049ef3b65be20c12f5ad7e29a2">OGRDeregisterDriver()</a>.</p> </div> </div> <a class="anchor" id="a359c5bcb65b737b1c59bab9c2ff78e7e"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> * OGRSFDriverRegistrar::GetDriver </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>iDriver</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Fetch the indicated driver. </p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a3f8080605cad5aeef9519c38fe160b51" title="Fetch the indicated driver. ">OGRGetDriver()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">iDriver</td><td>the driver index, from 0 to <a class="el" href="classOGRSFDriverRegistrar.html#ad6e753df0c4548187f9fd7e3d5af3999" title="Fetch the number of registered drivers. ">GetDriverCount()</a>-1.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the driver, or NULL if iDriver is out of range. </dd></dl> <p>Referenced by <a class="el" href="ogr__api_8h.html#a3f8080605cad5aeef9519c38fe160b51">OGRGetDriver()</a>.</p> </div> </div> <a class="anchor" id="ad214c51c2e38d486388f77fb9314143c"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> * OGRSFDriverRegistrar::GetDriverByName </td> <td>(</td> <td class="paramtype">const char * </td> <td class="paramname"><em>pszName</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Fetch the indicated driver. </p> <p>This method is the same as the C function OGRGetDriverByName</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszName</td><td>the driver name</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the driver, or NULL if no driver with that name is found </dd></dl> <p>Referenced by <a class="el" href="ogr__api_8h.html#ae814db7e2212b9bbb0fd8c361bee11fe">OGRGetDriverByName()</a>.</p> </div> </div> <a class="anchor" id="ad6e753df0c4548187f9fd7e3d5af3999"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int OGRSFDriverRegistrar::GetDriverCount </td> <td>(</td> <td class="paramtype">void </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Fetch the number of registered drivers. </p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#ad0f6d2bbd269b56a61d1c1841dac2575" title="Fetch the number of registered drivers. ">OGRGetDriverCount()</a>.</p> <dl class="section return"><dt>Returns</dt><dd>the drivers count. </dd></dl> <p>Referenced by <a class="el" href="ogr__api_8h.html#ad0f6d2bbd269b56a61d1c1841dac2575">OGRGetDriverCount()</a>.</p> </div> </div> <a class="anchor" id="ab9bdaa724b3e1cdaa0b808872f49a48b"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOGRDataSource.html">OGRDataSource</a> * OGRSFDriverRegistrar::GetOpenDS </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>iDS</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Return the iDS th datasource opened. </p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a273626bc189e1734984afa66b5f76918" title="Return the iDS th datasource opened. ">OGRGetOpenDS()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">iDS</td><td>the index of the dataset to return (between 0 and <a class="el" href="classOGRSFDriverRegistrar.html#af22f975ae36d5b12f04e472d97dadd47" title="Return the number of opened datasources. ">GetOpenDSCount()</a> - 1) </td></tr> </table> </dd> </dl> <p>Referenced by <a class="el" href="ogr__api_8h.html#a273626bc189e1734984afa66b5f76918">OGRGetOpenDS()</a>.</p> </div> </div> <a class="anchor" id="af22f975ae36d5b12f04e472d97dadd47"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">int OGRSFDriverRegistrar::GetOpenDSCount </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Return the number of opened datasources. </p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a342fa7b65116145ed01f7e5888abb603" title="Return the number of opened datasources. ">OGRGetOpenDSCount()</a></p> <dl class="section return"><dt>Returns</dt><dd>the number of opened datasources. </dd></dl> <p>Referenced by <a class="el" href="ogr__api_8h.html#a342fa7b65116145ed01f7e5888abb603">OGRGetOpenDSCount()</a>.</p> </div> </div> <a class="anchor" id="afbd5602672ac5f1882055cc459375f8e"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOGRSFDriverRegistrar.html">OGRSFDriverRegistrar</a> * OGRSFDriverRegistrar::GetRegistrar </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Return the driver manager, creating one if none exist. </p> <p>Fetch registrar.</p> <dl class="section return"><dt>Returns</dt><dd>the driver manager.</dd></dl> <p>This static method should be used to fetch the singleton registrar. It will create a registrar if there is not already one in existance.</p> <dl class="section return"><dt>Returns</dt><dd>the current driver registrar. </dd></dl> <p>Referenced by <a class="el" href="ogr__api_8h.html#a18492d049ef3b65be20c12f5ad7e29a2">OGRDeregisterDriver()</a>, <a class="el" href="ogr__api_8h.html#ae814db7e2212b9bbb0fd8c361bee11fe">OGRGetDriverByName()</a>, <a class="el" href="ogr__api_8h.html#a273626bc189e1734984afa66b5f76918">OGRGetOpenDS()</a>, <a class="el" href="ogr__api_8h.html#a342fa7b65116145ed01f7e5888abb603">OGRGetOpenDSCount()</a>, <a class="el" href="ogrsf__frmts_8h.html#ad1fef92f28a0ad3472ddbbaeebfa39a2">OGRRegisterAll()</a>, <a class="el" href="ogr__api_8h.html#a7ace3e4b97b55b999e16557a75bf7226">OGRRegisterDriver()</a>, <a class="el" href="ogr__api_8h.html#ad3abed0c3b232fe55a580726536fe6fa">OGRReleaseDataSource()</a>, <a class="el" href="classOGRSFDriverRegistrar.html#a5ee13e09d55d146f45bb5417fa524f54">Open()</a>, and <a class="el" href="classOGRDataSource.html#ae4b1cb2d75f251cfb70d8a9c185a001d">OGRDataSource::Release()</a>.</p> </div> </div> <a class="anchor" id="a5ee13e09d55d146f45bb5417fa524f54"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOGRDataSource.html">OGRDataSource</a> * OGRSFDriverRegistrar::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> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> ** </td> <td class="paramname"><em>ppoDriver</em> = <code>NULL</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Open a file / data source with one of the registered drivers. </p> <p>This method loops through all the drivers registered with the driver manager trying each until one succeeds with the given data source. This method is static. Applications don't normally need to use any other <a class="el" href="classOGRSFDriverRegistrar.html">OGRSFDriverRegistrar</a> methods directly, nor do they normally need to have a pointer to an <a class="el" href="classOGRSFDriverRegistrar.html">OGRSFDriverRegistrar</a> instance.</p> <p>If this method fails, <a class="el" href="cpl__error_8h.html#a7f71ade3bb0a0e9e45802975ec59ff5e">CPLGetLastErrorMsg()</a> can be used to check if there is an error message explaining why.</p> <p>For drivers supporting the VSI virtual file API, it is possible to open a file in a .zip archive (see <a class="el" href="cpl__vsi_8h.html#a884fac3cd6be2c09deb807e959d78b3a" title="Install ZIP file system handler. ">VSIInstallZipFileHandler()</a>), in a .tar/.tar.gz/.tgz archive (see <a class="el" href="cpl__vsi_8h.html#ad6dd983338849e7da4eaa88f6458ab64" title="Install /vsitar/ file system handler. ">VSIInstallTarFileHandler()</a>) or on a HTTP / FTP server (see <a class="el" href="cpl__vsi_8h.html#a4f791960f2d86713d16e99e9c0c36258" title="Install /vsicurl/ HTTP/FTP file system handler (requires libcurl) ">VSIInstallCurlFileHandler()</a>)</p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a2da3630231780d519543d1679c83e62f" title="Open a file / data source with one of the registered drivers. ">OGROpen()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pszName</td><td>the name of the file, or data source to open. UTF-8 encoded. </td></tr> <tr><td class="paramname">bUpdate</td><td>FALSE for read-only access (the default) or TRUE for read-write access. </td></tr> <tr><td class="paramname">ppoDriver</td><td>if non-NULL, this argument will be updated with a pointer to the driver which was used to open the data source.</td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</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> <p><b>Example:</b></p> <pre> <a class="el" href="classOGRDataSource.html">OGRDataSource</a> *poDS;</pre><pre> poDS = <a class="el" href="classOGRSFDriverRegistrar.html#a5ee13e09d55d146f45bb5417fa524f54" title="Open a file / data source with one of the registered drivers. ">OGRSFDriverRegistrar::Open</a>( "polygon.shp" ); if( poDS == NULL ) { return; }</pre><pre> ... use the data source ...</pre><pre> OGRDataSource::DestroyDataSource(poDS); </pre> <p>References <a class="el" href="cpl__error_8h.html#ad0c5d3481dd34c1f3a0f7775ebf74817">CPLDebug()</a>, <a class="el" href="cpl__error_8h.html#a29626fd8fdb658b19439beeb73a59560">CPLErrorReset()</a>, <a class="el" href="cpl__error_8h.html#a8df0d4e01034cf79202314c92251e920">CPLGetLastErrorType()</a>, <a class="el" href="classOGRDataSource.html#ad269574d5e2f63c5b76e001df4a98ffb">OGRDataSource::GetDriver()</a>, <a class="el" href="classOGRSFDriver.html#a0e7f90e5c390bccc9e708b75235a2735">OGRSFDriver::GetName()</a>, <a class="el" href="classOGRSFDriverRegistrar.html#afbd5602672ac5f1882055cc459375f8e">GetRegistrar()</a>, <a class="el" href="classOGRSFDriver.html#aee265c3b0a3d4fa3572020d255bb4564">OGRSFDriver::Open()</a>, and <a class="el" href="classOGRDataSource.html#a82733127f4498fb4ee1d061d73dd549c">OGRDataSource::Reference()</a>.</p> <p>Referenced by <a class="el" href="ogr__api_8h.html#a2da3630231780d519543d1679c83e62f">OGROpen()</a>.</p> </div> </div> <a class="anchor" id="a56a1c4fbd9bdfd484a2132963f52de1f"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void OGRSFDriverRegistrar::RegisterDriver </td> <td>(</td> <td class="paramtype"><a class="el" href="classOGRSFDriver.html">OGRSFDriver</a> * </td> <td class="paramname"><em>poDriver</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Add a driver to the list of registered drivers. </p> <p>If the passed driver is already registered (based on pointer comparison) then the driver isn't registered. New drivers are added at the end of the list of registered drivers.</p> <p>This method is the same as the C function <a class="el" href="ogr__api_8h.html#a7ace3e4b97b55b999e16557a75bf7226" title="Add a driver to the list of registered drivers. ">OGRRegisterDriver()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">poDriver</td><td>the driver to add. </td></tr> </table> </dd> </dl> <p>References <a class="el" href="cpl__conv_8h.html#a8b249211d68e4b6b1844004891e5ca5a">CPLGetConfigOption()</a>, <a class="el" href="cpl__conv_8h.html#a6861a37c19e925ee0aa8d5b10ee13147">CPLRealloc()</a>, <a class="el" href="cpl__string_8h.html#a5a39b9c5896a273cc6f06c1d5be93238">CSLDestroy()</a>, and <a class="el" href="classOGRSFDriver.html#a0e7f90e5c390bccc9e708b75235a2735">OGRSFDriver::GetName()</a>.</p> <p>Referenced by <a class="el" href="ogr__api_8h.html#a7ace3e4b97b55b999e16557a75bf7226">OGRRegisterDriver()</a>.</p> </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>ogrsfdriverregistrar.cpp</li> </ul> </div><!-- contents --> <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.8.5. </body> </html>