diff options
author | David Robillard <d@drobilla.net> | 2007-10-07 18:14:01 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-07 18:14:01 +0000 |
commit | 299f075679fc7ea6a67001c2cc0442511e167cbc (patch) | |
tree | 1fa210526bb92ceafa057b423e466686d55d00bd /src/libs/engine/GraphObjectImpl.hpp | |
parent | 91031b8f5a4bf86b39e4c4a02412a16e247f8b15 (diff) | |
download | ingen-299f075679fc7ea6a67001c2cc0442511e167cbc.tar.gz ingen-299f075679fc7ea6a67001c2cc0442511e167cbc.tar.bz2 ingen-299f075679fc7ea6a67001c2cc0442511e167cbc.zip |
Shared abstract Node interface.
git-svn-id: http://svn.drobilla.net/lad/ingen@835 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/GraphObjectImpl.hpp')
-rw-r--r-- | src/libs/engine/GraphObjectImpl.hpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/libs/engine/GraphObjectImpl.hpp b/src/libs/engine/GraphObjectImpl.hpp index 1fa6ad06..74d24763 100644 --- a/src/libs/engine/GraphObjectImpl.hpp +++ b/src/libs/engine/GraphObjectImpl.hpp @@ -47,26 +47,16 @@ class ProcessContext; * * \ingroup engine */ -class GraphObjectImpl : public Ingen::Shared::GraphObject +class GraphObjectImpl : virtual public Ingen::Shared::GraphObject { public: - typedef std::map<string, Atom> MetadataMap; - - GraphObjectImpl(GraphObjectImpl* parent, const string& name, bool polyphonic=false) - : _parent(parent), _name(name), _polyphonic(polyphonic) - { - assert(parent == NULL || _name.length() > 0); - assert(_name.find("/") == string::npos); - assert(path().find("//") == string::npos); - } - virtual ~GraphObjectImpl() {} bool polyphonic() const { return _polyphonic; } virtual void set_polyphonic(Raul::Maid& maid, bool p) { _polyphonic = p; } inline GraphObjectImpl* parent() const { return _parent; } - inline const string& name() const { return _name; } + const string& name() const { return _name; } virtual void process(ProcessContext& context) = 0; @@ -92,7 +82,7 @@ public: virtual Patch* parent_patch() const; /** Path is dynamically generated from parent to ease renaming */ - inline const Path path() const { + const Path path() const { if (_parent == NULL) return Path(string("/").append(_name)); else if (_parent->path() == "/") @@ -102,6 +92,14 @@ public: } protected: + GraphObjectImpl(GraphObjectImpl* parent, const string& name, bool polyphonic=false) + : _parent(parent), _name(name), _polyphonic(polyphonic) + { + assert(parent == NULL || _name.length() > 0); + assert(_name.find("/") == string::npos); + assert(path().find("//") == string::npos); + } + GraphObjectImpl* _parent; std::string _name; bool _polyphonic; |