00001
00002 #ifndef uripp_utils_h
00003 #define uripp_utils_h
00004 #include "apidefs.h"
00005 #include <string>
00006 #include <stack>
00007 namespace uripp {
00008 std::string URIPP_API convert(bool v);
00009 std::string URIPP_API convert(int v);
00010 std::string URIPP_API convert(unsigned int v);
00011 std::string URIPP_API convert(unsigned long int v);
00012 std::string URIPP_API convert(long long int v);
00013 std::string URIPP_API convert(unsigned long long int v);
00014 # ifndef _WIN32
00015 std::string URIPP_API convert(ptrdiff_t v);
00016 # endif
00017 std::string URIPP_API convert(double v);
00018 std::string URIPP_API convert(const std::string& v);
00019 inline std::string convert(const char* v) {return v;}
00020
00021
00022
00023
00024
00025
00026
00027 bool URIPP_API convert(const std::string& s, bool& v);
00032 bool URIPP_API convert(const std::string& s, int& v);
00037 bool URIPP_API convert(const std::string& s, unsigned int& v);
00042 bool URIPP_API convert(const std::string& s, unsigned long int& v);
00047 bool URIPP_API convert(const std::string& s, long long int& v);
00052 bool URIPP_API convert(const std::string& s, unsigned long long int& v);
00057 bool URIPP_API convert(const std::string& s, double& v);
00060 bool URIPP_API convert(const std::string& s, std::string& v);
00061 bool URIPP_API isspaces(const char* s);
00062
00063
00064 bool URIPP_API parse_hex(const std::string& s, size_t pos, char& chr);
00066 void URIPP_API append_hex(char v, std::string& s);
00067 }
00068 #endif