📄 cplconv.h
字号:
#ifndef CPL_CONV_H_INCLUDED#define CPL_CONV_H_INCLUDED#include "CplPort.h"#include "CplVsi.h"#include "CplError.h"/** * \file cpl_conv.h * * Various convenience functions for CPL. * *//* -------------------------------------------------------------------- *//* Runtime check of various configuration items. *//* -------------------------------------------------------------------- */CPL_C_STARTvoid CPL_DLL CPLVerifyConfiguration();const char CPL_DLL *CPLGetConfigOption( const char *, const char * );void CPL_DLL CPLSetConfigOption( const char *, const char * );void CPL_DLL CPLFreeConfig();/* -------------------------------------------------------------------- *//* Safe malloc() API. Thin cover over VSI functions with fatal *//* error reporting if memory allocation fails. *//* -------------------------------------------------------------------- */void CPL_DLL *CPLMalloc( size_t );void CPL_DLL *CPLCalloc( size_t, size_t );void CPL_DLL *CPLRealloc( void *, size_t );char CPL_DLL *CPLStrdup( const char * );#define CPLFree VSIFree/* -------------------------------------------------------------------- *//* Read a line from a text file, and strip of CR/LF. *//* -------------------------------------------------------------------- */char CPL_DLL *CPLFGets( char *, int, FILE *);const char CPL_DLL *CPLReadLine( FILE * );/* -------------------------------------------------------------------- *//* Read a numeric value from an ASCII character string. *//* -------------------------------------------------------------------- */char CPL_DLL *CPLScanString( char *, int, int, int );double CPL_DLL CPLScanDouble( char *, int, char * );long CPL_DLL CPLScanLong( char *, int );/* -------------------------------------------------------------------- *//* Print a value to an ASCII character string. *//* -------------------------------------------------------------------- */char CPL_DLL *CPLPrintString( char *, const char *, int );char CPL_DLL *CPLPrintStringFill( char *, const char *, int );char CPL_DLL *CPLPrintInt32( char *, GInt32 , int );char CPL_DLL *CPLPrintUIntBig( char *, GUIntBig , int );char CPL_DLL *CPLPrintDouble( char *, const char *, double, char * );char CPL_DLL *CPLPrintTime( char *, int , const char *, const struct tm *, char * );/* -------------------------------------------------------------------- *//* Fetch a function from DLL / so. *//* -------------------------------------------------------------------- */void CPL_DLL *CPLGetSymbol( const char *, const char * );/* -------------------------------------------------------------------- *//* Read a directory (cpl_dir.c) *//* -------------------------------------------------------------------- */char CPL_DLL **CPLReadDir( const char *pszPath );/* -------------------------------------------------------------------- *//* Filename handling functions. *//* -------------------------------------------------------------------- */const char CPL_DLL *CPLGetPath( const char * );const char CPL_DLL *CPLGetDirname( const char * );const char CPL_DLL *CPLGetFilename( const char * );const char CPL_DLL *CPLGetBasename( const char * );const char CPL_DLL *CPLGetExtension( const char * );const char CPL_DLL *CPLFormFilename( const char *pszPath, const char *pszBasename, const char *pszExtension );const char CPL_DLL *CPLFormCIFilename( const char *pszPath, const char *pszBasename, const char *pszExtension );const char CPL_DLL *CPLResetExtension( const char *, const char * );const char CPL_DLL *CPLProjectRelativeFilename( const char *pszProjectDir, const char *pszSecondaryFilename );int CPL_DLL CPLIsFilenameRelative( const char *pszFilename );/* -------------------------------------------------------------------- *//* Find File Function *//* -------------------------------------------------------------------- */typedef const char *(*CPLFileFinder)(const char *, const char *);const char CPL_DLL *CPLFindFile(const char *pszClass, const char *pszBasename);const char CPL_DLL *CPLDefaultFindFile(const char *pszClass, const char *pszBasename);void CPL_DLL CPLPushFileFinder( CPLFileFinder pfnFinder );CPLFileFinder CPL_DLL CPLPopFileFinder();void CPL_DLL CPLPushFinderLocation( const char * );void CPL_DLL CPLPopFinderLocation();void CPL_DLL CPLFinderClean();/* -------------------------------------------------------------------- *//* Safe version of stat() that works properly on stuff like "C:". *//* -------------------------------------------------------------------- */int CPL_DLL CPLStat( const char *, VSIStatBuf * );/* -------------------------------------------------------------------- *//* DMS to Dec to DMS conversion. *//* -------------------------------------------------------------------- */double CPL_DLL CPLDMSToDec( const char *is );const char CPL_DLL *CPLDecToDMS( double dfAngle, const char * pszAxis, int nPrecision );double CPL_DLL CPLPackedDMSToDec( double );double CPL_DLL CPLDecToPackedDMS( double dfDec );void CPL_DLL CPLStringToComplex( const char *pszString, double *pdfReal, double *pdfImag );CPL_C_END#endif /* ndef CPL_CONV_H_INCLUDED */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -