From 1af6861f8db57b54ba19b80964eb00c5f7340bfb Mon Sep 17 00:00:00 2001 From: Richard Walters Date: Mon, 2 Jul 2018 21:21:48 -0700 Subject: Add capability to compare Uri objects. * Code the neat example in section 6.2.2 of the RFC. * Add equality/inequality operators for Uri. --- include/Uri/Uri.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'include/Uri') diff --git a/include/Uri/Uri.hpp b/include/Uri/Uri.hpp index afdb631..b64f0da 100644 --- a/include/Uri/Uri.hpp +++ b/include/Uri/Uri.hpp @@ -36,6 +36,30 @@ namespace Uri { */ Uri(); + /** + * This is the equality comparison operator for the class. + * + * @param[in] other + * This is the other URI to which to compare this URI. + * + * @return + * An indication of whether or not the two URIs are + * equal is returned. + */ + bool operator==(const Uri& other) const; + + /** + * This is the inequality comparison operator for the class. + * + * @param[in] other + * This is the other URI to which to compare this URI. + * + * @return + * An indication of whether or not the two URIs are + * not equal is returned. + */ + bool operator!=(const Uri& other) const; + /** * This method builds the URI from the elements parsed * from the given string rendering of a URI. -- cgit v1.2.3