41 #include <cpl_string.h>
48 #if defined(WIN32) || defined(WIN32CE)
49 # define EQUALN(a,b,n) (strnicmp(a,b,n)==0)
50 # define EQUAL(a,b) (stricmp(a,b)==0)
52 # define EQUALN(a,b,n) (strncasecmp(a,b,n)==0)
53 # define EQUAL(a,b) (strcasecmp(a,b)==0)
69 #define DELIMITER "\\"
104 string ms_CGIContent;
117 return ms_CGIContent;
135 vector<string> strings;
138 StringList(
const string& sstrings,
const char delimiter);
139 StringList(
const string& sstrings,
const string& delimiters);
142 int indexof(
string qstr);
146 strings.push_back(newstr);
156 return strings.size();
159 string& operator [](
int index)
161 return strings[index];
165 void append(
const string sstrings,
const char delimiter);
166 void append(
const string sstrings,
const string& delimiters);
171 for (
int i = 0; i < size(); i++)
179 for (
int i = 0; i < size(); i++)
180 s += strings[i] + delimiter;
187 for (
int i = 0; i < size(); i++)
188 s += strings[i] + delimiters;
202 s.copy(buf, string::npos);
243 KVP(
string namevaluepair);
267 KVPsReader(
const string& urlStr,
const char &tok);
269 KVP& operator [](
const int index)
271 return m_kvps[index];
276 return m_kvps.size();
279 string getValue(
const string &keyname);
280 string getValue(
const string &keyname,
const string &defaultvalue);
281 vector<string> getValues(
const string &keyname);
297 KVP& operator [](
const int index)
307 string getValue(
const string &keyname);
308 string getValue(
const string &keyname,
const string &defaultvalue);
319 static void Exchange(T & a, T & b)
328 static string convertToString(T &value)
332 string rtnstr = ss.str();
337 static void convertFromString(T &value,
const string& s)
350 int CPL_DLL CPL_STDCALL
CsvburstCpp(
const std::string& line, std::vector<std::string> &strSet,
const char tok);
351 int CPL_DLL CPL_STDCALL
CsvburstComplexCpp(
const string& line, vector<string> &strSet,
const char* tok);
353 void CPL_DLL CPL_STDCALL
Strslip(
const char* str,
const char* arrStr[],
const char leftdlm,
const char rightdlm);
354 string CPL_DLL CPL_STDCALL
StrReplace(
string& str,
const string oldSubStr,
const string newStr);
355 string CPL_DLL CPL_STDCALL
SPrintArray(GDALDataType eDataType,
const void *paDataArray,
int nValues,
const char *pszDelimiter);
356 string CPL_DLL CPL_STDCALL
StrTrimHead(
const string &str);
357 string CPL_DLL CPL_STDCALL
StrTrimTail(
const string &str);
358 string CPL_DLL CPL_STDCALL
StrTrims(
const std::string&,
const char*);
359 string CPL_DLL CPL_STDCALL
StrTrim(
const string &str);
367 CPLErr CPL_DLL CPL_STDCALL
GetFileNameList(
char* dir, std::vector<string> &strList);
368 string CPL_DLL CPL_STDCALL
MakeTempFile(
string dir,
string covID,
string suffix);
369 string CPL_DLL CPL_STDCALL
GetUUID();
372 void CPL_DLL CPL_STDCALL
GetSubSetTime(
const string& subsetstr, vector<string> &subsetvalue);
373 string CPL_DLL CPL_STDCALL
GetSubSetLatLon(
const string& subsetstr, vector<double> &subsetvalue);
374 string CPL_DLL CPL_STDCALL
GetSingleValue(
const string& subsetstr);
376 CPLErr CPL_DLL CPL_STDCALL
GetTRMMBandList(
string start,
string end, std::vector<int> &bandList);
int CPL_DLL CPL_STDCALL CompareDateTime_GreaterThan(string time1, string time2)
CPLErr CPL_DLL CPL_STDCALL GetFileNameList(char *dir, std::vector< string > &strList)
string CPL_DLL CPL_STDCALL StrTrims(const std::string &, const char *)
void CPL_DLL CPL_STDCALL Strslip(const char *str, const char *arrStr[], const char leftdlm, const char rightdlm)
WCSCGI class is used to acquire WCS request, both GET and POST method are supported.
string toString(const char delimiter)
void CPL_DLL CPL_STDCALL GetSubSetTime(const string &subsetstr, vector< string > &subsetvalue)
string CPL_DLL CPL_STDCALL MakeTempFile(string dir, string covID, string suffix)
int CPL_DLL CPL_STDCALL ConvertDateTimeToSeconds(string datetime)
CGI_METHOD_FLAG GetCGImethod()
string CPL_DLL CPL_STDCALL SPrintArray(GDALDataType eDataType, const void *paDataArray, int nValues, const char *pszDelimiter)
string CPL_DLL CPL_STDCALL StrTrim(const string &str)
int CPL_DLL CPL_STDCALL CsvburstComplexCpp(const string &line, vector< string > &strSet, const char *tok)
string CPL_DLL CPL_STDCALL GetTimeString(int code)
void CPL_DLL CPL_STDCALL GetCornerPoints(const GDAL_GCP *&pGCPList, const int &nGCPs, My2DPoint &lowLeft, My2DPoint &upRight)
CPL_C_START int CPL_DLL CPL_STDCALL CsvburstCpp(const std::string &line, std::vector< std::string > &strSet, const char tok)
string CPL_DLL CPL_STDCALL StrReplace(string &str, const string oldSubStr, const string newStr)
string toString(const string &delimiters)
string CPL_DLL CPL_STDCALL GetSubSetLatLon(const string &subsetstr, vector< double > &subsetvalue)
string CPL_DLL CPL_STDCALL StrTrimHead(const string &str)
My2DPoint class is used to store the point coordinates.
string CPL_DLL CPL_STDCALL GetUUID()
string CPL_DLL CPL_STDCALL StrTrimTail(const string &str)
int CPL_DLL CPL_STDCALL Find_Compare_SubStr(string line, string sub)
string CPL_DLL CPL_STDCALL GetSingleValue(const string &subsetstr)
CPLErr CPL_DLL CPL_STDCALL GetTRMMBandList(string start, string end, std::vector< int > &bandList)