summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-10-25 05:10:37 +0000
committerDavid Robillard <d@drobilla.net>2015-10-25 05:10:37 +0000
commit94d2f7cfc7e573c6fdd7487b1ab207d01e9fdbcf (patch)
tree0d2c95c194d95e6e5925c66bbd4c709173421bfd /ingen
parentcbd64a410c165972f13d18e4260bb63b770b3c1f (diff)
downloadingen-94d2f7cfc7e573c6fdd7487b1ab207d01e9fdbcf.tar.gz
ingen-94d2f7cfc7e573c6fdd7487b1ab207d01e9fdbcf.tar.bz2
ingen-94d2f7cfc7e573c6fdd7487b1ab207d01e9fdbcf.zip
Create all graphs the same way
This ensures that subgraphs always have the standard control ports, so they are valid Ingen graphs on their own.. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5783 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'ingen')
-rw-r--r--ingen/Resource.hpp25
1 files changed, 24 insertions, 1 deletions
diff --git a/ingen/Resource.hpp b/ingen/Resource.hpp
index d798b009..31d23dac 100644
--- a/ingen/Resource.hpp
+++ b/ingen/Resource.hpp
@@ -99,7 +99,30 @@ public:
virtual ~Resource() {}
- typedef std::multimap<Raul::URI, Property> Properties;
+ class Properties : public std::multimap<Raul::URI, Property> {
+ public:
+ Properties() {}
+
+ Properties(const Properties& copy)
+ : std::multimap<Raul::URI, Property>(copy)
+ {}
+
+ Properties(std::initializer_list<value_type> l)
+ : std::multimap<Raul::URI, Property>(l)
+ {}
+
+ void put(const Raul::URI& key,
+ const Atom& value,
+ Graph ctx = Graph::DEFAULT) {
+ insert(std::make_pair(key, Property(value, ctx)));
+ }
+
+ void put(const Raul::URI& key,
+ const URIs::Quark& value,
+ Graph ctx = Graph::DEFAULT) {
+ insert(std::make_pair(key, Property(value, ctx)));
+ }
+ };
/** Get a single property value.
*