diff options
Diffstat (limited to 'src/engine/GraphObjectImpl.cpp')
-rw-r--r-- | src/engine/GraphObjectImpl.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/engine/GraphObjectImpl.cpp b/src/engine/GraphObjectImpl.cpp index 0e1abc57..b08a9ffc 100644 --- a/src/engine/GraphObjectImpl.cpp +++ b/src/engine/GraphObjectImpl.cpp @@ -15,12 +15,28 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "raul/Atom.hpp" #include "GraphObjectImpl.hpp" #include "PatchImpl.hpp" #include "EngineStore.hpp" namespace Ingen { +void +GraphObjectImpl::set_variable(const std::string& key, const Atom& value) +{ + _variables[key] = value; +} + + +const Atom& +GraphObjectImpl::get_variable(const std::string& key) +{ + static const Atom null_atom; + Variables::iterator i = _variables.find(key); + return (i != _variables.end()) ? (*i).second : null_atom; +} + PatchImpl* GraphObjectImpl::parent_patch() const |