⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cpl__conv_8h.html

📁 gdal库的学习文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
      </table></div><div class="memdoc"><p>Extract filename extension from full filename.<p>Returns a string containing the extention portion of the passed name. If there is no extension (the filename has no dot) an empty string is returned. The returned extension will not include the period.<p><pre> CPLGetExtension( "abc/def.xyz" ) == "xyz" CPLGetExtension( "abc/def" ) == "" </pre><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>pszFullFilename</em>&nbsp;</td><td>the full filename potentially including a path.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>just the extension portion of the path in an internal string which must not be freed. The string may be destroyed by the next CPL filename handling call. </dd></dl></div></div><p><a class="anchor" name="e67694bcaaaa43f046325994e3413bac"></a><!-- doxytag: member="cpl_conv.h::CPLGetFilename" ref="e67694bcaaaa43f046325994e3413bac" args="(const char *)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">const char* CPLGetFilename           </td>          <td>(</td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszFullFilename</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Extract non-directory portion of filename.<p>Returns a string containing the bare filename portion of the passed filename. If there is no filename (passed value ends in trailing directory separator) an empty string is returned.<p><pre> CPLGetFilename( "abc/def.xyz" ) == "def.xyz" CPLGetFilename( "/abc/def/" ) == "" CPLGetFilename( "abc/def" ) == "def" </pre><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>pszFullFilename</em>&nbsp;</td><td>the full filename potentially including a path.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>just the non-directory portion of the path in an internal string which must not be freed. The string may be destroyed by the next CPL filename handling call. </dd></dl></div></div><p><a class="anchor" name="4cd11a5f67bb4816342301fa8a5990a0"></a><!-- doxytag: member="cpl_conv.h::CPLGetPath" ref="4cd11a5f67bb4816342301fa8a5990a0" args="(const char *)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">const char* CPLGetPath           </td>          <td>(</td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszFilename</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Extract directory path portion of filename.<p>Returns a string containing the directory path portion of the passed filename. If there is no path in the passed filename an empty string will be returned (not NULL).<p><pre> CPLGetPath( "abc/def.xyz" ) == "abc" CPLGetPath( "/abc/def/" ) == "/abc/def" CPLGetPath( "/" ) == "/" CPLGetPath( "/abc/def" ) == "/abc" CPLGetPath( "abc" ) == "" </pre><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>pszFilename</em>&nbsp;</td><td>the filename potentially including a path.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>Path in an internal string which must not be freed. The string may be destroyed by the next CPL filename handling call. The returned will generally not contain a trailing path separator. </dd></dl></div></div><p><a class="anchor" name="d102985b0ae1672d3d2cf3a4ea8aea4a"></a><!-- doxytag: member="cpl_conv.h::CPLGetSharedList" ref="d102985b0ae1672d3d2cf3a4ea8aea4a" args="(int *)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">CPLSharedFileInfo* CPLGetSharedList           </td>          <td>(</td>          <td class="paramtype">int *&nbsp;</td>          <td class="paramname"> <em>pnCount</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Fetch list of open shared files.<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>pnCount</em>&nbsp;</td><td>place to put the count of entries.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>the pointer to the first in the array of shared file info structures. </dd></dl></div></div><p><a class="anchor" name="ffa4a3c8bb4ecbbb9ae3d7ffb35d3572"></a><!-- doxytag: member="cpl_conv.h::CPLGetSymbol" ref="ffa4a3c8bb4ecbbb9ae3d7ffb35d3572" args="(const char *, const char *)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void* CPLGetSymbol           </td>          <td>(</td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszLibrary</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszSymbolName</em></td><td>&nbsp;</td>        </tr>        <tr>          <td></td>          <td>)</td>          <td></td><td></td><td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Fetch a function pointer from a shared library / DLL.<p>This function is meant to abstract access to shared libraries and DLLs and performs functions similar to dlopen()/dlsym() on Unix and LoadLibrary() / GetProcAddress() on Windows.<p>If no support for loading entry points from a shared library is available this function will always return NULL. Rules on when this function issues a <a class="el" href="cpl__error_8h.html#ad2b98dd58e4de706a245faddac90403">CPLError()</a> or not are not currently well defined, and will have to be resolved in the future.<p>Currently <a class="el" href="cpl__conv_8h.html#ffa4a3c8bb4ecbbb9ae3d7ffb35d3572">CPLGetSymbol()</a> doesn't try to: <ul><li>prevent the reference count on the library from going up for every request, or given any opportunity to unload the library. </li><li>Attempt to look for the library in non-standard locations. </li><li>Attempt to try variations on the symbol name, like pre-prending or post-pending an underscore. </li></ul><p>Some of these issues may be worked on in the future.<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>pszLibrary</em>&nbsp;</td><td>the name of the shared library or DLL containing the function. May contain path to file. If not system supplies search paths will be used. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pszSymbolName</em>&nbsp;</td><td>the name of the function to fetch a pointer to. </td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to the function if found, or NULL if the function isn't found, or the shared library can't be loaded. </dd></dl></div></div><p><a class="anchor" name="0cd8ae8d760125ec5b01958a776691ec"></a><!-- doxytag: member="cpl_conv.h::CPLIsFilenameRelative" ref="0cd8ae8d760125ec5b01958a776691ec" args="(const char *pszFilename)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">int CPLIsFilenameRelative           </td>          <td>(</td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszFilename</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Is filename relative or absolute?<p>The test is filesystem convention agnostic. That is it will test for Unix style and windows style path conventions regardless of the actual system in use.<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>pszFilename</em>&nbsp;</td><td>the filename with path to test.</td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if the filename is relative or FALSE if it is absolute. </dd></dl></div></div><p><a class="anchor" name="9ebcdb25fc6ff90b0c7b01733d5ae6d3"></a><!-- doxytag: member="cpl_conv.h::CPLMalloc" ref="9ebcdb25fc6ff90b0c7b01733d5ae6d3" args="(size_t)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">void* CPLMalloc           </td>          <td>(</td>          <td class="paramtype">size_t&nbsp;</td>          <td class="paramname"> <em>nSize</em>          </td>          <td>&nbsp;)&nbsp;</td>          <td width="100%"></td>        </tr>      </table></div><div class="memdoc"><p>Safe version of malloc().<p>This function is like the C library malloc(), but raises a CE_Fatal error with <a class="el" href="cpl__error_8h.html#ad2b98dd58e4de706a245faddac90403">CPLError()</a> if it fails to allocate the desired memory. It should be used for small memory allocations that are unlikely to fail and for which the application is unwilling to test for out of memory conditions. It uses VSIMalloc() to get the memory, so any hooking of VSIMalloc() will apply to <a class="el" href="cpl__conv_8h.html#9ebcdb25fc6ff90b0c7b01733d5ae6d3">CPLMalloc()</a> as well. CPLFree() or VSIFree() can be used free memory allocated by <a class="el" href="cpl__conv_8h.html#9ebcdb25fc6ff90b0c7b01733d5ae6d3">CPLMalloc()</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>nSize</em>&nbsp;</td><td>size (in bytes) of memory block to allocate. </td></tr>  </table></dl><dl class="return" compact><dt><b>Returns:</b></dt><dd>pointer to newly allocated memory, only NULL if nSize is zero. </dd></dl></div></div><p><a class="anchor" name="f47485362aca554e37796c352a77fc71"></a><!-- doxytag: member="cpl_conv.h::CPLOpenShared" ref="f47485362aca554e37796c352a77fc71" args="(const char *, const char *, int)" --><div class="memitem"><div class="memproto">      <table class="memname">        <tr>          <td class="memname">FILE* CPLOpenShared           </td>          <td>(</td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszFilename</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">const char *&nbsp;</td>          <td class="paramname"> <em>pszAccess</em>, </td>        </tr>        <tr>          <td class="paramkey"></td>          <td></td>          <td class="paramtype">int&nbsp;</td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -