18 #ifndef GAZEBO_COMMON_URI_HH_
19 #define GAZEBO_COMMON_URI_HH_
31 class URIQueryPrivate;
46 public:
URIPath(
const std::string &_str);
56 public:
void PushFront(
const std::string &_part);
61 public:
void PushBack(
const std::string &_part);
66 public:
const URIPath &operator/=(
const std::string &_part);
72 public:
const URIPath operator/(
const std::string &_part)
const;
77 public:
bool operator==(
const URIPath &_path)
const;
82 public: std::string Str(
const std::string &_delim =
"/")
const;
92 public:
static bool Valid(
const std::string &_str);
96 public:
bool Valid()
const;
101 public:
bool Parse(
const std::string &_str);
107 public:
bool Contains(
const URIPath &_other)
const;
111 private: std::unique_ptr<URIPathPrivate> dataPtr;
122 public:
URIQuery(
const std::string &_str);
132 public:
void Clear();
137 public:
void Insert(
const std::string &_key,
138 const std::string &_value);
148 public:
bool operator==(
const URIQuery &_query)
const;
154 public: std::string Str(
const std::string &_delim =
"&")
const;
159 public:
static bool Valid(
const std::string &_str);
163 public:
bool Valid()
const;
168 public:
bool Parse(
const std::string &_string);
172 private: std::unique_ptr<URIQueryPrivate> dataPtr;
176 class GZ_COMMON_VISIBLE
URI
183 public:
URI(
const std::string &_str);
187 public:
URI(
const URI &_uri);
197 public: std::string Str()
const;
200 public:
void Clear();
204 public: std::string Scheme()
const;
208 public:
void SetScheme(
const std::string &_scheme);
216 public:
const URIPath &Path()
const;
224 public:
const URIQuery &Query()
const;
229 public:
URI &operator=(
const URI &_uri);
234 public:
bool operator==(
const URI &_uri)
const;
238 public:
bool Valid()
const;
243 public:
static bool Valid(
const std::string &_str);
248 public:
bool Parse(
const std::string &_str);
252 private: std::unique_ptr<URIPrivate> dataPtr;
A complete URI.
Definition: URI.hh:176
The path component of a URI.
Definition: URI.hh:35
The query component of a URI.
Definition: URI.hh:115