00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef CPL_CONV_H_INCLUDED
00032 #define CPL_CONV_H_INCLUDED
00033
00034 #include "cpl_port.h"
00035 #include "cpl_vsi.h"
00036 #include "cpl_error.h"
00037
00045
00046
00047
00048 CPL_C_START
00049
00050 void CPL_DLL CPLVerifyConfiguration(void);
00051
00052 const char CPL_DLL * CPL_STDCALL
00053 CPLGetConfigOption( const char *, const char * );
00054 void CPL_DLL CPL_STDCALL CPLSetConfigOption( const char *, const char * );
00055 void CPL_DLL CPL_STDCALL CPLFreeConfig(void);
00056
00057
00058
00059
00060
00061 void CPL_DLL *CPLMalloc( size_t );
00062 void CPL_DLL *CPLCalloc( size_t, size_t );
00063 void CPL_DLL *CPLRealloc( void *, size_t );
00064 char CPL_DLL *CPLStrdup( const char * );
00065 char CPL_DLL *CPLStrlwr( char *);
00066
00067 #define CPLFree VSIFree
00068
00069
00070
00071
00072 char CPL_DLL *CPLFGets( char *, int, FILE *);
00073 const char CPL_DLL *CPLReadLine( FILE * );
00074 const char CPL_DLL *CPLReadLineL( FILE * );
00075
00076
00077
00078
00079
00080 double CPL_DLL CPLAtof(const char *);
00081 double CPL_DLL CPLAtofDelim(const char *, char);
00082 double CPL_DLL CPLStrtod(const char *, char **);
00083 double CPL_DLL CPLStrtodDelim(const char *, char **, char);
00084 float CPL_DLL CPLStrtof(const char *, char **);
00085 float CPL_DLL CPLStrtofDelim(const char *, char **, char);
00086
00087
00088
00089
00090
00091 double CPL_DLL CPLAtofM(const char *);
00092
00093
00094
00095
00096 char CPL_DLL *CPLScanString( const char *, int, int, int );
00097 double CPL_DLL CPLScanDouble( const char *, int );
00098 long CPL_DLL CPLScanLong( const char *, int );
00099 unsigned long CPL_DLL CPLScanULong( const char *, int );
00100 GUIntBig CPL_DLL CPLScanUIntBig( const char *, int );
00101 void CPL_DLL *CPLScanPointer( const char *, int );
00102
00103
00104
00105
00106 int CPL_DLL CPLPrintString( char *, const char *, int );
00107 int CPL_DLL CPLPrintStringFill( char *, const char *, int );
00108 int CPL_DLL CPLPrintInt32( char *, GInt32 , int );
00109 int CPL_DLL CPLPrintUIntBig( char *, GUIntBig , int );
00110 int CPL_DLL CPLPrintDouble( char *, const char *, double, const char * );
00111 int CPL_DLL CPLPrintTime( char *, int , const char *, const struct tm *,
00112 const char * );
00113 int CPL_DLL CPLPrintPointer( char *, void *, int );
00114
00115
00116
00117
00118
00119 void CPL_DLL *CPLGetSymbol( const char *, const char * );
00120
00121
00122
00123
00124 int CPL_DLL CPLGetExecPath( char *pszPathBuf, int nMaxLength );
00125
00126
00127
00128
00129 const char CPL_DLL *CPLGetPath( const char * );
00130 const char CPL_DLL *CPLGetDirname( const char * );
00131 const char CPL_DLL *CPLGetFilename( const char * );
00132 const char CPL_DLL *CPLGetBasename( const char * );
00133 const char CPL_DLL *CPLGetExtension( const char * );
00134 char CPL_DLL *CPLGetCurrentDir(void);
00135 const char CPL_DLL *CPLFormFilename( const char *pszPath,
00136 const char *pszBasename,
00137 const char *pszExtension );
00138 const char CPL_DLL *CPLFormCIFilename( const char *pszPath,
00139 const char *pszBasename,
00140 const char *pszExtension );
00141 const char CPL_DLL *CPLResetExtension( const char *, const char * );
00142 const char CPL_DLL *CPLProjectRelativeFilename( const char *pszProjectDir,
00143 const char *pszSecondaryFilename );
00144 int CPL_DLL CPLIsFilenameRelative( const char *pszFilename );
00145 const char CPL_DLL *CPLExtractRelativePath(const char *, const char *, int *);
00146 const char CPL_DLL *CPLCleanTrailingSlash( const char * );
00147 char CPL_DLL **CPLCorrespondingPaths( const char *pszOldFilename,
00148 const char *pszNewFilename,
00149 char **papszFileList );
00150 int CPL_DLL CPLCheckForFile( char *pszFilename, char **papszSiblingList );
00151
00152 const char CPL_DLL *CPLGenerateTempFilename( const char *pszStem );
00153
00154
00155
00156
00157 typedef const char *(*CPLFileFinder)(const char *, const char *);
00158
00159 const char CPL_DLL *CPLFindFile(const char *pszClass,
00160 const char *pszBasename);
00161 const char CPL_DLL *CPLDefaultFindFile(const char *pszClass,
00162 const char *pszBasename);
00163 void CPL_DLL CPLPushFileFinder( CPLFileFinder pfnFinder );
00164 CPLFileFinder CPL_DLL CPLPopFileFinder(void);
00165 void CPL_DLL CPLPushFinderLocation( const char * );
00166 void CPL_DLL CPLPopFinderLocation(void);
00167 void CPL_DLL CPLFinderClean(void);
00168
00169
00170
00171
00172 int CPL_DLL CPLStat( const char *, VSIStatBuf * );
00173
00174
00175
00176
00177
00178 typedef struct {
00179 FILE *fp;
00180 int nRefCount;
00181 int bLarge;
00182 char *pszFilename;
00183 char *pszAccess;
00184 } CPLSharedFileInfo;
00185
00186 FILE CPL_DLL *CPLOpenShared( const char *, const char *, int );
00187 void CPL_DLL CPLCloseShared( FILE * );
00188 CPLSharedFileInfo CPL_DLL *CPLGetSharedList( int * );
00189 void CPL_DLL CPLDumpSharedList( FILE * );
00190
00191
00192
00193
00194 double CPL_DLL CPLDMSToDec( const char *is );
00195 const char CPL_DLL *CPLDecToDMS( double dfAngle, const char * pszAxis,
00196 int nPrecision );
00197 double CPL_DLL CPLPackedDMSToDec( double );
00198 double CPL_DLL CPLDecToPackedDMS( double dfDec );
00199
00200 void CPL_DLL CPLStringToComplex( const char *pszString,
00201 double *pdfReal, double *pdfImag );
00202
00203
00204
00205
00206 int CPL_DLL CPLUnlinkTree( const char * );
00207 int CPL_DLL CPLCopyFile( const char *pszNewPath, const char *pszOldPath );
00208 int CPL_DLL CPLMoveFile( const char *pszNewPath, const char *pszOldPath );
00209
00210 CPL_C_END
00211
00212
00213
00214
00215
00216 #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
00217
00218 class CPLLocaleC
00219 {
00220 private:
00221 char *pszOldLocale;
00222
00223 public:
00224 CPLLocaleC();
00225 ~CPLLocaleC();
00226 };
00227
00228 #endif
00229
00230
00231 #endif