OGR
cpl_conv.h
Go to the documentation of this file.
1/******************************************************************************
2 * $Id$
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
52void CPL_DLL CPLVerifyConfiguration(void);
55const char CPL_DLL * CPL_STDCALL
56CPLGetConfigOption( const char *, const char * ) CPL_WARN_UNUSED_RESULT;
57const char CPL_DLL * CPL_STDCALL
58CPLGetThreadLocalConfigOption( const char *, const char * ) CPL_WARN_UNUSED_RESULT;
59void CPL_DLL CPL_STDCALL CPLSetConfigOption( const char *, const char * );
60void CPL_DLL CPL_STDCALL CPLSetThreadLocalConfigOption( const char *pszKey,
61 const char *pszValue );
63void CPL_DLL CPL_STDCALL CPLFreeConfig(void);
65char CPL_DLL** CPLGetConfigOptions(void);
66void CPL_DLL CPLSetConfigOptions(const char* const * papszConfigOptions);
67char CPL_DLL** CPLGetThreadLocalConfigOptions(void);
68void 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/* -------------------------------------------------------------------- */
74void CPL_DLL *CPLMalloc( size_t ) CPL_WARN_UNUSED_RESULT;
75void CPL_DLL *CPLCalloc( size_t, size_t ) CPL_WARN_UNUSED_RESULT;
76void CPL_DLL *CPLRealloc( void *, size_t ) CPL_WARN_UNUSED_RESULT;
77char CPL_DLL *CPLStrdup( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
78char 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/* -------------------------------------------------------------------- */
86char CPL_DLL *CPLFGets( char *, int, FILE *);
87const char CPL_DLL *CPLReadLine( FILE * );
88const char CPL_DLL *CPLReadLineL( VSILFILE * );
89const char CPL_DLL *CPLReadLine2L( VSILFILE *, int, CSLConstList );
90const 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/* -------------------------------------------------------------------- */
96double CPL_DLL CPLAtof(const char *);
97double CPL_DLL CPLAtofDelim(const char *, char);
98double CPL_DLL CPLStrtod(const char *, char **);
99double CPL_DLL CPLStrtodDelim(const char *, char **, char);
100float CPL_DLL CPLStrtof(const char *, char **);
101float 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/* -------------------------------------------------------------------- */
107double CPL_DLL CPLAtofM(const char *);
108
109/* -------------------------------------------------------------------- */
110/* Read a numeric value from an ASCII character string. */
111/* -------------------------------------------------------------------- */
112char CPL_DLL *CPLScanString( const char *, int, int, int );
113double CPL_DLL CPLScanDouble( const char *, int );
114long CPL_DLL CPLScanLong( const char *, int );
115unsigned long CPL_DLL CPLScanULong( const char *, int );
116GUIntBig CPL_DLL CPLScanUIntBig( const char *, int );
117GIntBig CPL_DLL CPLAtoGIntBig( const char* pszString );
118GIntBig CPL_DLL CPLAtoGIntBigEx( const char* pszString, int bWarn, int *pbOverflow );
119void CPL_DLL *CPLScanPointer( const char *, int );
120
121/* -------------------------------------------------------------------- */
122/* Print a value to an ASCII character string. */
123/* -------------------------------------------------------------------- */
124int CPL_DLL CPLPrintString( char *, const char *, int );
125int CPL_DLL CPLPrintStringFill( char *, const char *, int );
126int CPL_DLL CPLPrintInt32( char *, GInt32 , int );
127int CPL_DLL CPLPrintUIntBig( char *, GUIntBig , int );
128int CPL_DLL CPLPrintDouble( char *, const char *, double, const char * );
129int CPL_DLL CPLPrintTime( char *, int , const char *, const struct tm *,
130 const char * );
131int CPL_DLL CPLPrintPointer( char *, void *, int );
132
133/* -------------------------------------------------------------------- */
134/* Fetch a function from DLL / so. */
135/* -------------------------------------------------------------------- */
136
137void CPL_DLL *CPLGetSymbol( const char *, const char * );
138
139/* -------------------------------------------------------------------- */
140/* Fetch executable path. */
141/* -------------------------------------------------------------------- */
142int CPL_DLL CPLGetExecPath( char *pszPathBuf, int nMaxLength );
143
144/* -------------------------------------------------------------------- */
145/* Filename handling functions. */
146/* -------------------------------------------------------------------- */
147const char CPL_DLL *CPLGetPath( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
148const char CPL_DLL *CPLGetDirname( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
149const char CPL_DLL *CPLGetFilename( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
150const char CPL_DLL *CPLGetBasename( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
151const char CPL_DLL *CPLGetExtension( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
152char CPL_DLL *CPLGetCurrentDir(void);
153const char CPL_DLL *CPLFormFilename( const char *pszPath,
154 const char *pszBasename,
155 const char *pszExtension ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
156const char CPL_DLL *CPLFormCIFilename( const char *pszPath,
157 const char *pszBasename,
158 const char *pszExtension ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
159const char CPL_DLL *CPLResetExtension( const char *, const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
160const char CPL_DLL *CPLProjectRelativeFilename( const char *pszProjectDir,
161 const char *pszSecondaryFilename ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
162int CPL_DLL CPLIsFilenameRelative( const char *pszFilename );
163const char CPL_DLL *CPLExtractRelativePath(const char *, const char *, int *) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
164const char CPL_DLL *CPLCleanTrailingSlash( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
165char CPL_DLL **CPLCorrespondingPaths( const char *pszOldFilename,
166 const char *pszNewFilename,
167 char **papszFileList ) CPL_WARN_UNUSED_RESULT;
168int CPL_DLL CPLCheckForFile( char *pszFilename, char **papszSiblingList );
169
170const char CPL_DLL *CPLGenerateTempFilename( const char *pszStem ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
171const char CPL_DLL *CPLExpandTilde( const char *pszFilename ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
172const char CPL_DLL *CPLGetHomeDir(void) CPL_WARN_UNUSED_RESULT;
173
174/* -------------------------------------------------------------------- */
175/* Find File Function */
176/* -------------------------------------------------------------------- */
177
179typedef const char *(*CPLFileFinder)(const char *, const char *);
180
181const char CPL_DLL *CPLFindFile(const char *pszClass,
182 const char *pszBasename);
183const char CPL_DLL *CPLDefaultFindFile(const char *pszClass,
184 const char *pszBasename);
185void CPL_DLL CPLPushFileFinder( CPLFileFinder pfnFinder );
186CPLFileFinder CPL_DLL CPLPopFileFinder(void);
187void CPL_DLL CPLPushFinderLocation( const char * );
188void CPL_DLL CPLPopFinderLocation(void);
189void CPL_DLL CPLFinderClean(void);
190
191/* -------------------------------------------------------------------- */
192/* Safe version of stat() that works properly on stuff like "C:". */
193/* -------------------------------------------------------------------- */
194int 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
202typedef struct {
203 FILE *fp;
205 int bLarge;
207 char *pszAccess;
209
210FILE CPL_DLL *CPLOpenShared( const char *, const char *, int );
211void CPL_DLL CPLCloseShared( FILE * );
212CPLSharedFileInfo CPL_DLL *CPLGetSharedList( int * );
213void CPL_DLL CPLDumpSharedList( FILE * );
215void CPL_DLL CPLCleanupSharedFileMutex( void );
218/* -------------------------------------------------------------------- */
219/* DMS to Dec to DMS conversion. */
220/* -------------------------------------------------------------------- */
221double CPL_DLL CPLDMSToDec( const char *is );
222const char CPL_DLL *CPLDecToDMS( double dfAngle, const char * pszAxis,
223 int nPrecision );
224double CPL_DLL CPLPackedDMSToDec( double );
225double CPL_DLL CPLDecToPackedDMS( double dfDec );
226
227void CPL_DLL CPLStringToComplex( const char *pszString,
228 double *pdfReal, double *pdfImag );
229
230/* -------------------------------------------------------------------- */
231/* Misc other functions. */
232/* -------------------------------------------------------------------- */
233int CPL_DLL CPLUnlinkTree( const char * );
234int CPL_DLL CPLCopyFile( const char *pszNewPath, const char *pszOldPath );
235int CPL_DLL CPLCopyTree( const char *pszNewPath, const char *pszOldPath );
236int CPL_DLL CPLMoveFile( const char *pszNewPath, const char *pszOldPath );
237int CPL_DLL CPLSymlink( const char* pszOldPath, const char* pszNewPath, CSLConstList papszOptions );
238
239/* -------------------------------------------------------------------- */
240/* ZIP Creation. */
241/* -------------------------------------------------------------------- */
242
244#define CPL_ZIP_API_OFFERED
246void CPL_DLL *CPLCreateZip( const char *pszZipFilename, char **papszOptions );
247CPLErr CPL_DLL CPLCreateFileInZip( void *hZip, const char *pszFilename,
248 char **papszOptions );
249CPLErr CPL_DLL CPLWriteFileInZip( void *hZip, const void *pBuffer, int nBufferSize );
250CPLErr CPL_DLL CPLCloseFileInZip( void *hZip );
251CPLErr CPL_DLL CPLCloseZip( void *hZip );
252
253/* -------------------------------------------------------------------- */
254/* ZLib compression */
255/* -------------------------------------------------------------------- */
256
257void CPL_DLL *CPLZLibDeflate( const void* ptr, size_t nBytes, int nLevel,
258 void* outptr, size_t nOutAvailableBytes,
259 size_t* pnOutBytes );
260void 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/* -------------------------------------------------------------------- */
267int CPL_DLL CPLValidateXML(const char* pszXMLFilename,
268 const char* pszXSDFilename,
269 CSLConstList papszOptions);
270
271/* -------------------------------------------------------------------- */
272/* Locale handling. Prevents parallel executions of setlocale(). */
273/* -------------------------------------------------------------------- */
274char* CPLsetlocale (int category, const char* locale);
276void CPLCleanupSetlocaleMutex(void);
284int CPL_DLL CPLIsPowerOfTwo( unsigned int i );
285
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
295extern "C++"
296{
297class CPL_DLL CPLLocaleC
298{
299public:
300 CPLLocaleC();
301 ~CPLLocaleC();
302
303 /* Make it non-copyable */
304 CPLLocaleC(const CPLLocaleC&) = delete;
305 CPLLocaleC& operator=(const CPLLocaleC&) = delete;
306
307private:
308 char *pszOldLocale;
309};
310
311// Does the same as CPLLocaleC except that, when available, it tries to
312// only affect the current thread. But code that would be dependent of
313// setlocale(LC_NUMERIC, NULL) returning "C", such as current proj.4 versions,
314// will not work depending on the actual implementation
315class CPLThreadLocaleCPrivate;
316class CPL_DLL CPLThreadLocaleC
317{
318public:
319 CPLThreadLocaleC();
320 ~CPLThreadLocaleC();
321
322 /* Make it non-copyable */
323 CPLThreadLocaleC(const CPLThreadLocaleC&) = delete;
324 CPLThreadLocaleC& operator=(const CPLThreadLocaleC&) = delete;
325
326private:
327 CPLThreadLocaleCPrivate* m_private;
328};
329}
330
331#endif /* def __cplusplus */
333
334
335
336/* -------------------------------------------------------------------- */
337/* C++ object for temporarily forcing a config option */
338/* -------------------------------------------------------------------- */
339
341#if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
342
343extern "C++"
344{
345class CPL_DLL CPLConfigOptionSetter
346{
347public:
348 CPLConfigOptionSetter(const char* pszKey, const char* pszValue,
349 bool bSetOnlyIfUndefined);
350 ~CPLConfigOptionSetter();
351
352 /* Make it non-copyable */
353 CPLConfigOptionSetter(const CPLConfigOptionSetter&) = delete;
354 CPLConfigOptionSetter& operator=(const CPLConfigOptionSetter&) = delete;
355
356private:
357 char* m_pszKey;
358 char *m_pszOldValue;
359 bool m_bRestoreOldValue;
360};
361}
362
363#endif /* def __cplusplus */
365
366#if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
367
368extern "C++"
369{
370
371#ifndef DOXYGEN_SKIP
372#include <type_traits> // for std::is_base_of
373#endif
374
375namespace cpl
376{
386 template<typename To, typename From> inline To down_cast(From* f)
387 {
388 static_assert(
389 (std::is_base_of<From,
390 typename std::remove_pointer<To>::type>::value),
391 "target type not derived from source type");
392 CPLAssert(f == nullptr || dynamic_cast<To>(f) != nullptr);
393 return static_cast<To>(f);
394 }
395}
396} // extern "C++"
397
398#endif /* def __cplusplus */
399
400#endif /* ndef CPL_CONV_H_INCLUDED */
const char * CPLGetHomeDir(void)
Definition: cpl_path.cpp:1166
const char * CPLExpandTilde(const char *pszFilename)
Definition: cpl_path.cpp:1138
void * CPLCreateZip(const char *pszZipFilename, char **papszOptions)
Definition: cpl_conv.cpp:3081
double CPLAtofDelim(const char *, char)
Definition: cpl_strtod.cpp:73
int CPLPrintStringFill(char *, const char *, int)
Definition: cpl_conv.cpp:1265
void * CPLGetSymbol(const char *, const char *)
Definition: cplgetsymbol.cpp:89
int CPLIsFilenameRelative(const char *pszFilename)
Definition: cpl_path.cpp:806
const char * CPLReadLine2L(VSILFILE *, int, CSLConstList)
Definition: cpl_conv.cpp:652
int CPLPrintUIntBig(char *, GUIntBig, int)
Definition: cpl_conv.cpp:1348
int CPLCopyTree(const char *pszNewPath, const char *pszOldPath)
Definition: cpl_conv.cpp:2704
void CPLCloseShared(FILE *)
Definition: cpl_conv.cpp:2406
float CPLStrtof(const char *, char **)
Definition: cpl_strtod.cpp:397
char * CPLsetlocale(int category, const char *locale)
Definition: cpl_conv.cpp:2982
const char * CPLReadLine3L(VSILFILE *, int, int *, CSLConstList)
Definition: cpl_conv.cpp:682
double CPLStrtod(const char *, char **)
Definition: cpl_strtod.cpp:321
const char * CPLGetExtension(const char *)
Definition: cpl_path.cpp:345
int CPLMoveFile(const char *pszNewPath, const char *pszOldPath)
Definition: cpl_conv.cpp:2782
char ** CPLGetThreadLocalConfigOptions(void)
Definition: cpl_conv.cpp:1920
int CPLPrintInt32(char *, GInt32, int)
Definition: cpl_conv.cpp:1309
long CPLScanLong(const char *, int)
Definition: cpl_conv.cpp:906
void CPLSetConfigOptions(const char *const *papszConfigOptions)
Definition: cpl_conv.cpp:1763
void * CPLRealloc(void *, size_t)
Definition: cpl_conv.cpp:225
float CPLStrtofDelim(const char *, char **, char)
Definition: cpl_strtod.cpp:347
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:3106
int CPLSymlink(const char *pszOldPath, const char *pszNewPath, CSLConstList papszOptions)
Definition: cpl_conv.cpp:2803
const char * CPLGetBasename(const char *)
Definition: cpl_path.cpp:292
void * CPLMalloc(size_t)
Definition: cpl_conv.cpp:168
const char * CPLGetDirname(const char *)
Definition: cpl_path.cpp:208
int CPLGetExecPath(char *pszPathBuf, int nMaxLength)
Definition: cpl_getexecpath.cpp:132
const char * CPLFormCIFilename(const char *pszPath, const char *pszBasename, const char *pszExtension)
Definition: cpl_path.cpp:651
char * CPLScanString(const char *, int, int, int)
Definition: cpl_conv.cpp:846
int CPLPrintTime(char *, int, const char *, const struct tm *, const char *)
Definition: cpl_conv.cpp:1500
void CPLFinderClean(void)
Definition: cpl_findfile.cpp:134
void * CPLCalloc(size_t, size_t)
Definition: cpl_conv.cpp:138
GIntBig CPLAtoGIntBigEx(const char *pszString, int bWarn, int *pbOverflow)
Definition: cpl_conv.cpp:1048
void * CPLScanPointer(const char *, int)
Definition: cpl_conv.cpp:1103
const char * CPLGenerateTempFilename(const char *pszStem)
Definition: cpl_path.cpp:1095
const char * CPLGetPath(const char *)
Definition: cpl_path.cpp:153
char ** CPLCorrespondingPaths(const char *pszOldFilename, const char *pszNewFilename, char **papszFileList)
Definition: cpl_path.cpp:990
char * CPLStrdup(const char *)
Definition: cpl_conv.cpp:293
CPLErr CPLCreateFileInZip(void *hZip, const char *pszFilename, char **papszOptions)
Definition: cpl_conv.cpp:3089
char ** CPLGetConfigOptions(void)
Definition: cpl_conv.cpp:1737
double CPLDMSToDec(const char *is)
Definition: cpl_conv.cpp:2044
const char *(* CPLFileFinder)(const char *, const char *)
Definition: cpl_conv.h:179
const char * CPLCleanTrailingSlash(const char *)
Definition: cpl_path.cpp:939
const char * CPLReadLineL(VSILFILE *)
Definition: cpl_conv.cpp:630
const char * CPLReadLine(FILE *)
Definition: cpl_conv.cpp:566
CPLErr CPLCloseZip(void *hZip)
Definition: cpl_conv.cpp:3095
const char * CPLResetExtension(const char *, const char *)
Definition: cpl_path.cpp:431
FILE * CPLOpenShared(const char *, const char *, int)
Definition: cpl_conv.cpp:2333
void CPLPushFinderLocation(const char *)
Definition: cpl_findfile.cpp:246
char * CPLGetCurrentDir(void)
Definition: cpl_path.cpp:396
void CPLPushFileFinder(CPLFileFinder pfnFinder)
Definition: cpl_findfile.cpp:200
int CPLStat(const char *, VSIStatBuf *)
Definition: cpl_conv.cpp:1995
double CPLDecToPackedDMS(double dfDec)
Definition: cpl_conv.cpp:2254
const char * CPLExtractRelativePath(const char *, const char *, int *)
Definition: cpl_path.cpp:847
const char * CPLGetThreadLocalConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1778
void CPLPopFinderLocation(void)
Definition: cpl_findfile.cpp:285
double CPLAtofM(const char *)
Definition: cpl_strtod.cpp:142
void CPLSetConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1830
char * CPLFGets(char *, int, FILE *)
Definition: cpl_conv.cpp:364
GIntBig CPLAtoGIntBig(const char *pszString)
Definition: cpl_conv.cpp:996
double CPLPackedDMSToDec(double)
Definition: cpl_conv.cpp:2220
void CPLDumpSharedList(FILE *)
Definition: cpl_conv.cpp:2519
int CPLUnlinkTree(const char *)
Definition: cpl_conv.cpp:2557
const char * CPLProjectRelativeFilename(const char *pszProjectDir, const char *pszSecondaryFilename)
Definition: cpl_path.cpp:744
GUIntBig CPLScanUIntBig(const char *, int)
Definition: cpl_conv.cpp:964
const char * CPLDecToDMS(double dfAngle, const char *pszAxis, int nPrecision)
Definition: cpl_conv.cpp:2127
const char * CPLFindFile(const char *pszClass, const char *pszBasename)
Definition: cpl_findfile.cpp:177
double CPLScanDouble(const char *, int)
Definition: cpl_conv.cpp:1169
int CPLIsPowerOfTwo(unsigned int i)
Definition: cpl_conv.cpp:3008
const char * CPLGetConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1690
unsigned long CPLScanULong(const char *, int)
Definition: cpl_conv.cpp:934
void CPLSetThreadLocalConfigOption(const char *pszKey, const char *pszValue)
Definition: cpl_conv.cpp:1883
double CPLStrtodDelim(const char *, char **, char)
Definition: cpl_strtod.cpp:231
To down_cast(From *f)
Definition: cpl_conv.h:386
const char * CPLGetFilename(const char *)
Definition: cpl_path.cpp:260
char * CPLStrlwr(char *)
Definition: cpl_conv.cpp:319
int CPLCopyFile(const char *pszNewPath, const char *pszOldPath)
Definition: cpl_conv.cpp:2642
const char * CPLFormFilename(const char *pszPath, const char *pszBasename, const char *pszExtension)
Definition: cpl_path.cpp:535
int CPLPrintDouble(char *, const char *, double, const char *)
Definition: cpl_conv.cpp:1442
int CPLPrintString(char *, const char *, int)
Definition: cpl_conv.cpp:1221
CPLErr CPLCloseFileInZip(void *hZip)
Definition: cpl_conv.cpp:3093
const char * CPLDefaultFindFile(const char *pszClass, const char *pszBasename)
Definition: cpl_findfile.cpp:149
CPLErr CPLWriteFileInZip(void *hZip, const void *pBuffer, int nBufferSize)
Definition: cpl_conv.cpp:3091
CPLFileFinder CPLPopFileFinder(void)
Definition: cpl_findfile.cpp:235
int CPLPrintPointer(char *, void *, int)
Definition: cpl_conv.cpp:1398
void CPLStringToComplex(const char *pszString, double *pdfReal, double *pdfImag)
Definition: cpl_conv.cpp:2271
void CPLSetThreadLocalConfigOptions(const char *const *papszConfigOptions)
Definition: cpl_conv.cpp:1950
int CPLCheckForFile(char *pszFilename, char **papszSiblingList)
Definition: cpl_conv.cpp:3043
CPLSharedFileInfo * CPLGetSharedList(int *)
Definition: cpl_conv.cpp:2497
double CPLAtof(const char *)
Definition: cpl_strtod.cpp:117
#define CPLAssert(expr)
Definition: cpl_error.h:182
CPLErr
Definition: cpl_error.h:53
unsigned long long GUIntBig
Definition: cpl_port.h:249
#define CPL_C_END
Definition: cpl_port.h:337
#define CPL_C_START
Definition: cpl_port.h:335
#define CPL_RETURNS_NONNULL
Definition: cpl_port.h:962
char ** CSLConstList
Definition: cpl_port.h:1184
#define CPL_WARN_UNUSED_RESULT
Definition: cpl_port.h:929
int GInt32
Definition: cpl_port.h:203
long long GIntBig
Definition: cpl_port.h:246
FILE VSILFILE
Definition: cpl_vsi.h:155
Definition: cpl_conv.h:202
char * pszAccess
Definition: cpl_conv.h:207
FILE * fp
Definition: cpl_conv.h:203
int nRefCount
Definition: cpl_conv.h:204
char * pszFilename
Definition: cpl_conv.h:206
int bLarge
Definition: cpl_conv.h:205

Generated for GDAL by doxygen 1.9.3.