diff options
author | David Robillard <d@drobilla.net> | 2012-07-30 23:00:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-07-30 23:00:13 +0000 |
commit | 0e1bf6ddfc77866ff6477a3f394c030c2a5e1b39 (patch) | |
tree | afcba1a0ba16837f7b6f1a4822b7164deccb61e7 /src/shared | |
parent | 921881813d7fb2e46a0e65d1e888f6cd9a928945 (diff) | |
download | ingen-0e1bf6ddfc77866ff6477a3f394c030c2a5e1b39.tar.gz ingen-0e1bf6ddfc77866ff6477a3f394c030c2a5e1b39.tar.bz2 ingen-0e1bf6ddfc77866ff6477a3f394c030c2a5e1b39.zip |
Eliminate pure virtual base classes Patch, Node, and Port, and the virtual inheritance they imposed.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4576 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/Builder.cpp | 8 | ||||
-rw-r--r-- | src/shared/LV2Features.cpp | 2 | ||||
-rw-r--r-- | src/shared/Store.cpp | 10 |
3 files changed, 8 insertions, 12 deletions
diff --git a/src/shared/Builder.cpp b/src/shared/Builder.cpp index 944b00ce..dadd2989 100644 --- a/src/shared/Builder.cpp +++ b/src/shared/Builder.cpp @@ -15,6 +15,7 @@ */ #include "ingen/Edge.hpp" +#include "ingen/GraphObject.hpp" #include "ingen/Interface.hpp" #include "ingen/shared/Builder.hpp" #include "ingen/shared/URIs.hpp" @@ -41,10 +42,9 @@ Builder::build(SharedPtr<const GraphObject> object) void Builder::connect(SharedPtr<const GraphObject> object) { - SharedPtr<const Patch> patch = PtrCast<const Patch>(object); - if (patch) { - for (Patch::Edges::const_iterator i = patch->edges().begin(); - i != patch->edges().end(); ++i) { + if (object->graph_type() == GraphObject::PATCH) { + for (GraphObject::Edges::const_iterator i = object->edges().begin(); + i != object->edges().end(); ++i) { _interface.connect(i->second->tail_path(), i->second->head_path()); } return; diff --git a/src/shared/LV2Features.cpp b/src/shared/LV2Features.cpp index 24b3f6fa..7061ff76 100644 --- a/src/shared/LV2Features.cpp +++ b/src/shared/LV2Features.cpp @@ -49,7 +49,7 @@ LV2Features::FeatureArray::~FeatureArray() } SharedPtr<LV2Features::FeatureArray> -LV2Features::lv2_features(Shared::World* world, Node* node) const +LV2Features::lv2_features(Shared::World* world, GraphObject* node) const { FeatureArray::FeatureVector vec; for (Features::const_iterator f = _features.begin(); f != _features.end(); ++f) { diff --git a/src/shared/Store.cpp b/src/shared/Store.cpp index 821322e7..ad950fd7 100644 --- a/src/shared/Store.cpp +++ b/src/shared/Store.cpp @@ -17,8 +17,7 @@ #include <sstream> #include <string> -#include "ingen/Node.hpp" -#include "ingen/Port.hpp" +#include "ingen/GraphObject.hpp" #include "ingen/shared/Store.hpp" #include "raul/PathTable.hpp" #include "raul/TableImpl.hpp" @@ -39,11 +38,8 @@ Store::add(GraphObject* o) insert(make_pair(o->path(), o)); - Node* node = dynamic_cast<Node*>(o); - if (node) { - for (uint32_t i=0; i < node->num_ports(); ++i) { - add(node->port(i)); - } + for (uint32_t i = 0; i < o->num_ports(); ++i) { + add(o->port(i)); } } |