00001
00002
00003
00004
00008 #ifndef XMLI_CHSTR_H
00009 #define XMLI_CHSTR_H
00010 #include <string>
00011 #include <vector>
00012 #include <ctime>
00013 #include <xercesc/util/XMLString.hpp>
00014 using namespace xercesc;
00015
00016 namespace xmli {
00018 class ChString : public std::string {
00019 public:
00020 ChString(const XMLCh* ch) {
00021 char* c = XMLString::transcode(ch);
00022 (*static_cast<std::string*>(this)) = c;
00023 XMLString::release(&c);
00024 }
00025
00026 static int Split(const char* text, const char* delim,
00027 std::vector<std::string>& fields);
00028 static bool IsTrue(const std::string& s);
00029 static bool IsFalse(const std::string& s);
00030 static void Trim(std::string& s);
00031 static time_t GetTime(std::string& s);
00032
00033 };
00034 }
00035 #endif
00036