diff options
author | David Robillard <d@drobilla.net> | 2012-03-11 01:52:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-03-11 01:52:43 +0000 |
commit | 7bc5413b66cd60395af7f045b34b16685851b3dc (patch) | |
tree | fa88034f3226b37d6bd3363f9d89e07fa313ac4e /include | |
parent | b77cf5f715f94ec172d3e759b3c4e03761374556 (diff) | |
download | ingen-7bc5413b66cd60395af7f045b34b16685851b3dc.tar.gz ingen-7bc5413b66cd60395af7f045b34b16685851b3dc.tar.bz2 ingen-7bc5413b66cd60395af7f045b34b16685851b3dc.zip |
Missing portion of previous commit (r4045).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4046 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'include')
-rw-r--r-- | include/ingen/shared/ResourceImpl.hpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/include/ingen/shared/ResourceImpl.hpp b/include/ingen/shared/ResourceImpl.hpp index 13f1bd8f..fea21023 100644 --- a/include/ingen/shared/ResourceImpl.hpp +++ b/include/ingen/shared/ResourceImpl.hpp @@ -47,15 +47,25 @@ public: Properties properties(Resource::Graph ctx) const; const Raul::Atom& get_property(const Raul::URI& uri) const; - const Raul::Atom& set_property(const Raul::URI& uri, const Raul::Atom& value, - Resource::Graph ctx=Resource::DEFAULT); - void remove_property(const Raul::URI& uri, const Raul::Atom& value); - bool has_property(const Raul::URI& uri, const Raul::Atom& value) const; - void add_property(const Raul::URI& uri, const Raul::Atom& value, - Graph ctx=DEFAULT); - void set_properties(const Properties& p); - void add_properties(const Properties& p); - void remove_properties(const Properties& p); + + const Raul::Atom& set_property(const Raul::URI& uri, + const Raul::Atom& value, + Resource::Graph ctx=Resource::DEFAULT); + + /** Hook called whenever a property is added. + * This can be used by derived classes to implement special behaviour for + * particular properties (e.g. ingen:value for ports). + */ + virtual void on_property(const Raul::URI& uri, const Raul::Atom& value) {} + + void remove_property(const Raul::URI& uri, const Raul::Atom& value); + bool has_property(const Raul::URI& uri, const Raul::Atom& value) const; + void add_property(const Raul::URI& uri, + const Raul::Atom& value, + Graph ctx = DEFAULT); + void set_properties(const Properties& p); + void add_properties(const Properties& p); + void remove_properties(const Properties& p); void dump(std::ostream& os) const; |