diff options
author | David Robillard <d@drobilla.net> | 2012-05-12 03:37:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-12 03:37:22 +0000 |
commit | 54eb7caa4866b151983065385bfd54fc69d0d698 (patch) | |
tree | c368e41e9dd90f32d4cae99e94f56c7372c5fa9e | |
parent | aa7d552e83a9b522386620eee1aedd9485f32a27 (diff) | |
download | sord-54eb7caa4866b151983065385bfd54fc69d0d698.tar.gz sord-54eb7caa4866b151983065385bfd54fc69d0d698.tar.bz2 sord-54eb7caa4866b151983065385bfd54fc69d0d698.zip |
sordmm.hpp: Add indices and graphs parameters to Model constructor.
sordmm.hpp: Remove overzealous URI scheme assertion.
git-svn-id: http://svn.drobilla.net/sord/trunk@222 3d64ff67-21c5-427c-a301-fe4f08042e5a
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | sord/sordmm.hpp | 18 | ||||
-rw-r--r-- | wscript | 2 |
3 files changed, 18 insertions, 9 deletions
@@ -1,3 +1,10 @@ +sord (9999) unstable; + + * sordmm.hpp: Add indices and graphs parameters to Model constructor + * sordmm.hpp: Remove overzealous URI scheme assertion + + -- David Robillard <d@drobilla.net> + sord (0.8.0) stable; * Use path variables in pkgconfig files diff --git a/sord/sordmm.hpp b/sord/sordmm.hpp index 2ceea2a..ba59ed9 100644 --- a/sord/sordmm.hpp +++ b/sord/sordmm.hpp @@ -246,10 +246,6 @@ Node::Node(World& world, Type type, const std::string& s) { switch (type) { case URI: - assert(s.find(":") == std::string::npos - || s.substr(0, 5) == "http:" - || s.substr(0, 5) == "file:" - || s.substr(0, 4) == "urn:"); _c_obj = sord_new_uri( world.world(), (const unsigned char*)s.c_str()); break; @@ -389,7 +385,11 @@ struct Iter : public Wrapper<SordIter*> { */ class Model : public Noncopyable, public Wrapper<SordModel*> { public: - inline Model(World& world, const std::string& base_uri="."); + inline Model(World& world, + const std::string& base_uri, + unsigned indices = (SORD_SPO | SORD_OPS), + bool graphs = true); + inline ~Model(); inline const Node& base_uri() const { return _base; } @@ -441,13 +441,15 @@ private: /** Create an empty in-memory RDF model. */ inline -Model::Model(World& world, const std::string& base_uri) +Model::Model(World& world, + const std::string& base_uri, + unsigned indices, + bool graphs) : _world(world) , _base(world, Node::URI, base_uri) , _writer(NULL) { - // FIXME: parameters - _c_obj = sord_new(_world.world(), SORD_SPO|SORD_OPS, true); + _c_obj = sord_new(_world.world(), indices, graphs); } inline void @@ -8,7 +8,7 @@ from waflib.extras import autowaf as autowaf import waflib.Logs as Logs, waflib.Options as Options # Version of this package (even if built as a child) -SORD_VERSION = '0.8.0' +SORD_VERSION = '0.8.1' SORD_MAJOR_VERSION = '0' # Library version (UNIX style major, minor, micro) |