165 bool validUri = this->
Split(s);
176 bool validUri = this->
Split(s);
185 isEmpty(rhs.isEmpty),
187 userInfo(rhs.userInfo),
190 localPath(rhs.localPath),
191 fragment(rhs.fragment),
229 (this->host == rhs.
host) &&
230 (this->port == rhs.
port) &&
233 (this->query == rhs.
query));
244 return !(*
this == rhs);
301 return this->
Build();
456IO::URI operator ""_uri(
const char* c, std::size_t s);
An URI object can split a Uniform Resource Identifier string into its components or build a string fr...
Definition uri.h:67
bool operator==(const URI &rhs) const
equality operator
Definition uri.h:219
bool IsValid() const
return true if the URI is not empty
Definition uri.h:262
bool operator!=(const URI &rhs) const
inequality operator
Definition uri.h:242
void SetHost(const Util::String &s)
set Host component
Definition uri.h:351
Util::String host
Definition uri.h:141
void AppendLocalPath(const Util::String &pathComponent)
append an element to the local path component
Definition uri.cc:251
Util::String Build() const
build string from components
Definition uri.cc:155
const Util::String & Query() const
get Query component (can be empty)
Definition uri.h:446
void SetPort(const Util::String &s)
set Port component
Definition uri.h:372
Util::String fragment
Definition uri.h:144
void SetLocalPath(const Util::String &s)
set LocalPath component
Definition uri.h:393
const Util::String & Host() const
get Host component (can be empty)
Definition uri.h:362
URI()
default constructor
Definition uri.h:152
Util::Dictionary< Util::String, Util::String > ParseQuery() const
parse query parameters into a dictionary
Definition uri.cc:265
Util::String localPath
Definition uri.h:143
Util::String GetTail() const
get the "tail" (path, query and fragment)
Definition uri.cc:204
void SetScheme(const Util::String &s)
set Scheme component (ftp, http, etc...)
Definition uri.h:309
void Clear()
clear the URI
Definition uri.h:272
Util::String query
Definition uri.h:145
bool isEmpty
Definition uri.h:138
void SetUserInfo(const Util::String &s)
set UserInfo component
Definition uri.h:330
Util::String port
Definition uri.h:142
bool Split(const Util::String &s)
split string into components
Definition uri.cc:34
bool IsEmpty() const
return true if the URI is empty
Definition uri.h:252
void operator=(const URI &rhs)
assignmnent operator
Definition uri.h:202
void Set(const Util::String &s)
set complete URI string
Definition uri.h:289
Util::String userInfo
Definition uri.h:140
const Util::String & Port() const
get Port component (can be empty)
Definition uri.h:383
Util::String scheme
Definition uri.h:139
const Util::String & LocalPath() const
get LocalPath component (can be empty)
Definition uri.h:404
const Util::String & Fragment() const
get Fragment component (can be empty)
Definition uri.h:425
Util::String GetHostAndLocalPath() const
get the host and path without scheme
Definition uri.cc:231
Util::String AsString() const
return as concatenated string
Definition uri.h:299
const Util::String & UserInfo() const
get UserInfo component (can be empty)
Definition uri.h:341
void SetQuery(const Util::String &s)
set Query component
Definition uri.h:435
const Util::String & Scheme() const
get Scheme component (default is file)
Definition uri.h:320
void SetFragment(const Util::String &s)
set Fragment component
Definition uri.h:414
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
#define n_assert2(exp, msg)
Definition debug.h:51
Instances of wrapped stream classes.
Definition orientation.cc:10
Nebula's universal string class.
Definition string.h:50
void Clear()
clear the string
Definition string.h:664
const char * AsCharPtr() const
return contents as character pointer
Definition string.h:540