Samchon Framework for CPP  1.0.0
URLVariables.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <samchon/HashMap.hpp>
5 #include <samchon/WeakString.hpp>
6 
7 namespace samchon
8 {
9 namespace library
10 {
30  class SAMCHON_FRAMEWORK_API URLVariables
31  : public HashMap<std::string, std::string>
32  {
33  private:
35 
36  public:
37  /* ------------------------------------------------------------
38  CONSTRUCTORS
39  ------------------------------------------------------------ */
43  URLVariables();
44 
53  URLVariables(const WeakString &flashVars);
54 
55  public:
63  static auto encode(const WeakString &)->std::string;
64 
72  static auto decode(const WeakString &)->std::string;
73 
74  private:
75  /* ------------------------------------------------------------
76  URI ENCODING & DECONDING
77  ------------------------------------------------------------ */
78  static auto toHex(unsigned char ch) -> char;
79  static auto fromHex(unsigned char ch) -> char;
80 
81  public:
82  /* ------------------------------------------------------------
83  TO_STRING
84  ------------------------------------------------------------ */
93  auto toString() const->std::string;
94  };
95 
96  SAMCHON_FRAMEWORK_EXTERN template class SAMCHON_FRAMEWORK_API HashMap<std::string, std::string>;
97 };
98 };
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7
Customized std::unordered_map.
Definition: HashMap.hpp:105
A string class only references characeters, reference only.
Definition: WeakString.hpp:32
URLVariables class is for representing variables of HTTP.