dodo
0.0.1
A C++ library to create containerized Linux services
|
Go to the documentation of this file.
23 #ifndef dodo_network_uri_hpp
24 #define dodo_network_uri_hpp
54 URI(
const std::string &scheme,
55 const std::string &userinfo,
56 const std::string &host,
57 const std::string &port,
58 const std::string &path,
59 const std::string &query,
60 const std::string &fragment ) :
73 URI(
const URI &uri ) { *
this = uri; };
87 bool parse(
const std::string &s,
size_t &idxfail );
URI & operator=(const URI &uri)
Assignment operator.
bool verifyPathChar(char c)
Check if c is a valid Path char.
void setScheme(const std::string &scheme)
Set the URI scheme.
bool operator<(const URI &uri)
Ordering operator.
bool operator!=(const URI &uri)
Inequality operator.
std::string asString() const
Return the URI as a std::string.
std::string getUserInfo() const
Return the user-info std::string.
ParseState
States for the parsingg automaton.
std::string userinfo_
The userinfo.
URI()
Construct an empty URI.
bool verifyQueryFragmentChar(char c)
Check if c is a valid Fragment char.
std::string getScheme() const
Return the URI scheme std::string.
Uniform Resource Identifier.
void setPath(const std::string &path)
Set the URI path.
std::string getPath() const
Return the path std::string.
std::string path_
The path.
void setPort(const std::string &port)
Set the URI port.
void reset()
Reste all data to empty strings.
bool verifyUserInfoHostChar(char c)
Check if c is a valid UserInfo or host char.
A C++ platform interface to lean Linux services tailored for containerized deployment.
std::string host_
The host.
std::string port_
The port.
bool parse(const std::string &s, size_t &idxfail)
Parse the string as an URI.
std::string getPort() const
Return the port std::string.
std::string fragment_
The fragment.
std::string scheme_
The scheme.
std::string query_
The query.
void setFragment(const std::string &fragment)
Set the URI fragment.
std::string getQuery() const
Return the query std::string.
URI(const std::string &scheme, const std::string &userinfo, const std::string &host, const std::string &port, const std::string &path, const std::string &query, const std::string &fragment)
Construct an URI from iits components.
void setQuery(const std::string &query)
Set the URI query.
bool verifyTCP6Char(char c)
Check if c is a valid TCP6 address char.
bool verifySchemeChar(char c)
Check if c is a valid Scheme char.
std::string getFragment() const
Return the fragment std::string.
std::string getHost() const
Return the host std::string.
void setUserInfo(const std::string &userinfo)
Set the URI user-info.
void setHost(const std::string &host)
Set the URI host.
bool verifyOctetChar(char c)
Check if c is a valid Octet.
URI(const URI &uri)
Copy constructor.
bool operator==(const URI &uri)
Equality operator.