| IOLink 1.11.0

Loading...
Searching...
No Matches
Uri.h
1#pragma once
2#include <iolink/IOLinkAPI.h>
3
4#include <cstdint>
5#include <string>
6
7 namespace iolink
8{
9
14 class IOLINK_API Uri final
15{
16 public:
20 explicit Uri(const std::string& uri);
21
22 Uri() = delete;
23
27 Uri(const Uri& other);
28 Uri& operator=(Uri rhs);
29
33 ~Uri();
34
38 std::string scheme() const;
39
43 std::string authority() const;
44
48 std::string host() const;
49
53 uint16_t port() const;
54
58 std::string userInfo() const;
59
63 std::string path() const;
64
68 std::string query() const;
69
73 std::string pathAndQuery() const;
74
78 std::string toString() const;
79
80 private:
81 // Internal implementation class
82 class Impl;
83
84 // Pointer to the internal implementation
85 Impl* m_pimpl;
86};
87
88} // end namespace iolink
iolink::Uri
Class modeling universal resource identifier.
Definition Uri.h:15
iolink::Uri::Uri
Uri(const Uri &other)
Asssignment Operator and Copy Constructor.
iolink::Uri::port
uint16_t port() const
Returns the port number part of the URI.
iolink::Uri::pathAndQuery
std::string pathAndQuery() const
Returns the encoded path and query parts of the URI.
iolink::Uri::scheme
std::string scheme() const
Scheme or protocol e.g.
iolink::Uri::~Uri
~Uri()
Destructor.
iolink::Uri::Uri
Uri(const std::string &uri)
Parses string and sets uri fields.
iolink::Uri::authority
std::string authority() const
Returns the authority part (userInfo, host and port) of the URI.
iolink::Uri::toString
std::string toString() const
Returns a string representation of the URI.
iolink::Uri::userInfo
std::string userInfo() const
Returns the user-info part of the URI.
iolink::Uri::query
std::string query() const
Returns the decoded query part of the URI.
iolink::Uri::host
std::string host() const
Returns the host part of the URI.
iolink::Uri::path
std::string path() const
Returns the decoded path part of the URI.
iolink
All IOLink symbols are enclosed in this namespace.
Definition ArrayX.h:8