diff options
author | David Robillard <d@drobilla.net> | 2012-03-09 23:51:52 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-09 23:51:52 +0000 |
commit | 90a703bad8e7df5c0b154c17dfb201dc708f6069 (patch) | |
tree | 3f1865e4d511815a246a237bfe13fda9adbc5770 /sord/sordmm.hpp | |
parent | 99082336abd05045e4f224fc2d07776648fbcc46 (diff) | |
download | sord-90a703bad8e7df5c0b154c17dfb201dc708f6069.tar.gz sord-90a703bad8e7df5c0b154c17dfb201dc708f6069.tar.bz2 sord-90a703bad8e7df5c0b154c17dfb201dc708f6069.zip |
Add sord_new_relative_uri().
git-svn-id: http://svn.drobilla.net/sord/trunk@204 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'sord/sordmm.hpp')
-rw-r--r-- | sord/sordmm.hpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sord/sordmm.hpp b/sord/sordmm.hpp index 5f71f09..8a08c83 100644 --- a/sord/sordmm.hpp +++ b/sord/sordmm.hpp @@ -221,6 +221,11 @@ class URI : public Node { public: inline URI(World& world, const std::string& s) : Node(world, Node::URI, s) {} + inline URI(World& world, const std::string& s, const std::string& base) + : Node(world, sord_new_relative_uri(world.world(), + (const uint8_t*)s.c_str(), + (const uint8_t*)base.c_str())) + {} }; class Curie : public Node { @@ -406,13 +411,15 @@ public: const std::string& uri, SerdSyntax syntax = SERD_TURTLE, SerdStyle style = (SerdStyle)(SERD_STYLE_ABBREVIATED - |SERD_STYLE_CURIED)); + |SERD_STYLE_CURIED + |SERD_STYLE_RESOLVED)); inline std::string write_to_string( const std::string& base_uri, SerdSyntax syntax = SERD_TURTLE, SerdStyle style = (SerdStyle)(SERD_STYLE_ABBREVIATED - |SERD_STYLE_CURIED)); + |SERD_STYLE_CURIED + |SERD_STYLE_RESOLVED)); inline void add_statement(const Node& subject, const Node& predicate, |