32 #ifndef CPL_CONV_H_INCLUDED
33 #define CPL_CONV_H_INCLUDED
51 void CPL_DLL CPLVerifyConfiguration(
void);
53 const char CPL_DLL * CPL_STDCALL
57 const
char *pszValue );
58 void CPL_DLL CPL_STDCALL CPLFreeConfig(
void);
64 void CPL_DLL *
CPLMalloc(
size_t ) CPL_WARN_UNUSED_RESULT;
65 void CPL_DLL *
CPLCalloc(
size_t,
size_t ) CPL_WARN_UNUSED_RESULT;
66 void CPL_DLL *
CPLRealloc(
void *,
size_t ) CPL_WARN_UNUSED_RESULT;
67 char CPL_DLL *
CPLStrdup( const
char * ) CPL_WARN_UNUSED_RESULT;
70 #define CPLFree VSIFree
75 char CPL_DLL *
CPLFGets(
char *,
int, FILE *);
78 const char CPL_DLL *
CPLReadLine2L( VSILFILE * ,
int nMaxCols,
char** papszOptions);
84 double CPL_DLL
CPLAtof(
const char *);
86 double CPL_DLL
CPLStrtod(
const char *,
char **);
88 float CPL_DLL
CPLStrtof(
const char *,
char **);
95 double CPL_DLL
CPLAtofM(
const char *);
103 unsigned long CPL_DLL
CPLScanULong(
const char *,
int );
114 int CPL_DLL
CPLPrintDouble(
char *,
const char *,
double,
const char * );
115 int CPL_DLL
CPLPrintTime(
char *,
int ,
const char *,
const struct tm *,
123 void CPL_DLL *
CPLGetSymbol(
const char *,
const char * );
128 int CPL_DLL CPLGetExecPath(
char *pszPathBuf,
int nMaxLength );
133 const char CPL_DLL *
CPLGetPath(
const char * );
140 const char *pszBasename,
141 const char *pszExtension );
143 const char *pszBasename,
144 const char *pszExtension );
147 const char *pszSecondaryFilename );
152 const char *pszNewFilename,
153 char **papszFileList );
154 int CPL_DLL
CPLCheckForFile(
char *pszFilename,
char **papszSiblingList );
161 typedef const char *(*CPLFileFinder)(
const char *,
const char *);
163 const char CPL_DLL *CPLFindFile(
const char *pszClass,
164 const char *pszBasename);
165 const char CPL_DLL *CPLDefaultFindFile(
const char *pszClass,
166 const char *pszBasename);
167 void CPL_DLL CPLPushFileFinder( CPLFileFinder pfnFinder );
168 CPLFileFinder CPL_DLL CPLPopFileFinder(
void);
169 void CPL_DLL CPLPushFinderLocation(
const char * );
170 void CPL_DLL CPLPopFinderLocation(
void);
171 void CPL_DLL CPLFinderClean(
void);
176 int CPL_DLL CPLStat(
const char *, VSIStatBuf * );
190 FILE CPL_DLL *
CPLOpenShared(
const char *,
const char *,
int );
194 void CPL_DLL CPLCleanupSharedFileMutex(
void );
199 double CPL_DLL CPLDMSToDec(
const char *is );
200 const char CPL_DLL *CPLDecToDMS(
double dfAngle,
const char * pszAxis,
205 void CPL_DLL CPLStringToComplex(
const char *pszString,
206 double *pdfReal,
double *pdfImag );
212 int CPL_DLL CPLCopyFile(
const char *pszNewPath,
const char *pszOldPath );
213 int CPL_DLL CPLMoveFile(
const char *pszNewPath,
const char *pszOldPath );
218 #define CPL_ZIP_API_OFFERED
219 void CPL_DLL *CPLCreateZip(
const char *pszZipFilename,
char **papszOptions );
220 CPLErr CPL_DLL CPLCreateFileInZip(
void *hZip,
const char *pszFilename,
221 char **papszOptions );
222 CPLErr CPL_DLL CPLWriteFileInZip(
void *hZip,
const void *pBuffer,
int nBufferSize );
223 CPLErr CPL_DLL CPLCloseFileInZip(
void *hZip );
224 CPLErr CPL_DLL CPLCloseZip(
void *hZip );
230 void CPL_DLL *CPLZLibDeflate(
const void* ptr,
size_t nBytes,
int nLevel,
231 void* outptr,
size_t nOutAvailableBytes,
232 size_t* pnOutBytes );
234 void* outptr,
size_t nOutAvailableBytes,
235 size_t* pnOutBytes );
240 int CPL_DLL CPLValidateXML(
const char* pszXMLFilename,
241 const char* pszXSDFilename,
242 char** papszOptions);
248 void CPLCleanupSetlocaleMutex(
void);
256 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
258 class CPL_DLL CPLLocaleC
268 CPLLocaleC(CPLLocaleC&);
269 CPLLocaleC& operator=(CPLLocaleC&);
double CPL_DLL CPLAtofM(const char *)
Definition: cpl_strtod.cpp:162
double CPL_DLL CPLStrtod(const char *, char **)
Definition: cpl_strtod.cpp:319
int CPL_DLL CPLPrintString(char *, const char *, int)
Definition: cpl_conv.cpp:1065
GUIntBig CPL_DLL CPLScanUIntBig(const char *, int)
Definition: cpl_conv.cpp:904
const char CPL_DLL * CPLProjectRelativeFilename(const char *pszProjectDir, const char *pszSecondaryFilename)
Definition: cpl_path.cpp:629
int CPL_DLL CPLPrintInt32(char *, GInt32, int)
Definition: cpl_conv.cpp:1154
int CPL_DLL CPLPrintTime(char *, int, const char *, const struct tm *, const char *)
Definition: cpl_conv.cpp:1374
const char CPL_DLL * CPLGetPath(const char *)
Definition: cpl_path.cpp:129
const char CPL_DLL * CPLFormCIFilename(const char *pszPath, const char *pszBasename, const char *pszExtension)
Definition: cpl_path.cpp:534
unsigned long CPL_DLL CPLScanULong(const char *, int)
Definition: cpl_conv.cpp:864
const char CPL_DLL * CPLGetDirname(const char *)
Definition: cpl_path.cpp:182
CPLSharedFileInfo CPL_DLL * CPLGetSharedList(int *)
Definition: cpl_conv.cpp:2182
char * CPLsetlocale(int category, const char *locale)
Definition: cpl_conv.cpp:2468
const char CPL_DLL * CPLGetBasename(const char *)
Definition: cpl_path.cpp:263
const char CPL_DLL * CPLReadLine(FILE *)
Definition: cpl_conv.cpp:518
double CPL_DLL CPLDecToPackedDMS(double dfDec)
Definition: cpl_conv.cpp:1949
int CPL_DLL CPLPrintDouble(char *, const char *, double, const char *)
Definition: cpl_conv.cpp:1284
double CPL_DLL CPLScanDouble(const char *, int)
Definition: cpl_conv.cpp:1018
void CPL_DLL CPL_STDCALL CPLSetThreadLocalConfigOption(const char *pszKey, const char *pszValue)
Definition: cpl_conv.cpp:1654
char CPL_DLL * CPLStrdup(const char *) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:247
double CPL_DLL CPLAtofDelim(const char *, char)
Definition: cpl_strtod.cpp:95
const char CPL_DLL * CPLReadLineL(VSILFILE *)
Definition: cpl_conv.cpp:583
char CPL_DLL * CPLStrlwr(char *)
Definition: cpl_conv.cpp:282
const char CPL_DLL * CPLFormFilename(const char *pszPath, const char *pszBasename, const char *pszExtension)
Definition: cpl_path.cpp:460
void CPL_DLL CPL_STDCALL CPLSetConfigOption(const char *, const char *)
Definition: cpl_conv.cpp:1609
FILE CPL_DLL * CPLOpenShared(const char *, const char *, int)
Definition: cpl_conv.cpp:2027
const char CPL_DLL * CPLGenerateTempFilename(const char *pszStem)
Definition: cpl_path.cpp:979
char CPL_DLL * CPLScanString(const char *, int, int, int)
Definition: cpl_conv.cpp:769
const char CPL_DLL * CPLReadLine2L(VSILFILE *, int nMaxCols, char **papszOptions)
Definition: cpl_conv.cpp:608
Definition: cpl_conv.h:182
char CPL_DLL * CPLFGets(char *, int, FILE *)
Definition: cpl_conv.cpp:323
char CPL_DLL * CPLGetCurrentDir(void)
Definition: cpl_path.cpp:348
void CPL_DLL * CPLMalloc(size_t) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:118
int CPL_DLL CPLPrintUIntBig(char *, GUIntBig, int)
Definition: cpl_conv.cpp:1193
const char CPL_DLL * CPLGetExtension(const char *)
Definition: cpl_path.cpp:313
double CPL_DLL CPLAtof(const char *)
Definition: cpl_strtod.cpp:137
int CPL_DLL CPLPrintPointer(char *, void *, int)
Definition: cpl_conv.cpp:1235
int CPL_DLL CPLPrintStringFill(char *, const char *, int)
Definition: cpl_conv.cpp:1109
char CPL_DLL ** CPLCorrespondingPaths(const char *pszOldFilename, const char *pszNewFilename, char **papszFileList)
Definition: cpl_path.cpp:869
void CPL_DLL CPLDumpSharedList(FILE *)
Definition: cpl_conv.cpp:2204
const char CPL_DLL *CPL_STDCALL CPLGetConfigOption(const char *, const char *) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:1547
void CPL_DLL * CPLRealloc(void *, size_t) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:181
const char CPL_DLL * CPLExtractRelativePath(const char *, const char *, int *)
Definition: cpl_path.cpp:726
const char CPL_DLL * CPLGetFilename(const char *)
Definition: cpl_path.cpp:231
float CPL_DLL CPLStrtofDelim(const char *, char **, char)
Definition: cpl_strtod.cpp:345
const char CPL_DLL * CPLCleanTrailingSlash(const char *)
Definition: cpl_path.cpp:820
float CPL_DLL CPLStrtof(const char *, char **)
Definition: cpl_strtod.cpp:400
long CPL_DLL CPLScanLong(const char *, int)
Definition: cpl_conv.cpp:825
double CPL_DLL CPLStrtodDelim(const char *, char **, char)
Definition: cpl_strtod.cpp:247
int CPL_DLL CPLUnlinkTree(const char *)
Definition: cpl_conv.cpp:2243
int CPL_DLL CPLCheckForFile(char *pszFilename, char **papszSiblingList)
Definition: cpl_conv.cpp:2513
void CPL_DLL * CPLCalloc(size_t, size_t) CPL_WARN_UNUSED_RESULT
Definition: cpl_conv.cpp:86
void CPL_DLL * CPLScanPointer(const char *, int)
Definition: cpl_conv.cpp:950
void CPL_DLL CPLCloseShared(FILE *)
Definition: cpl_conv.cpp:2102
double CPL_DLL CPLPackedDMSToDec(double)
Definition: cpl_conv.cpp:1913
const char CPL_DLL * CPLResetExtension(const char *, const char *)
Definition: cpl_path.cpp:388
void CPL_DLL * 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:2594
int CPL_DLL CPLIsFilenameRelative(const char *pszFilename)
Definition: cpl_path.cpp:686
void CPL_DLL * CPLGetSymbol(const char *, const char *)
Definition: cplgetsymbol.cpp:84