41 #include <cpl_string.h> 42 #include "wcs_error.h" 43 #include "BoundingBox.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 "\\" 74 const int SHORT_NAME_LEN = 128;
75 const int MAX_NAME_LEN = 512;
76 const int MAX_LIST_LEN = 1024;
77 const int MAX_LINE_LEN = 65536;
85 UN_KNOWN, HTTP_GET, HTTP_XML_POST
104 string ms_CGIContent;
105 CGI_METHOD_FLAG me_CGIMethod;
110 me_CGIMethod = UN_KNOWN;
115 string GetRqstContent()
117 return ms_CGIContent;
120 CGI_METHOD_FLAG GetCGImethod()
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);
144 void add(
string newstr)
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++)
176 string toString(
const char delimiter)
179 for (
int i = 0; i < size(); i++)
180 s += strings[i] + delimiter;
184 string toString(
const string& delimiters)
187 for (
int i = 0; i < size(); i++)
188 s += strings[i] + delimiters;
197 char buf[MAX_LINE_LEN];
202 s.copy(buf, string::npos);
224 KVP& operator =(
const KVP &
id)
231 KVP& operator =(
const KVP *pid)
238 KVP(
string n,
string v) :
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);
352 int CPL_DLL CPL_STDCALL Find_Compare_SubStr(
string line,
string sub);
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);
362 int CPL_DLL CPL_STDCALL CompareDateTime_GreaterThan(
string time1,
string time2);
363 int CPL_DLL CPL_STDCALL ConvertDateTimeToSeconds(
string datetime);
364 string CPL_DLL CPL_STDCALL GetTimeString(
int code);
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);
377 void CPL_DLL CPL_STDCALL GetCornerPoints(
const GDAL_GCP* &pGCPList,
const int &nGCPs,
My2DPoint& lowLeft,
My2DPoint& upRight);