From ba1f169967f64b9657074fba2de803b29829345c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 19 Aug 2012 02:57:26 +0000 Subject: GraphObject => Node git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4722 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/BlockImpl.cpp | 4 +- src/server/BlockImpl.hpp | 8 +-- src/server/Context.hpp | 4 +- src/server/Driver.hpp | 6 +- src/server/Engine.cpp | 2 +- src/server/Event.hpp | 4 +- src/server/GraphObjectImpl.cpp | 52 ----------------- src/server/GraphObjectImpl.hpp | 108 ------------------------------------ src/server/InputPort.cpp | 2 +- src/server/JackDriver.cpp | 2 +- src/server/LV2ResizeFeature.hpp | 2 +- src/server/NodeImpl.cpp | 52 +++++++++++++++++ src/server/NodeImpl.hpp | 108 ++++++++++++++++++++++++++++++++++++ src/server/OutputPort.cpp | 2 +- src/server/PortImpl.cpp | 2 +- src/server/PortImpl.hpp | 4 +- src/server/Worker.cpp | 2 +- src/server/Worker.hpp | 2 +- src/server/events/Connect.cpp | 4 +- src/server/events/CreateGraph.cpp | 2 +- src/server/events/CreatePort.cpp | 4 +- src/server/events/Delete.cpp | 4 +- src/server/events/Delta.cpp | 14 ++--- src/server/events/DisconnectAll.cpp | 10 ++-- src/server/events/DisconnectAll.hpp | 6 +- src/server/events/Get.cpp | 6 +- src/server/events/Get.hpp | 2 +- src/server/wscript | 2 +- 28 files changed, 209 insertions(+), 211 deletions(-) delete mode 100644 src/server/GraphObjectImpl.cpp delete mode 100644 src/server/GraphObjectImpl.hpp create mode 100644 src/server/NodeImpl.cpp create mode 100644 src/server/NodeImpl.hpp (limited to 'src/server') diff --git a/src/server/BlockImpl.cpp b/src/server/BlockImpl.cpp index 2ccb0e2f..6c09e9b7 100644 --- a/src/server/BlockImpl.cpp +++ b/src/server/BlockImpl.cpp @@ -38,7 +38,7 @@ BlockImpl::BlockImpl(PluginImpl* plugin, bool polyphonic, GraphImpl* parent, SampleRate srate) - : GraphObjectImpl(plugin->uris(), parent, symbol) + : NodeImpl(plugin->uris(), parent, symbol) , _plugin(plugin) , _ports(NULL) , _context(Context::AUDIO) @@ -64,7 +64,7 @@ BlockImpl::~BlockImpl() delete _ports; } -GraphObject* +Node* BlockImpl::port(uint32_t index) const { return (*_ports)[index]; diff --git a/src/server/BlockImpl.hpp b/src/server/BlockImpl.hpp index 12318d60..bb4fb8e9 100644 --- a/src/server/BlockImpl.hpp +++ b/src/server/BlockImpl.hpp @@ -26,7 +26,7 @@ #include "BufferRef.hpp" #include "Context.hpp" -#include "GraphObjectImpl.hpp" +#include "NodeImpl.hpp" #include "PortType.hpp" #include "types.hpp" @@ -55,7 +55,7 @@ class ProcessContext; * * \ingroup engine */ -class BlockImpl : public GraphObjectImpl +class BlockImpl : public NodeImpl , public boost::intrusive::slist_base_hook<> // In GraphImpl { public: @@ -108,8 +108,8 @@ public: uint32_t port_num, BufferRef buf); - virtual GraphObject* port(uint32_t index) const; - virtual PortImpl* port_impl(uint32_t index) const { return (*_ports)[index]; } + virtual Node* port(uint32_t index) const; + virtual PortImpl* port_impl(uint32_t index) const { return (*_ports)[index]; } /** Blocks that are connected to this Block's inputs. */ std::list& providers() { return _providers; } diff --git a/src/server/Context.hpp b/src/server/Context.hpp index b5941dfc..cabfcc89 100644 --- a/src/server/Context.hpp +++ b/src/server/Context.hpp @@ -31,8 +31,8 @@ class PortImpl; /** Graph execution context. * - * This is used to pass whatever information a GraphObject might need to - * process; such as the current time, a sink for generated events, etc. + * This is used to pass whatever information a Node might need to process; such + * as the current time, a sink for generated events, etc. * * Note the logical distinction between nframes (jack relative) and start/end * (timeline relative). If transport speed != 1.0, then end-start != nframes diff --git a/src/server/Driver.hpp b/src/server/Driver.hpp index e5c62623..a34fc6f5 100644 --- a/src/server/Driver.hpp +++ b/src/server/Driver.hpp @@ -34,10 +34,8 @@ class EnginePort; /** Engine driver base class. * - * A Driver is, from the perspective of GraphObjects (blocks, graphs, ports) - * an interface for managing system ports. An implementation of Driver - * basically needs to manage EnginePorts, and handle writing/reading data - * to/from them. + * A Driver is responsible for managing system ports, and possibly running the + * audio graph. * * \ingroup engine */ diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index 7c053884..deb1ff50 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -81,7 +81,7 @@ Engine::~Engine() const SharedPtr s = this->store(); if (s) { for (Store::iterator i = s->begin(); i != s->end(); ++i) { - if (!PtrCast(i->second)->parent()) { + if (!PtrCast(i->second)->parent()) { i->second.reset(); } } diff --git a/src/server/Event.hpp b/src/server/Event.hpp index d627b5dc..7e4a1cc1 100644 --- a/src/server/Event.hpp +++ b/src/server/Event.hpp @@ -23,8 +23,8 @@ #include "raul/Path.hpp" #include "raul/SharedPtr.hpp" -#include "ingen/GraphObject.hpp" #include "ingen/Interface.hpp" +#include "ingen/Node.hpp" #include "ingen/Status.hpp" #include "types.hpp" @@ -108,7 +108,7 @@ protected: } inline bool pre_process_done(Status st, const Raul::Path& subject) { - return pre_process_done(st, GraphObject::path_to_uri(subject)); + return pre_process_done(st, Node::path_to_uri(subject)); } /** Respond to the originating client. */ diff --git a/src/server/GraphObjectImpl.cpp b/src/server/GraphObjectImpl.cpp deleted file mode 100644 index 2df7943f..00000000 --- a/src/server/GraphObjectImpl.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - This file is part of Ingen. - Copyright 2007-2012 David Robillard - - Ingen is free software: you can redistribute it and/or modify it under the - terms of the GNU Affero General Public License as published by the Free - Software Foundation, either version 3 of the License, or any later version. - - Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU Affero General Public License for details. - - You should have received a copy of the GNU Affero General Public License - along with Ingen. If not, see . -*/ - -#include "GraphImpl.hpp" -#include "GraphObjectImpl.hpp" -#include "ThreadManager.hpp" - -using namespace std; - -namespace Ingen { -namespace Server { - -GraphObjectImpl::GraphObjectImpl(Ingen::URIs& uris, - GraphObjectImpl* parent, - const Raul::Symbol& symbol) - : GraphObject(uris, parent ? parent->path().child(symbol) : Raul::Path("/")) - , _parent(parent) - , _path(parent ? parent->path().child(symbol) : Raul::Path("/")) - , _symbol(symbol) -{ -} - -const Raul::Atom& -GraphObjectImpl::get_property(const Raul::URI& key) const -{ - ThreadManager::assert_not_thread(THREAD_PROCESS); - static const Raul::Atom null_atom; - Resource::Properties::const_iterator i = properties().find(key); - return (i != properties().end()) ? i->second : null_atom; -} - -GraphImpl* -GraphObjectImpl::parent_graph() const -{ - return dynamic_cast((BlockImpl*)_parent); -} - -} // namespace Server -} // namespace Ingen diff --git a/src/server/GraphObjectImpl.hpp b/src/server/GraphObjectImpl.hpp deleted file mode 100644 index 07a59727..00000000 --- a/src/server/GraphObjectImpl.hpp +++ /dev/null @@ -1,108 +0,0 @@ -/* - This file is part of Ingen. - Copyright 2007-2012 David Robillard - - Ingen is free software: you can redistribute it and/or modify it under the - terms of the GNU Affero General Public License as published by the Free - Software Foundation, either version 3 of the License, or any later version. - - Ingen is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU Affero General Public License for details. - - You should have received a copy of the GNU Affero General Public License - along with Ingen. If not, see . -*/ - -#ifndef INGEN_ENGINE_GRAPHOBJECTIMPL_HPP -#define INGEN_ENGINE_GRAPHOBJECTIMPL_HPP - -#include -#include -#include - -#include "ingen/GraphObject.hpp" -#include "ingen/Resource.hpp" -#include "raul/Deletable.hpp" -#include "raul/Path.hpp" -#include "raul/SharedPtr.hpp" - -namespace Raul { class Maid; } - -namespace Ingen { - -namespace Shared { class URIs; } - -namespace Server { - -class BufferFactory; -class Context; -class GraphImpl; -class ProcessContext; - -/** An object on the audio graph (a Graph, Block, or Port). - * - * Each of these is a Raul::Deletable and so can be deleted in a realtime safe - * way from anywhere, and they all have a map of variable for clients to store - * arbitrary values in (which the engine puts no significance to whatsoever). - * - * \ingroup engine - */ -class GraphObjectImpl : public GraphObject -{ -public: - virtual ~GraphObjectImpl() {} - - const Raul::Symbol& symbol() const { return _symbol; } - - GraphObject* graph_parent() const { return _parent; } - GraphObjectImpl* parent() const { return _parent; } - - /** Rename */ - virtual void set_path(const Raul::Path& new_path) { - _path = new_path; - const char* const new_sym = new_path.symbol(); - if (new_sym[0] != '\0') { - _symbol = Raul::Symbol(new_sym); - } - set_uri(GraphObject::path_to_uri(new_path)); - } - - const Raul::Atom& get_property(const Raul::URI& key) const; - - /** The Graph this object is a child of. */ - virtual GraphImpl* parent_graph() const; - - const Raul::Path& path() const { return _path; } - - /** Prepare for a new (external) polyphony value. - * - * Preprocessor thread, poly is actually applied by apply_poly. - * \return true on success. - */ - virtual bool prepare_poly(BufferFactory& bufs, uint32_t poly) = 0; - - /** Apply a new (external) polyphony value. - * - * Audio thread. - * - * \param poly Must be <= the most recent value passed to prepare_poly. - * \param maid Any objects no longer needed will be pushed to this - */ - virtual bool apply_poly( - ProcessContext& context, Raul::Maid& maid, uint32_t poly) = 0; - -protected: - GraphObjectImpl(Ingen::URIs& uris, - GraphObjectImpl* parent, - const Raul::Symbol& symbol); - - GraphObjectImpl* _parent; - Raul::Path _path; - Raul::Symbol _symbol; -}; - -} // namespace Server -} // namespace Ingen - -#endif // INGEN_ENGINE_GRAPHOBJECTIMPL_HPP diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp index e2f97896..49ffaf2d 100644 --- a/src/server/InputPort.cpp +++ b/src/server/InputPort.cpp @@ -50,7 +50,7 @@ InputPort::InputPort(BufferFactory& bufs, { const Ingen::URIs& uris = bufs.uris(); - if (parent->graph_type() != GraphObject::GRAPH) { + if (parent->graph_type() != Node::GRAPH) { add_property(uris.rdf_type, uris.lv2_InputPort); } diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp index 5f1ba1d3..6da4e279 100644 --- a/src/server/JackDriver.cpp +++ b/src/server/JackDriver.cpp @@ -409,7 +409,7 @@ JackDriver::_session_cb(jack_session_event_t* event) SharedPtr serialiser = _engine.world()->serialiser(); if (serialiser) { - SharedPtr root(_engine.root_graph(), NullDeleter); + SharedPtr root(_engine.root_graph(), NullDeleter); serialiser->write_bundle(root, string("file://") + event->session_dir); } diff --git a/src/server/LV2ResizeFeature.hpp b/src/server/LV2ResizeFeature.hpp index 5b385a2f..47f30e41 100644 --- a/src/server/LV2ResizeFeature.hpp +++ b/src/server/LV2ResizeFeature.hpp @@ -47,7 +47,7 @@ struct ResizeFeature : public Ingen::LV2Features::Feature { free(feature); } - SharedPtr feature(World* w, GraphObject* n) { + SharedPtr feature(World* w, Node* n) { BlockImpl* block = dynamic_cast(n); if (!block) return SharedPtr(); diff --git a/src/server/NodeImpl.cpp b/src/server/NodeImpl.cpp new file mode 100644 index 00000000..3fe7a2a4 --- /dev/null +++ b/src/server/NodeImpl.cpp @@ -0,0 +1,52 @@ +/* + This file is part of Ingen. + Copyright 2007-2012 David Robillard + + Ingen is free software: you can redistribute it and/or modify it under the + terms of the GNU Affero General Public License as published by the Free + Software Foundation, either version 3 of the License, or any later version. + + Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU Affero General Public License for details. + + You should have received a copy of the GNU Affero General Public License + along with Ingen. If not, see . +*/ + +#include "GraphImpl.hpp" +#include "NodeImpl.hpp" +#include "ThreadManager.hpp" + +using namespace std; + +namespace Ingen { +namespace Server { + +NodeImpl::NodeImpl(Ingen::URIs& uris, + NodeImpl* parent, + const Raul::Symbol& symbol) + : Node(uris, parent ? parent->path().child(symbol) : Raul::Path("/")) + , _parent(parent) + , _path(parent ? parent->path().child(symbol) : Raul::Path("/")) + , _symbol(symbol) +{ +} + +const Raul::Atom& +NodeImpl::get_property(const Raul::URI& key) const +{ + ThreadManager::assert_not_thread(THREAD_PROCESS); + static const Raul::Atom null_atom; + Resource::Properties::const_iterator i = properties().find(key); + return (i != properties().end()) ? i->second : null_atom; +} + +GraphImpl* +NodeImpl::parent_graph() const +{ + return dynamic_cast((BlockImpl*)_parent); +} + +} // namespace Server +} // namespace Ingen diff --git a/src/server/NodeImpl.hpp b/src/server/NodeImpl.hpp new file mode 100644 index 00000000..937d4dea --- /dev/null +++ b/src/server/NodeImpl.hpp @@ -0,0 +1,108 @@ +/* + This file is part of Ingen. + Copyright 2007-2012 David Robillard + + Ingen is free software: you can redistribute it and/or modify it under the + terms of the GNU Affero General Public License as published by the Free + Software Foundation, either version 3 of the License, or any later version. + + Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU Affero General Public License for details. + + You should have received a copy of the GNU Affero General Public License + along with Ingen. If not, see . +*/ + +#ifndef INGEN_ENGINE_NODEIMPLIMPL_HPP +#define INGEN_ENGINE_NODEIMPLIMPL_HPP + +#include +#include +#include + +#include "ingen/Node.hpp" +#include "ingen/Resource.hpp" +#include "raul/Deletable.hpp" +#include "raul/Path.hpp" +#include "raul/SharedPtr.hpp" + +namespace Raul { class Maid; } + +namespace Ingen { + +namespace Shared { class URIs; } + +namespace Server { + +class BufferFactory; +class Context; +class GraphImpl; +class ProcessContext; + +/** An object on the audio graph (a Graph, Block, or Port). + * + * Each of these is a Raul::Deletable and so can be deleted in a realtime safe + * way from anywhere, and they all have a map of variable for clients to store + * arbitrary values in (which the engine puts no significance to whatsoever). + * + * \ingroup engine + */ +class NodeImpl : public Node +{ +public: + virtual ~NodeImpl() {} + + const Raul::Symbol& symbol() const { return _symbol; } + + Node* graph_parent() const { return _parent; } + NodeImpl* parent() const { return _parent; } + + /** Rename */ + virtual void set_path(const Raul::Path& new_path) { + _path = new_path; + const char* const new_sym = new_path.symbol(); + if (new_sym[0] != '\0') { + _symbol = Raul::Symbol(new_sym); + } + set_uri(Node::path_to_uri(new_path)); + } + + const Raul::Atom& get_property(const Raul::URI& key) const; + + /** The Graph this object is a child of. */ + virtual GraphImpl* parent_graph() const; + + const Raul::Path& path() const { return _path; } + + /** Prepare for a new (external) polyphony value. + * + * Preprocessor thread, poly is actually applied by apply_poly. + * \return true on success. + */ + virtual bool prepare_poly(BufferFactory& bufs, uint32_t poly) = 0; + + /** Apply a new (external) polyphony value. + * + * Audio thread. + * + * \param poly Must be <= the most recent value passed to prepare_poly. + * \param maid Any objects no longer needed will be pushed to this + */ + virtual bool apply_poly( + ProcessContext& context, Raul::Maid& maid, uint32_t poly) = 0; + +protected: + NodeImpl(Ingen::URIs& uris, + NodeImpl* parent, + const Raul::Symbol& symbol); + + NodeImpl* _parent; + Raul::Path _path; + Raul::Symbol _symbol; +}; + +} // namespace Server +} // namespace Ingen + +#endif // INGEN_ENGINE_NODEIMPLIMPL_HPP diff --git a/src/server/OutputPort.cpp b/src/server/OutputPort.cpp index 48f7eb22..4596c68f 100644 --- a/src/server/OutputPort.cpp +++ b/src/server/OutputPort.cpp @@ -38,7 +38,7 @@ OutputPort::OutputPort(BufferFactory& bufs, size_t buffer_size) : PortImpl(bufs, parent, symbol, index, poly, type, buffer_type, value, buffer_size) { - if (parent->graph_type() != GraphObject::GRAPH) { + if (parent->graph_type() != Node::GRAPH) { add_property(bufs.uris().rdf_type, bufs.uris().lv2_OutputPort); } diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp index bd088913..a5fe8fe6 100644 --- a/src/server/PortImpl.cpp +++ b/src/server/PortImpl.cpp @@ -41,7 +41,7 @@ PortImpl::PortImpl(BufferFactory& bufs, LV2_URID buffer_type, const Raul::Atom& value, size_t buffer_size) - : GraphObjectImpl(bufs.uris(), block, name) + : NodeImpl(bufs.uris(), block, name) , _bufs(bufs) , _index(index) , _poly(poly) diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp index d7aed3ff..428a628b 100644 --- a/src/server/PortImpl.hpp +++ b/src/server/PortImpl.hpp @@ -23,7 +23,7 @@ #include "raul/Atom.hpp" #include "BufferRef.hpp" -#include "GraphObjectImpl.hpp" +#include "NodeImpl.hpp" #include "PortType.hpp" #include "ProcessContext.hpp" #include "types.hpp" @@ -40,7 +40,7 @@ class BufferFactory; * * \ingroup engine */ -class PortImpl : public GraphObjectImpl +class PortImpl : public NodeImpl { public: ~PortImpl(); diff --git a/src/server/Worker.cpp b/src/server/Worker.cpp index 9fbc4825..68300a16 100644 --- a/src/server/Worker.cpp +++ b/src/server/Worker.cpp @@ -80,7 +80,7 @@ delete_feature(LV2_Feature* feature) } SharedPtr -Worker::Schedule::feature(World* world, GraphObject* n) +Worker::Schedule::feature(World* world, Node* n) { LV2Block* block = dynamic_cast(n); if (!block) { diff --git a/src/server/Worker.hpp b/src/server/Worker.hpp index f8c9216e..9b69edb2 100644 --- a/src/server/Worker.hpp +++ b/src/server/Worker.hpp @@ -38,7 +38,7 @@ public: ~Worker(); struct Schedule : public LV2Features::Feature { - SharedPtr feature(World* world, GraphObject* n); + SharedPtr feature(World* world, Node* n); }; LV2_Worker_Status request(LV2Block* block, diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp index eeaa1904..5e749628 100644 --- a/src/server/events/Connect.cpp +++ b/src/server/events/Connect.cpp @@ -54,12 +54,12 @@ Connect::pre_process() { Glib::RWLock::ReaderLock rlock(_engine.store()->lock()); - GraphObject* tail = _engine.store()->get(_tail_path); + Node* tail = _engine.store()->get(_tail_path); if (!tail) { return Event::pre_process_done(NOT_FOUND, _tail_path); } - GraphObject* head = _engine.store()->get(_head_path); + Node* head = _engine.store()->get(_head_path); if (!head) { return Event::pre_process_done(NOT_FOUND, _head_path); } diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp index bfe08043..5be9d19e 100644 --- a/src/server/events/CreateGraph.cpp +++ b/src/server/events/CreateGraph.cpp @@ -114,7 +114,7 @@ void CreateGraph::post_process() { if (!respond()) { - _engine.broadcaster()->put(GraphObject::path_to_uri(_path), _update); + _engine.broadcaster()->put(Node::path_to_uri(_path), _update); } } diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index a32faaee..58402014 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -97,7 +97,7 @@ CreatePort::pre_process() return Event::pre_process_done(_status, _path); } - GraphObject* parent = _engine.store()->get(_path.parent()); + Node* parent = _engine.store()->get(_path.parent()); if (!parent) { return Event::pre_process_done(PARENT_NOT_FOUND, _path.parent()); } @@ -185,7 +185,7 @@ void CreatePort::post_process() { if (!respond()) { - _engine.broadcaster()->put(GraphObject::path_to_uri(_path), _update); + _engine.broadcaster()->put(Node::path_to_uri(_path), _update); } delete _old_ports_array; diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp index a6207ba1..e4878f4e 100644 --- a/src/server/events/Delete.cpp +++ b/src/server/events/Delete.cpp @@ -47,8 +47,8 @@ Delete::Delete(Engine& engine, , _disconnect_event(NULL) , _lock(engine.store()->lock(), Glib::NOT_LOCK) { - if (GraphObject::uri_is_path(uri)) { - _path = GraphObject::uri_to_path(uri); + if (Node::uri_is_path(uri)) { + _path = Node::uri_to_path(uri); } } diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 06bd150c..6c935ce2 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -105,13 +105,13 @@ Delta::pre_process() { typedef Properties::const_iterator iterator; - const bool is_graph_object = GraphObject::uri_is_path(_subject); + const bool is_graph_object = Node::uri_is_path(_subject); // Take a writer lock while we modify the store Glib::RWLock::WriterLock lock(_engine.store()->lock()); _object = is_graph_object - ? static_cast(_engine.store()->get(GraphObject::uri_to_path(_subject))) + ? static_cast(_engine.store()->get(Node::uri_to_path(_subject))) : static_cast(_engine.block_factory()->plugin(_subject)); if (!_object && (!is_graph_object || !_create)) { @@ -121,7 +121,7 @@ Delta::pre_process() const Ingen::URIs& uris = _engine.world()->uris(); if (is_graph_object && !_object) { - Raul::Path path(GraphObject::uri_to_path(_subject)); + Raul::Path path(Node::uri_to_path(_subject)); bool is_graph = false, is_block = false, is_port = false, is_output = false; Ingen::Resource::type(uris, _properties, is_graph, is_block, is_port, is_output); @@ -147,7 +147,7 @@ Delta::pre_process() _types.reserve(_properties.size()); - GraphObjectImpl* obj = dynamic_cast(_object); + NodeImpl* obj = dynamic_cast(_object); for (Properties::const_iterator p = _remove.begin(); p != _remove.end(); ++p) { const Raul::URI& key = p->first; @@ -270,9 +270,9 @@ Delta::execute(ProcessContext& context) (*i)->execute(context); } - GraphObjectImpl* const object = dynamic_cast(_object); - BlockImpl* const block = dynamic_cast(_object); - PortImpl* const port = dynamic_cast(_object); + NodeImpl* const object = dynamic_cast(_object); + BlockImpl* const block = dynamic_cast(_object); + PortImpl* const port = dynamic_cast(_object); std::vector::const_iterator t = _types.begin(); for (Properties::const_iterator p = _properties.begin(); p != _properties.end(); ++p, ++t) { diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp index dbff2ab3..019193e6 100644 --- a/src/server/events/DisconnectAll.cpp +++ b/src/server/events/DisconnectAll.cpp @@ -59,9 +59,9 @@ DisconnectAll::DisconnectAll(Engine& engine, /** Internal version for use by other events. */ -DisconnectAll::DisconnectAll(Engine& engine, - GraphImpl* parent, - GraphObject* object) +DisconnectAll::DisconnectAll(Engine& engine, + GraphImpl* parent, + Node* object) : Event(engine) , _parent_path(parent->path()) , _path(object->path()) @@ -92,7 +92,7 @@ DisconnectAll::pre_process() return Event::pre_process_done(PARENT_NOT_FOUND, _parent_path); } - GraphObjectImpl* const object = dynamic_cast( + NodeImpl* const object = dynamic_cast( _engine.store()->get(_path)); if (!object) { return Event::pre_process_done(NOT_FOUND, _path); @@ -112,7 +112,7 @@ DisconnectAll::pre_process() // Find set of edges to remove std::set to_remove; - for (GraphObject::Edges::const_iterator i = _parent->edges().begin(); + for (Node::Edges::const_iterator i = _parent->edges().begin(); i != _parent->edges().end(); ++i) { EdgeImpl* const c = (EdgeImpl*)i->second.get(); if (_block) { diff --git a/src/server/events/DisconnectAll.hpp b/src/server/events/DisconnectAll.hpp index 8a785722..7db53bfa 100644 --- a/src/server/events/DisconnectAll.hpp +++ b/src/server/events/DisconnectAll.hpp @@ -50,9 +50,9 @@ public: const Raul::Path& parent, const Raul::Path& object); - DisconnectAll(Engine& engine, - GraphImpl* parent, - GraphObject* object); + DisconnectAll(Engine& engine, + GraphImpl* parent, + Node* object); ~DisconnectAll(); diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp index c452328e..1493f161 100644 --- a/src/server/events/Get.cpp +++ b/src/server/events/Get.cpp @@ -16,8 +16,8 @@ #include -#include "ingen/GraphObject.hpp" #include "ingen/Interface.hpp" +#include "ingen/Node.hpp" #include "ingen/Store.hpp" #include "BlockImpl.hpp" @@ -60,8 +60,8 @@ Get::pre_process() return Event::pre_process_done(SUCCESS); } else if (_uri == "ingen:engine") { return Event::pre_process_done(SUCCESS); - } else if (GraphObject::uri_is_path(_uri)) { - _object = _engine.store()->get(GraphObject::uri_to_path(_uri)); + } else if (Node::uri_is_path(_uri)) { + _object = _engine.store()->get(Node::uri_to_path(_uri)); return Event::pre_process_done(_object ? SUCCESS : NOT_FOUND, _uri); } else { _plugin = _engine.block_factory()->plugin(_uri); diff --git a/src/server/events/Get.hpp b/src/server/events/Get.hpp index 7b33304e..12f48b09 100644 --- a/src/server/events/Get.hpp +++ b/src/server/events/Get.hpp @@ -49,7 +49,7 @@ public: private: const Raul::URI _uri; - const GraphObject* _object; + const Node* _object; const PluginImpl* _plugin; BlockFactory::Plugins _plugins; Glib::RWLock::ReaderLock _lock; diff --git a/src/server/wscript b/src/server/wscript index b6ec6e98..d548a77c 100644 --- a/src/server/wscript +++ b/src/server/wscript @@ -15,12 +15,12 @@ def build(bld): Engine.cpp EventWriter.cpp GraphImpl.cpp - GraphObjectImpl.cpp InputPort.cpp InternalPlugin.cpp LV2Block.cpp LV2Info.cpp LV2Plugin.cpp + NodeImpl.cpp OutputPort.cpp PortImpl.cpp PostProcessor.cpp -- cgit v1.2.1