Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
url.hpp
Go to the documentation of this file.
1#pragma once
2#include <fc/string.hpp>
3#include <stdint.h>
4#include <fc/filesystem.hpp>
6#include <memory>
7
8namespace fc {
9
10 typedef std::optional<fc::string> ostring;
11 typedef std::optional<fc::path> opath;
12 typedef std::optional<fc::variant_object> ovariant_object;
13
14 namespace detail { class url_impl; }
15
16 class mutable_url;
17
22 class url
23 {
24 public:
25 url();
26 explicit url( const string& u );
27 url( const url& c );
28 url( url&& c );
29 url( const string& proto, const ostring& host, const ostring& user, const ostring& pass,
30 const opath& path, const ostring& query, const ovariant_object& args, const std::optional<uint16_t>& port);
31 ~url();
32
33 url& operator=( const url& c );
34 url& operator=( url&& c );
35
38
39 bool operator==( const url& cmp )const;
40
41 operator string()const;
42
44 string proto()const;
45 ostring host()const;
46 ostring user()const;
47 ostring pass()const;
48 opath path()const;
49 ostring query()const;
50 ovariant_object args()const;
51 std::optional<uint16_t> port()const;
52
53 private:
54 friend class mutable_url;
55 std::shared_ptr<detail::url_impl> my;
56 };
57
58 void to_variant( const url& u, fc::variant& v );
59 void from_variant( const fc::variant& v, url& u );
60
61} // namespace fc
62
wraps boost::filesystem::path to provide platform independent path manipulation.
opath path() const
Definition url.cpp:182
ostring host() const
Definition url.cpp:170
~url()
Definition url.cpp:148
url & operator=(const mutable_url &c)
string proto() const
Definition url.cpp:166
url & operator=(mutable_url &&c)
friend class mutable_url
Definition url.hpp:54
ovariant_object args() const
Definition url.cpp:190
url & operator=(const url &c)
Definition url.cpp:150
ostring query() const
Definition url.cpp:186
ostring user() const
Definition url.cpp:174
std::optional< uint16_t > port() const
Definition url.cpp:194
url()
Definition url.cpp:121
bool operator==(const url &cmp) const
ostring pass() const
Definition url.cpp:178
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Definition variant.hpp:191
namespace sysio::chain
Definition authority.cpp:3
std::string string
Definition string.hpp:10
std::optional< fc::string > ostring
Definition url.hpp:10
std::optional< fc::path > opath
Definition url.hpp:11
std::optional< fc::variant_object > ovariant_object
Definition url.hpp:12
void from_variant(const fc::variant &v, sysio::chain::chain_id_type &cid)
void to_variant(const sysio::chain::shared_public_key &var, fc::variant &vo)
Definition authority.cpp:4
void cmp(const Operand &op, uint32 imm)