OGR
cpl_conv.h
Go to the documentation of this file.
1 /******************************************************************************
2  * $Id: cpl_conv.h c39d156816d937c3139360b11786c769aeabd21e 2018-05-05 19:48:08 +0200 Even Rouault $
3  *
4  * Project: CPL - Common Portability Library
5  * Purpose: Convenience functions declarations.
6  * This is intended to remain light weight.
7  * Author: Frank Warmerdam, warmerdam@pobox.com
8  *
9  ******************************************************************************
10  * Copyright (c) 1998, Frank Warmerdam
11  * Copyright (c) 2007-2013, Even Rouault <even dot rouault at mines-paris dot org>
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a
14  * copy of this software and associated documentation files (the "Software"),
15  * to deal in the Software without restriction, including without limitation
16  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  * and/or sell copies of the Software, and to permit persons to whom the
18  * Software is furnished to do so, subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be included
21  * in all copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29  * DEALINGS IN THE SOFTWARE.
30  ****************************************************************************/
31 
32 #ifndef CPL_CONV_H_INCLUDED
33 #define CPL_CONV_H_INCLUDED
34 
35 #include "cpl_port.h"
36 #include "cpl_vsi.h"
37 #include "cpl_error.h"
38 
46 /* -------------------------------------------------------------------- */
47 /* Runtime check of various configuration items. */
48 /* -------------------------------------------------------------------- */
50 
52 void CPL_DLL CPLVerifyConfiguration(void);
55 const char CPL_DLL * CPL_STDCALL
56 CPLGetConfigOption( const char *, const char * ) CPL_WARN_UNUSED_RESULT;
57 const char CPL_DLL * CPL_STDCALL
58 CPLGetThreadLocalConfigOption( const char *, const char * ) CPL_WARN_UNUSED_RESULT;
59 void CPL_DLL CPL_STDCALL CPLSetConfigOption( const char *, const char * );
60 void CPL_DLL CPL_STDCALL CPLSetThreadLocalConfigOption( const char *pszKey,
61  const char *pszValue );
63 void CPL_DLL CPL_STDCALL CPLFreeConfig(void);
65 char CPL_DLL** CPLGetConfigOptions(void);
66 void CPL_DLL CPLSetConfigOptions(const char* const * papszConfigOptions);
67 char CPL_DLL** CPLGetThreadLocalConfigOptions(void);
68 void CPL_DLL CPLSetThreadLocalConfigOptions(const char* const * papszConfigOptions);
69 
70 /* -------------------------------------------------------------------- */
71 /* Safe malloc() API. Thin cover over VSI functions with fatal */
72 /* error reporting if memory allocation fails. */
73 /* -------------------------------------------------------------------- */
74 void CPL_DLL *CPLMalloc( size_t ) CPL_WARN_UNUSED_RESULT;
75 void CPL_DLL *CPLCalloc( size_t, size_t ) CPL_WARN_UNUSED_RESULT;
76 void CPL_DLL *CPLRealloc( void *, size_t ) CPL_WARN_UNUSED_RESULT;
77 char CPL_DLL *CPLStrdup( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
78 char CPL_DLL *CPLStrlwr( char *);
79 
81 #define CPLFree VSIFree
82 
83 /* -------------------------------------------------------------------- */
84 /* Read a line from a text file, and strip of CR/LF. */
85 /* -------------------------------------------------------------------- */
86 char CPL_DLL *CPLFGets( char *, int, FILE *);
87 const char CPL_DLL *CPLReadLine( FILE * );
88 const char CPL_DLL *CPLReadLineL( VSILFILE * );
89 const char CPL_DLL *CPLReadLine2L( VSILFILE *, int, CSLConstList );
90 const char CPL_DLL *CPLReadLine3L( VSILFILE *, int, int *, CSLConstList );
91 
92 /* -------------------------------------------------------------------- */
93 /* Convert ASCII string to floating point number */
94 /* (THESE FUNCTIONS ARE NOT LOCALE AWARE!). */
95 /* -------------------------------------------------------------------- */
96 double CPL_DLL CPLAtof(const char *);
97 double CPL_DLL CPLAtofDelim(const char *, char);
98 double CPL_DLL CPLStrtod(const char *, char **);
99 double CPL_DLL CPLStrtodDelim(const char *, char **, char);
100 float CPL_DLL CPLStrtof(const char *, char **);
101 float CPL_DLL CPLStrtofDelim(const char *, char **, char);
102 
103 /* -------------------------------------------------------------------- */
104 /* Convert number to string. This function is locale agnostic */
105 /* (i.e. it will support "," or "." regardless of current locale) */
106 /* -------------------------------------------------------------------- */
107 double CPL_DLL CPLAtofM(const char *);
108 
109 /* -------------------------------------------------------------------- */
110 /* Read a numeric value from an ASCII character string. */
111 /* -------------------------------------------------------------------- */
112 char CPL_DLL *CPLScanString( const char *, int, int, int );
113 double CPL_DLL CPLScanDouble( const char *, int );
114 long CPL_DLL CPLScanLong( const char *, int );
115 unsigned long CPL_DLL CPLScanULong( const char *, int );
116 GUIntBig CPL_DLL CPLScanUIntBig( const char *, int );
117 GIntBig CPL_DLL CPLAtoGIntBig( const char* pszString );
118 GIntBig CPL_DLL CPLAtoGIntBigEx( const char* pszString, int bWarn, int *pbOverflow );
119 void CPL_DLL *CPLScanPointer( const char *, int );
120 
121 /* -------------------------------------------------------------------- */
122 /* Print a value to an ASCII character string. */
123 /* -------------------------------------------------------------------- */
124 int CPL_DLL CPLPrintString( char *, const char *, int );
125 int CPL_DLL CPLPrintStringFill( char *, const char *, int );
126 int CPL_DLL CPLPrintInt32( char *, GInt32 , int );
127 int CPL_DLL CPLPrintUIntBig( char *, GUIntBig , int );
128 int CPL_DLL CPLPrintDouble( char *, const char *, double, const char * );
129 int CPL_DLL CPLPrintTime( char *, int , const char *, const struct tm *,
130  const char * );
131 int CPL_DLL CPLPrintPointer( char *, void *, int );
132 
133 /* -------------------------------------------------------------------- */
134 /* Fetch a function from DLL / so. */
135 /* -------------------------------------------------------------------- */
136 
137 void CPL_DLL *CPLGetSymbol( const char *, const char * );
138 
139 /* -------------------------------------------------------------------- */
140 /* Fetch executable path. */
141 /* -------------------------------------------------------------------- */
142 int CPL_DLL CPLGetExecPath( char *pszPathBuf, int nMaxLength );
143 
144 /* -------------------------------------------------------------------- */
145 /* Filename handling functions. */
146 /* -------------------------------------------------------------------- */
147 const char CPL_DLL *CPLGetPath( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
148 const char CPL_DLL *CPLGetDirname( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
149 const char CPL_DLL *CPLGetFilename( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
150 const char CPL_DLL *CPLGetBasename( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
151 const char CPL_DLL *CPLGetExtension( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
152 char CPL_DLL *CPLGetCurrentDir(void);
153 const char CPL_DLL *CPLFormFilename( const char *pszPath,
154  const char *pszBasename,
155  const char *pszExtension ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
156 const char CPL_DLL *CPLFormCIFilename( const char *pszPath,
157  const char *pszBasename,
158  const char *pszExtension ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
159 const char CPL_DLL *CPLResetExtension( const char *, const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
160 const char CPL_DLL *CPLProjectRelativeFilename( const char *pszProjectDir,
161  const char *pszSecondaryFilename ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
162 int CPL_DLL CPLIsFilenameRelative( const char *pszFilename );
163 const char CPL_DLL *CPLExtractRelativePath(const char *, const char *, int *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
164 const char CPL_DLL *CPLCleanTrailingSlash( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
165 char CPL_DLL **CPLCorrespondingPaths( const char *pszOldFilename,
166  const char *pszNewFilename,
167  char **papszFileList ) CPL_WARN_UNUSED_RESULT;
168 int CPL_DLL CPLCheckForFile( char *pszFilename, char **papszSiblingList );
169 
170 const char CPL_DLL *CPLGenerateTempFilename( const char *pszStem ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
171 const char CPL_DLL *CPLExpandTilde( const char *pszFilename ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
172 const char CPL_DLL *CPLGetHomeDir(void) CPL_WARN_UNUSED_RESULT;
173 
174 /* -------------------------------------------------------------------- */
175 /* Find File Function */
176 /* -------------------------------------------------------------------- */
177 
179 typedef const char *(*CPLFileFinder)(const char *, const char *);
180 
181 const char CPL_DLL *CPLFindFile(const char *pszClass,
182  const char *pszBasename);
183 const char CPL_DLL *CPLDefaultFindFile(const char *pszClass,
184  const char *pszBasename);
185 void CPL_DLL CPLPushFileFinder( CPLFileFinder pfnFinder );
186 CPLFileFinder CPL_DLL CPLPopFileFinder(void);
187 void CPL_DLL CPLPushFinderLocation( const char * );
188 void CPL_DLL CPLPopFinderLocation(void);
189 void CPL_DLL CPLFinderClean(void);
190 
191 /* -------------------------------------------------------------------- */
192 /* Safe version of stat() that works properly on stuff like "C:". */
193 /* -------------------------------------------------------------------- */
194 int CPL_DLL CPLStat( const char *, VSIStatBuf * ) CPL_WARN_UNUSED_RESULT;
195 
196 /* -------------------------------------------------------------------- */
197 /* Reference counted file handle manager. Makes sharing file */
198 /* handles more practical. */
199 /* -------------------------------------------------------------------- */
200 
202 typedef struct {
203  FILE *fp;
204  int nRefCount;
205  int bLarge;
206  char *pszFilename;
207  char *pszAccess;
209 
210 FILE CPL_DLL *CPLOpenShared( const char *, const char *, int );
211 void CPL_DLL CPLCloseShared( FILE * );
212 CPLSharedFileInfo CPL_DLL *CPLGetSharedList( int * );
213 void CPL_DLL CPLDumpSharedList( FILE * );
215 void CPL_DLL CPLCleanupSharedFileMutex( void );
218 /* -------------------------------------------------------------------- */
219 /* DMS to Dec to DMS conversion. */
220 /* -------------------------------------------------------------------- */
221 double CPL_DLL CPLDMSToDec( const char *is );
222 const char CPL_DLL *CPLDecToDMS( double dfAngle, const char * pszAxis,
223  int nPrecision );
224 double CPL_DLL CPLPackedDMSToDec( double );
225 double CPL_DLL CPLDecToPackedDMS( double dfDec );
226 
227 void CPL_DLL CPLStringToComplex( const char *pszString,
228  double *pdfReal, double *pdfImag );
229 
230 /* -------------------------------------------------------------------- */
231 /* Misc other functions. */
232 /* -------------------------------------------------------------------- */
233 int CPL_DLL CPLUnlinkTree( const char * );
234 int CPL_DLL CPLCopyFile( const char *pszNewPath, const char *pszOldPath );
235 int CPL_DLL CPLCopyTree( const char *pszNewPath, const char *pszOldPath );
236 int CPL_DLL CPLMoveFile( const char *pszNewPath, const char *pszOldPath );
237 int CPL_DLL CPLSymlink( const char* pszOldPath, const char* pszNewPath, CSLConstList papszOptions );
238 
239 /* -------------------------------------------------------------------- */
240 /* ZIP Creation. */
241 /* -------------------------------------------------------------------- */
242 
244 #define CPL_ZIP_API_OFFERED
245 
246 void CPL_DLL *CPLCreateZip( const char *pszZipFilename, char **papszOptions );
247 CPLErr CPL_DLL CPLCreateFileInZip( void *hZip, const char *pszFilename,
248  char **papszOptions );
249 CPLErr CPL_DLL CPLWriteFileInZip( void *hZip, const void *pBuffer, int nBufferSize );
250 CPLErr CPL_DLL CPLCloseFileInZip( void *hZip );
251 CPLErr CPL_DLL CPLCloseZip( void *hZip );
252 
253 /* -------------------------------------------------------------------- */
254 /* ZLib compression */
255 /* -------------------------------------------------------------------- */
256 
257 void CPL_DLL *CPLZLibDeflate( const void* ptr, size_t nBytes, int nLevel,
258  void* outptr, size_t nOutAvailableBytes,
259  size_t* pnOutBytes );
260 void CPL_DLL *CPLZLibInflate( const void* ptr, size_t nBytes,
261  void* outptr, size_t nOutAvailableBytes,
262  size_t* pnOutBytes );
263 
264 /* -------------------------------------------------------------------- */
265 /* XML validation. */
266 /* -------------------------------------------------------------------- */
267 int CPL_DLL CPLValidateXML(const char* pszXMLFilename,
268  const char* pszXSDFilename,
269  CSLConstList papszOptions);
270 
271 /* -------------------------------------------------------------------- */
272 /* Locale handling. Prevents parallel executions of setlocale(). */
273 /* -------------------------------------------------------------------- */
274 char* CPLsetlocale (int category, const char* locale);
276 void CPLCleanupSetlocaleMutex(void);
284 int CPL_DLL CPLIsPowerOfTwo( unsigned int i );
285 
286 CPL_C_END
287 
288 /* -------------------------------------------------------------------- */
289 /* C++ object for temporarily forcing a LC_NUMERIC locale to "C". */
290 /* -------------------------------------------------------------------- */
291 
293 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
294 
295 extern "C++"
296 {
297 class CPL_DLL CPLLocaleC
298 {
299  CPL_DISALLOW_COPY_ASSIGN(CPLLocaleC)
300 public:
301  CPLLocaleC();
302  ~CPLLocaleC();
303 
304 private:
305  char *pszOldLocale;
306 };
307 
308 // Does the same as CPLLocaleC except that, when available, it tries to
309 // only affect the current thread. But code that would be dependent of
310 // setlocale(LC_NUMERIC, NULL) returning "C", such as current proj.4 versions,
311 // will not work depending on the actual implementation
312 class CPLThreadLocaleCPrivate;
313 class CPL_DLL CPLThreadLocaleC
314 {
315  CPL_DISALLOW_COPY_ASSIGN(CPLThreadLocaleC)
316 
317 public:
318  CPLThreadLocaleC();
319  ~CPLThreadLocaleC();
320 
321 private:
322  CPLThreadLocaleCPrivate* m_private;
323 };
324 }
325 
326 #endif /* def __cplusplus */
327 
329 
330 
331 /* -------------------------------------------------------------------- */
332 /* C++ object for temporarily forcing a config option */
333 /* -------------------------------------------------------------------- */
334 
336 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
337 
338 extern "C++"
339 {
340 class CPL_DLL CPLConfigOptionSetter
341 {
342  CPL_DISALLOW_COPY_ASSIGN(CPLConfigOptionSetter)
343 public:
344  CPLConfigOptionSetter(const char* pszKey, const char* pszValue,
345  bool bSetOnlyIfUndefined);
346  ~CPLConfigOptionSetter();
347 
348 private:
349  char* m_pszKey;
350  char *m_pszOldValue;
351  bool m_bRestoreOldValue;
352 };
353 }
354 
355 #endif /* def __cplusplus */
356 
358 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
359 
360 extern "C++"
361 {
362 
363 #ifndef DOXYGEN_SKIP
364 #include <type_traits> // for std::is_base_of
365 #endif
366 
367 namespace cpl
368 {
378  template<typename To, typename From> inline To down_cast(From* f)
379  {
380  static_assert(
381  (std::is_base_of<From,
382  typename std::remove_pointer<To>::type>::value),
383  "target type not derived from source type");
384  CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr);
385  return static_cast<To>(f);
386  }
387 }
388 } // extern "C++"
389 
390 #endif /* def __cplusplus */
391 
392 #endif /* ndef CPL_CONV_H_INCLUDED */
CPLPopFinderLocation
void CPLPopFinderLocation(void)
Definition: cpl_findfile.cpp:285
CPLStrtodDelim
double CPLStrtodDelim(const char *, char **, char)
Definition: cpl_strtod.cpp:231
CPLReadLineL
const char * CPLReadLineL(VSILFILE *)
Definition: cpl_conv.cpp:630
GINTBIG_MAX
#define GINTBIG_MAX
Definition: cpl_port.h:256
CPLGenerateTempFilename
const char * CPLGenerateTempFilename(const char *pszStem)
Definition: cpl_path.cpp:1105
GByte
unsigned char GByte
Definition: cpl_port.h:215
CPLIsPowerOfTwo
int CPLIsPowerOfTwo(unsigned int i)
Definition: cpl_conv.cpp:3018
CPLGetSymbol
void * CPLGetSymbol(const char *, const char *)
Definition: cplgetsymbol.cpp:89
CPLScanString
char * CPLScanString(const char *, int, int, int)
Definition: cpl_conv.cpp:846
GInt16
short GInt16
Definition: cpl_port.h:211
VSIFReadL
size_t VSIFReadL(void *, size_t, size_t, VSILFILE *) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT
Read bytes from file.
Definition: cpl_vsil.cpp:1690
VSIRmdir
int VSIRmdir(const char *pszDirname)
Delete a directory.
Definition: cpl_vsil.cpp:647
CPLPrintStringFill
int CPLPrintStringFill(char *, const char *, int)
Definition: cpl_conv.cpp:1267
cpl_error.h
CPLCleanTrailingSlash
const char * CPLCleanTrailingSlash(const char *)
Definition: cpl_path.cpp:949
CPLGetExecPath
int CPLGetExecPath(char *pszPathBuf, int nMaxLength)
Definition: cpl_getexecpath.cpp:132
CPLFindFile
const char * CPLFindFile(const char *pszClass, const char *pszBasename)
Definition: cpl_findfile.cpp:177
CPLPrintTime
int CPLPrintTime(char *, int, const char *, const struct tm *, const char *)
Definition: cpl_conv.cpp:1502
CPLDMSToDec
double CPLDMSToDec(const char *is)
Definition: cpl_conv.cpp:2046
CPLExtractRelativePath
const char * CPLExtractRelativePath(const char *, const char *, int *)
Definition: cpl_path.cpp:857
VSI_REALLOC_VERBOSE
#define VSI_REALLOC_VERBOSE(pOldPtr, nNewSize)
Definition: cpl_vsi.h:288
CPLZLibInflate
void * CPLZLibInflate(const void *ptr, size_t nBytes, void *outptr, size_t nOutAvailableBytes, size_t *pnOutBytes)
Uncompress a buffer compressed with ZLib DEFLATE compression.
Definition: cpl_conv.cpp:3116
CPLPrintUIntBig
int CPLPrintUIntBig(char *, GUIntBig, int)
Definition: cpl_conv.cpp:1350
CPLCalloc
void * CPLCalloc(size_t, size_t)
Definition: cpl_conv.cpp:138
CPLCopyFile
int CPLCopyFile(const char *pszNewPath, const char *pszOldPath)
Definition: cpl_conv.cpp:2644
CPLSetConfigOptions
void CPLSetConfigOptions(const char *const *papszConfigOptions)
Definition: cpl_conv.cpp:1765
CPLCloseZip
CPLErr CPLCloseZip(void *hZip)
Definition: cpl_conv.cpp:3105
VSIRealloc
void * VSIRealloc(void *, size_t)
Definition: cpl_vsisimple.cpp:681
CPLScanPointer
void * CPLScanPointer(const char *, int)
Definition: cpl_conv.cpp:1105
cpl_vsi.h
CSLSetNameValue
char ** CSLSetNameValue(char **papszStrList, const char *pszName, const char *pszValue)
Definition: cpl_string.cpp:1877
CPLsnprintf
int CPLsnprintf(char *str, size_t size, const char *fmt,...)
Definition: cpl_string.cpp:1337
CPLPushFinderLocation
void CPLPushFinderLocation(const char *)
Definition: cpl_findfile.cpp:246
CPLPackedDMSToDec
double CPLPackedDMSToDec(double)
Definition: cpl_conv.cpp:2222
CPLAtoGIntBig
GIntBig CPLAtoGIntBig(const char *pszString)
Definition: cpl_conv.cpp:998
CPLSharedFileInfo::bLarge
int bLarge
Definition: cpl_conv.h:205
CPLDumpSharedList
void CPLDumpSharedList(FILE *)
Definition: cpl_conv.cpp:2521
CPLGetSharedList
CPLSharedFileInfo * CPLGetSharedList(int *)
Definition: cpl_conv.cpp:2499
CPLResetExtension
const char * CPLResetExtension(const char *, const char *)
Definition: cpl_path.cpp:431
VSI_ISREG
#define VSI_ISREG(x)
Definition: cpl_vsi.h:124
CPLSharedFileInfo
Definition: cpl_conv.h:202
VSIMkdir
int VSIMkdir(const char *pszPathname, long mode)
Create a directory.
Definition: cpl_vsil.cpp:423
CPLString
Convenient string class based on std::string.
Definition: cpl_string.h:330
VSIRename
int VSIRename(const char *oldpath, const char *newpath)
Rename a file.
Definition: cpl_vsil.cpp:529
VSIFWriteL
size_t VSIFWriteL(const void *, size_t, size_t, VSILFILE *) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT
Write bytes to file.
Definition: cpl_vsil.cpp:1804
CPLRealloc
void * CPLRealloc(void *, size_t)
Definition: cpl_conv.cpp:225
CPLAtofM
double CPLAtofM(const char *)
Definition: cpl_strtod.cpp:142
VSI_ISDIR
#define VSI_ISDIR(x)
Definition: cpl_vsi.h:126
CPL_FRMT_GIB
#define CPL_FRMT_GIB
Definition: cpl_port.h:316
EQUAL
#define EQUAL(a, b)
Definition: cpl_port.h:569
CPLGetPath
const char * CPLGetPath(const char *)
Definition: cpl_path.cpp:153
VSIFCloseL
int VSIFCloseL(VSILFILE *) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT
Close file.
Definition: cpl_vsil.cpp:1472
CPLCloseFileInZip
CPLErr CPLCloseFileInZip(void *hZip)
Definition: cpl_conv.cpp:3103
CPLFinderClean
void CPLFinderClean(void)
Definition: cpl_findfile.cpp:134
CPLGetThreadLocalConfigOption
const char * CPLGetThreadLocalConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1780
CPLDefaultFindFile
const char * CPLDefaultFindFile(const char *pszClass, const char *pszBasename)
Definition: cpl_findfile.cpp:149
CPLAssert
#define CPLAssert(expr)
Definition: cpl_error.h:186
CPLAtoGIntBigEx
GIntBig CPLAtoGIntBigEx(const char *pszString, int bWarn, int *pbOverflow)
Definition: cpl_conv.cpp:1050
CPL_C_START
#define CPL_C_START
Definition: cpl_port.h:337
CPLOpenShared
FILE * CPLOpenShared(const char *, const char *, int)
Definition: cpl_conv.cpp:2335
CPLE_OutOfMemory
#define CPLE_OutOfMemory
Definition: cpl_error.h:101
CPLTestBool
bool CPLTestBool(const char *pszValue)
Definition: cpl_string.cpp:1526
CPLCheckForFile
int CPLCheckForFile(char *pszFilename, char **papszSiblingList)
Definition: cpl_conv.cpp:3053
CPLGetCurrentDir
char * CPLGetCurrentDir(void)
Definition: cpl_path.cpp:396
CPLFGets
char * CPLFGets(char *, int, FILE *)
Definition: cpl_conv.cpp:364
CSLConstList
char ** CSLConstList
Definition: cpl_port.h:1194
CPLCloseShared
void CPLCloseShared(FILE *)
Definition: cpl_conv.cpp:2408
VSIFTellL
vsi_l_offset VSIFTellL(VSILFILE *)
Tell current file offset.
Definition: cpl_vsil.cpp:1575
CPLGetDirname
const char * CPLGetDirname(const char *)
Definition: cpl_path.cpp:208
GUIntBig
unsigned long long GUIntBig
Definition: cpl_port.h:251
CPLCreateZip
void * CPLCreateZip(const char *pszZipFilename, char **papszOptions)
Definition: cpl_conv.cpp:3091
CPLReadLine3L
const char * CPLReadLine3L(VSILFILE *, int, int *, CSLConstList)
Definition: cpl_conv.cpp:682
VALIDATE_POINTER1
#define VALIDATE_POINTER1(ptr, func, rc)
Definition: cpl_error.h:276
CPLGetConfigOptions
char ** CPLGetConfigOptions(void)
Definition: cpl_conv.cpp:1739
CPL_C_END
#define CPL_C_END
Definition: cpl_port.h:339
CPLPrintString
int CPLPrintString(char *, const char *, int)
Definition: cpl_conv.cpp:1223
GINTBIG_MIN
#define GINTBIG_MIN
Definition: cpl_port.h:254
CPLDebug
void CPLDebug(const char *, const char *,...)
Definition: cpl_error.cpp:602
CPLIsFilenameRelative
int CPLIsFilenameRelative(const char *pszFilename)
Definition: cpl_path.cpp:816
CPLFormFilename
const char * CPLFormFilename(const char *pszPath, const char *pszBasename, const char *pszExtension)
Definition: cpl_path.cpp:537
VSIStatL
int VSIStatL(const char *, VSIStatBufL *)
Get filesystem object info.
Definition: cpl_vsil.cpp:737
VSIUnlink
int VSIUnlink(const char *pszFilename)
Delete a file.
Definition: cpl_vsil.cpp:498
CPLProjectRelativeFilename
const char * CPLProjectRelativeFilename(const char *pszProjectDir, const char *pszSecondaryFilename)
Definition: cpl_path.cpp:750
CPLMalloc
void * CPLMalloc(size_t)
Definition: cpl_conv.cpp:168
cpl_conv.h
CPLFileFinder
const char *(* CPLFileFinder)(const char *, const char *)
Definition: cpl_conv.h:179
cpl_string.h
CPLFormCIFilename
const char * CPLFormCIFilename(const char *pszPath, const char *pszBasename, const char *pszExtension)
Definition: cpl_path.cpp:657
CPLMoveFile
int CPLMoveFile(const char *pszNewPath, const char *pszOldPath)
Definition: cpl_conv.cpp:2784
CPLSharedFileInfoExtra
Definition: cpl_conv.cpp:111
VSIFSeekL
int VSIFSeekL(VSILFILE *, vsi_l_offset, int) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT
Seek to requested offset.
Definition: cpl_vsil.cpp:1532
CPLSPrintf
const char * CPLSPrintf(const char *fmt,...)
Definition: cpl_string.cpp:977
CPLStrtof
float CPLStrtof(const char *, char **)
Definition: cpl_strtod.cpp:397
CPLSetThreadLocalConfigOptions
void CPLSetThreadLocalConfigOptions(const char *const *papszConfigOptions)
Definition: cpl_conv.cpp:1952
CPLMutexHolder
Definition: cpl_multiproc.h:140
CPLError
void CPLError(CPLErr eErrClass, CPLErrorNum err_no, const char *fmt,...)
Definition: cpl_error.cpp:308
CPLEmergencyError
void CPLEmergencyError(const char *)
Definition: cpl_error.cpp:489
CPLCorrespondingPaths
char ** CPLCorrespondingPaths(const char *pszOldFilename, const char *pszNewFilename, char **papszFileList)
Definition: cpl_path.cpp:1000
VSIFree
void VSIFree(void *)
Definition: cpl_vsisimple.cpp:827
CPLE_NotSupported
#define CPLE_NotSupported
Definition: cpl_error.h:109
CPLScanULong
unsigned long CPLScanULong(const char *, int)
Definition: cpl_conv.cpp:934
CPLSetConfigOption
void CPLSetConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1832
cpl::down_cast
To down_cast(From *f)
Definition: cpl_conv.h:378
CPLDecToDMS
const char * CPLDecToDMS(double dfAngle, const char *pszAxis, int nPrecision)
Definition: cpl_conv.cpp:2129
CPLStrnlen
size_t CPLStrnlen(const char *pszStr, size_t nMaxLen)
Definition: cpl_string.cpp:2796
CPLUnlinkTree
int CPLUnlinkTree(const char *)
Definition: cpl_conv.cpp:2559
CPLCopyTree
int CPLCopyTree(const char *pszNewPath, const char *pszOldPath)
Definition: cpl_conv.cpp:2706
CSLDuplicate
char ** CSLDuplicate(CSLConstList papszStrList)
Definition: cpl_string.cpp:228
CPLSharedFileInfo::pszAccess
char * pszAccess
Definition: cpl_conv.h:207
CPLWriteFileInZip
CPLErr CPLWriteFileInZip(void *hZip, const void *pBuffer, int nBufferSize)
Definition: cpl_conv.cpp:3101
VSIMalloc
void * VSIMalloc(size_t)
Definition: cpl_vsisimple.cpp:558
CSLDestroy
void CSLDestroy(char **papszStrList)
Definition: cpl_string.cpp:200
GIntBig
long long GIntBig
Definition: cpl_port.h:248
VSI_MALLOC_VERBOSE
#define VSI_MALLOC_VERBOSE(size)
Definition: cpl_vsi.h:268
CPLsetlocale
char * CPLsetlocale(int category, const char *locale)
Definition: cpl_conv.cpp:2992
CPLSymlink
int CPLSymlink(const char *pszOldPath, const char *pszNewPath, CSLConstList papszOptions)
Definition: cpl_conv.cpp:2805
CPL_UNUSED
#define CPL_UNUSED
Definition: cpl_port.h:948
CPLStat
int CPLStat(const char *, VSIStatBuf *)
Definition: cpl_conv.cpp:1997
CPL_WARN_UNUSED_RESULT
#define CPL_WARN_UNUSED_RESULT
Definition: cpl_port.h:939
CPLExpandTilde
const char * CPLExpandTilde(const char *pszFilename)
Definition: cpl_path.cpp:1148
CPLDecToPackedDMS
double CPLDecToPackedDMS(double dfDec)
Definition: cpl_conv.cpp:2256
VSIStatBufL
struct stat64 VSIStatBufL
Definition: cpl_vsi.h:194
cpl_port.h
CPLReadLine
const char * CPLReadLine(FILE *)
Definition: cpl_conv.cpp:566
CPLPrintDouble
int CPLPrintDouble(char *, const char *, double, const char *)
Definition: cpl_conv.cpp:1444
VSIFOpenL
VSILFILE * VSIFOpenL(const char *, const char *)
Open file.
Definition: cpl_vsil.cpp:997
CPLSharedFileInfo::pszFilename
char * pszFilename
Definition: cpl_conv.h:206
CSLFetchNameValue
const char * CSLFetchNameValue(CSLConstList papszStrList, const char *pszName)
Definition: cpl_string.cpp:1674
CPLErr
CPLErr
Definition: cpl_error.h:53
CPLPrintPointer
int CPLPrintPointer(char *, void *, int)
Definition: cpl_conv.cpp:1400
VSIReadDir
char ** VSIReadDir(const char *)
Read names in a directory.
Definition: cpl_vsil.cpp:83
CPLStrdup
char * CPLStrdup(const char *)
Definition: cpl_conv.cpp:293
CPLAtof
double CPLAtof(const char *)
Definition: cpl_strtod.cpp:117
CPLPopFileFinder
CPLFileFinder CPLPopFileFinder(void)
Definition: cpl_findfile.cpp:235
CPLScanUIntBig
GUIntBig CPLScanUIntBig(const char *, int)
Definition: cpl_conv.cpp:964
CPLReadLine2L
const char * CPLReadLine2L(VSILFILE *, int, CSLConstList)
Definition: cpl_conv.cpp:652
CPLCreateFileInZip
CPLErr CPLCreateFileInZip(void *hZip, const char *pszFilename, char **papszOptions)
Definition: cpl_conv.cpp:3099
CPLGetHomeDir
const char * CPLGetHomeDir(void)
Definition: cpl_path.cpp:1176
CPLPrintInt32
int CPLPrintInt32(char *, GInt32, int)
Definition: cpl_conv.cpp:1311
CPLStrtofDelim
float CPLStrtofDelim(const char *, char **, char)
Definition: cpl_strtod.cpp:347
CPLPushFileFinder
void CPLPushFileFinder(CPLFileFinder pfnFinder)
Definition: cpl_findfile.cpp:200
CPLScanLong
long CPLScanLong(const char *, int)
Definition: cpl_conv.cpp:906
CPLGetThreadLocalConfigOptions
char ** CPLGetThreadLocalConfigOptions(void)
Definition: cpl_conv.cpp:1922
CPLScanDouble
double CPLScanDouble(const char *, int)
Definition: cpl_conv.cpp:1171
CPLE_FileIO
#define CPLE_FileIO
Definition: cpl_error.h:103
CPLGetBasename
const char * CPLGetBasename(const char *)
Definition: cpl_path.cpp:292
CPLStringToComplex
void CPLStringToComplex(const char *pszString, double *pdfReal, double *pdfImag)
Definition: cpl_conv.cpp:2273
CPLAtofDelim
double CPLAtofDelim(const char *, char)
Definition: cpl_strtod.cpp:73
CPLFree
#define CPLFree
Definition: cpl_conv.h:81
GInt32
int GInt32
Definition: cpl_port.h:205
CPLGetExtension
const char * CPLGetExtension(const char *)
Definition: cpl_path.cpp:345
CPL_DISALLOW_COPY_ASSIGN
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Definition: cpl_port.h:997
CPLGetFilename
const char * CPLGetFilename(const char *)
Definition: cpl_path.cpp:260
CPL_RETURNS_NONNULL
#define CPL_RETURNS_NONNULL
Definition: cpl_port.h:972
CPLSharedFileInfo::nRefCount
int nRefCount
Definition: cpl_conv.h:204
CPLSharedFileInfo::fp
FILE * fp
Definition: cpl_conv.h:203
CPLStrtod
double CPLStrtod(const char *, char **)
Definition: cpl_strtod.cpp:321
CPLGetConfigOption
const char * CPLGetConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1692
VSILFILE
FILE VSILFILE
Definition: cpl_vsi.h:156
CPLSetThreadLocalConfigOption
void CPLSetThreadLocalConfigOption(const char *pszKey, const char *pszValue)
Definition: cpl_conv.cpp:1885
CPLStrlwr
char * CPLStrlwr(char *)
Definition: cpl_conv.cpp:319
STARTS_WITH_CI
#define STARTS_WITH_CI(a, b)
Definition: cpl_port.h:580
CPLE_AppDefined
#define CPLE_AppDefined
Definition: cpl_error.h:99
GUInt32
unsigned int GUInt32
Definition: cpl_port.h:207

Generated for GDAL by doxygen 1.8.20.