summaryrefslogtreecommitdiffstats
path: root/src/shared/ResourceImpl.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-28 19:54:24 +0000
committerDavid Robillard <d@drobilla.net>2009-05-28 19:54:24 +0000
commitcf6e43bc6a14fc0fd290864b4f71aeb600a28e9d (patch)
tree9dca0dddfdb454e2db6d8e4c0c15adcafc140ee5 /src/shared/ResourceImpl.cpp
parent939a16ee56b4ba58246a98afda203f714d7d17c8 (diff)
downloadingen-cf6e43bc6a14fc0fd290864b4f71aeb600a28e9d.tar.gz
ingen-cf6e43bc6a14fc0fd290864b4f71aeb600a28e9d.tar.bz2
ingen-cf6e43bc6a14fc0fd290864b4f71aeb600a28e9d.zip
Generic plugin property mechanism.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2031 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared/ResourceImpl.cpp')
-rw-r--r--src/shared/ResourceImpl.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp
index ca3eaacd..ac828f58 100644
--- a/src/shared/ResourceImpl.cpp
+++ b/src/shared/ResourceImpl.cpp
@@ -47,11 +47,18 @@ ResourceImpl::add_property(const Raul::URI& uri, const Raul::Atom& value)
}
-void
+Raul::Atom&
ResourceImpl::set_property(const Raul::URI& uri, const Raul::Atom& value)
{
_properties.erase(uri);
- _properties.insert(make_pair(uri, value));
+ return _properties.insert(make_pair(uri, value))->second;
+}
+
+
+Raul::Atom&
+ResourceImpl::set_property(const Raul::URI& uri, const Raul::Atom& value) const
+{
+ return const_cast<ResourceImpl*>(this)->set_property(uri, value);
}