diff options
author | David Robillard <d@drobilla.net> | 2018-01-21 13:47:26 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-01-21 13:47:26 +0100 |
commit | 758eb81e8f9c8779b7292205437edde4e9cce30a (patch) | |
tree | b16fd066ab7938fcfc013bff3fb2f0cb8760c596 /ingen/URI.hpp | |
parent | c5c0084f0945cd712ff9a83de090d316e11c7fed (diff) | |
download | ingen-758eb81e8f9c8779b7292205437edde4e9cce30a.tar.gz ingen-758eb81e8f9c8779b7292205437edde4e9cce30a.tar.bz2 ingen-758eb81e8f9c8779b7292205437edde4e9cce30a.zip |
Clean up URI and path handling in parser
Diffstat (limited to 'ingen/URI.hpp')
-rw-r--r-- | ingen/URI.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ingen/URI.hpp b/ingen/URI.hpp index 30aeb7cc..3c6d38d1 100644 --- a/ingen/URI.hpp +++ b/ingen/URI.hpp @@ -38,7 +38,8 @@ public: explicit URI(const std::string& str); explicit URI(const char* str); URI(const std::string& str, const URI& base); - explicit URI(const Sord::Node& node); + URI(const Sord::Node& node); + URI(SerdNode node); explicit URI(const FilePath& path); URI(const URI& uri); @@ -49,6 +50,8 @@ public: ~URI(); + URI make_relative(const URI& base) const; + bool empty() const { return !_node.buf; } std::string string() const { return std::string(c_str(), _node.n_bytes); } @@ -80,6 +83,8 @@ public: } private: + URI(SerdNode node, SerdURI uri); + static Chunk make_chunk(const SerdChunk& chunk) { return Chunk((const char*)chunk.buf, chunk.len); } |