uri: add an `all' accessor for the entire string

This commit is contained in:
Danny Robson 2017-12-22 18:37:11 +11:00
parent d1649d4acf
commit cb9e9afcd3

20
uri.hpp
View File

@ -75,15 +75,17 @@ namespace util {
view<const char*> get (component) const; view<const char*> get (component) const;
view<const char*> scheme (void) const { return get (SCHEME); } auto all (void) const { return util::make_view (m_value); }
view<const char*> heirarchical (void) const { return get (HIERARCHICAL); }
view<const char*> authority (void) const { return get (AUTHORITY); } auto scheme (void) const { return get (SCHEME); }
view<const char*> user (void) const { return get (USER); } auto heirarchical (void) const { return get (HIERARCHICAL); }
view<const char*> host (void) const { return get (HOST); } auto authority (void) const { return get (AUTHORITY); }
view<const char*> port (void) const { return get (PORT); } auto user (void) const { return get (USER); }
view<const char*> path (void) const { return get (PATH); } auto host (void) const { return get (HOST); }
view<const char*> query (void) const { return get (QUERY); } auto port (void) const { return get (PORT); }
view<const char*> fragment (void) const { return get (FRAGMENT); } auto path (void) const { return get (PATH); }
auto query (void) const { return get (QUERY); }
auto fragment (void) const { return get (FRAGMENT); }
auto components (void) const noexcept { return m_views; } auto components (void) const noexcept { return m_views; }