diff options
Diffstat (limited to 'ingen')
-rw-r--r-- | ingen/Properties.hpp | 2 | ||||
-rw-r--r-- | ingen/URIs.hpp | 27 |
2 files changed, 18 insertions, 11 deletions
diff --git a/ingen/Properties.hpp b/ingen/Properties.hpp index 6f1a8494..cd81ba59 100644 --- a/ingen/Properties.hpp +++ b/ingen/Properties.hpp @@ -41,7 +41,7 @@ public: {} Property(const URIs::Quark& quark, Graph ctx=Graph::DEFAULT) - : Atom(quark.urid) + : Atom(quark.urid_atom()) , _ctx(ctx) {} diff --git a/ingen/URIs.hpp b/ingen/URIs.hpp index eb657473..9d4b2818 100644 --- a/ingen/URIs.hpp +++ b/ingen/URIs.hpp @@ -51,13 +51,20 @@ public: ~Quark(); - operator LV2_URID() const { return urid.get<LV2_URID>(); } - explicit operator Atom() const { return urid; } - operator const LilvNode*() const { return lnode; } + const Atom& urid_atom() const { return _urid_atom; } + const Atom& uri_atom() const { return _uri_atom; } - Atom urid; - Atom uri; - LilvNode* lnode; + LV2_URID urid() const { return _urid_atom.get<LV2_URID>(); } + const LilvNode* node() const { return _lilv_node; } + + operator LV2_URID() const { return _urid_atom.get<LV2_URID>(); } + explicit operator Atom() const { return _urid_atom; } + operator const LilvNode*() const { return _lilv_node; } + + private: + Atom _urid_atom; + Atom _uri_atom; + LilvNode* _lilv_node; }; ingen::Forge& forge; @@ -203,10 +210,10 @@ public: inline bool operator==(const URIs::Quark& lhs, const Atom& rhs) { - if (rhs.type() == lhs.urid.type()) { - return rhs == lhs.urid; - } else if (rhs.type() == lhs.uri.type()) { - return rhs == lhs.uri; + if (rhs.type() == lhs.urid_atom().type()) { + return rhs == lhs.urid_atom(); + } else if (rhs.type() == lhs.uri_atom().type()) { + return rhs == lhs.uri_atom(); } return false; } |