Go to the documentation of this file.
17 #ifndef GZ_COMMON_URI_HH_
18 #define GZ_COMMON_URI_HH_
23 #include <gz/common/Export.hh>
32 class URIQueryPrivate;
33 class URIFragmentPrivate;
58 public:
bool IsAbsolute()
const;
65 public:
void SetAbsolute(
bool _absolute =
true);
70 public:
void SetRelative();
105 public:
bool operator==(
const URIPath &_path)
const;
120 public:
static bool Valid(
const std::string &_str);
124 public:
bool Valid()
const;
156 public:
void Clear();
172 public:
bool operator==(
const URIQuery &_query)
const;
183 public:
static bool Valid(
const std::string &_str);
187 public:
bool Valid()
const;
219 public:
void Clear();
234 public:
bool operator==(
const URIFragment &_fragment)
const;
243 public:
static bool Valid(
const std::string &_str);
247 public:
bool Valid()
const;
263 class IGNITION_COMMON_VISIBLE
URI
274 public:
URI(
const URI &_uri);
287 public:
void Clear();
295 public:
void SetScheme(
const std::string &_scheme);
303 public:
const URIPath &Path()
const;
311 public:
const URIQuery &Query()
const;
324 public:
URI &operator=(
const URI &_uri);
329 public:
bool operator==(
const URI &_uri)
const;
333 public:
bool Valid()
const;
338 public:
static bool Valid(
const std::string &_str);
bool IsAbsolute() const
Returns whether the path is absolute or not.
const URIPath operator/(const std::string &_part) const
Get the current path with the _part added to the end.
bool operator==(const URIPath &_path) const
Return true if the two paths match.
Forward declarations for the common classes.
std::string Str(const std::string &_delim="&") const
Get the query as a string.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Microsoft Visual Studio does not automatically export the interface information for member variables ...
Definition: gz/common/SuppressWarning.hh:65
void SetRelative()
Set the path to be relative.
URIFragment()
Constructor.
URIQuery & operator=(const URIQuery &_query)
Assignment operator.
std::string Scheme() const
Get the URI's scheme.
void Clear()
Remove all components of the URI.
void Clear()
Remove all values of the query.
bool Parse(const std::string &_string)
Parse a string as URIQuery.
bool Valid() const
Validate this URI.
virtual ~URIFragment()
Destructor.
bool Valid() const
Check if this is a valid URI query.
void SetAbsolute(bool _absolute=true)
Set whether the path is to be treated absolute or not.
bool operator==(const URI &_uri) const
Return true if the two URIs match.
The path component of a URI.
Definition: gz/common/URI.hh:37
void PushBack(const std::string &_part)
Push a new part onto the back of this path.
A complete URI.
Definition: gz/common/URI.hh:263
The fragment component of a URI.
Definition: gz/common/URI.hh:202
bool operator==(const URIQuery &_query) const
Return true if the two queries contain the same values.
bool Parse(const std::string &_str)
Parse a string as URIPath.
void SetScheme(const std::string &_scheme)
Set the URI's scheme.
bool Valid() const
Check if this is a valid URI fragment.
const URIPath & operator/=(const std::string &_part)
Compound assignment operator.
URIFragment & operator=(const URIFragment &_fragment)
Assignment operator.
void Insert(const std::string &_key, const std::string &_value)
Get this query with a new _key=_value pair added.
The query component of a URI.
Definition: gz/common/URI.hh:139
bool Parse(const std::string &_string)
Parse a string as URIFragment.
URI & operator=(const URI &_uri)
Assignment operator.
void Clear()
Remove all parts of the path.
std::string Str() const
Get the fragment as a string.
URIFragment & Fragment()
Get a mutable version of the fragment component.
URIPath & Path()
Get a mutable version of the path component.
URIQuery & Query()
Get a mutable version of the query component.
std::string Str() const
Get the URI as a string, which has the form:
virtual ~URIQuery()
Destructor.
virtual ~URIPath()
Destructor.
URIPath & operator=(const URIPath &_path)
Assignment operator.
void PushFront(const std::string &_part)
Push a new part onto the front of this path.
bool Valid() const
Return true if this is a valid path.
void Clear()
Remove all values of the fragment.
URI()
Default constructor.
bool Parse(const std::string &_str)
Parse a string as URI.
std::string Str(const std::string &_delim="/") const
Get the path as a string.
bool operator==(const URIFragment &_fragment) const
Return true if the two fragments contain the same values.
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: gz/common/SuppressWarning.hh:68