diff options
Diffstat (limited to 'src/server')
26 files changed, 71 insertions, 73 deletions
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<BlockImpl*>& 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<Store> s = this->store(); if (s) { for (Store::iterator i = s->begin(); i != s->end(); ++i) { - if (!PtrCast<GraphObjectImpl>(i->second)->parent()) { + if (!PtrCast<NodeImpl>(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/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<Serialisation::Serialiser> serialiser = _engine.world()->serialiser(); if (serialiser) { - SharedPtr<GraphObject> root(_engine.root_graph(), NullDeleter<GraphObject>); + SharedPtr<Node> root(_engine.root_graph(), NullDeleter<Node>); 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<LV2_Feature> feature(World* w, GraphObject* n) { + SharedPtr<LV2_Feature> feature(World* w, Node* n) { BlockImpl* block = dynamic_cast<BlockImpl*>(n); if (!block) return SharedPtr<LV2_Feature>(); diff --git a/src/server/GraphObjectImpl.cpp b/src/server/NodeImpl.cpp index 2df7943f..3fe7a2a4 100644 --- a/src/server/GraphObjectImpl.cpp +++ b/src/server/NodeImpl.cpp @@ -15,7 +15,7 @@ */ #include "GraphImpl.hpp" -#include "GraphObjectImpl.hpp" +#include "NodeImpl.hpp" #include "ThreadManager.hpp" using namespace std; @@ -23,10 +23,10 @@ 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("/")) +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) @@ -34,7 +34,7 @@ GraphObjectImpl::GraphObjectImpl(Ingen::URIs& uris, } const Raul::Atom& -GraphObjectImpl::get_property(const Raul::URI& key) const +NodeImpl::get_property(const Raul::URI& key) const { ThreadManager::assert_not_thread(THREAD_PROCESS); static const Raul::Atom null_atom; @@ -43,7 +43,7 @@ GraphObjectImpl::get_property(const Raul::URI& key) const } GraphImpl* -GraphObjectImpl::parent_graph() const +NodeImpl::parent_graph() const { return dynamic_cast<GraphImpl*>((BlockImpl*)_parent); } diff --git a/src/server/GraphObjectImpl.hpp b/src/server/NodeImpl.hpp index 07a59727..937d4dea 100644 --- a/src/server/GraphObjectImpl.hpp +++ b/src/server/NodeImpl.hpp @@ -14,14 +14,14 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef INGEN_ENGINE_GRAPHOBJECTIMPL_HPP -#define INGEN_ENGINE_GRAPHOBJECTIMPL_HPP +#ifndef INGEN_ENGINE_NODEIMPLIMPL_HPP +#define INGEN_ENGINE_NODEIMPLIMPL_HPP #include <cassert> #include <cstddef> #include <map> -#include "ingen/GraphObject.hpp" +#include "ingen/Node.hpp" #include "ingen/Resource.hpp" #include "raul/Deletable.hpp" #include "raul/Path.hpp" @@ -48,15 +48,15 @@ class ProcessContext; * * \ingroup engine */ -class GraphObjectImpl : public GraphObject +class NodeImpl : public Node { public: - virtual ~GraphObjectImpl() {} + virtual ~NodeImpl() {} const Raul::Symbol& symbol() const { return _symbol; } - GraphObject* graph_parent() const { return _parent; } - GraphObjectImpl* parent() const { return _parent; } + Node* graph_parent() const { return _parent; } + NodeImpl* parent() const { return _parent; } /** Rename */ virtual void set_path(const Raul::Path& new_path) { @@ -65,7 +65,7 @@ public: if (new_sym[0] != '\0') { _symbol = Raul::Symbol(new_sym); } - set_uri(GraphObject::path_to_uri(new_path)); + set_uri(Node::path_to_uri(new_path)); } const Raul::Atom& get_property(const Raul::URI& key) const; @@ -93,16 +93,16 @@ public: ProcessContext& context, Raul::Maid& maid, uint32_t poly) = 0; protected: - GraphObjectImpl(Ingen::URIs& uris, - GraphObjectImpl* parent, - const Raul::Symbol& symbol); + NodeImpl(Ingen::URIs& uris, + NodeImpl* parent, + const Raul::Symbol& symbol); - GraphObjectImpl* _parent; - Raul::Path _path; - Raul::Symbol _symbol; + NodeImpl* _parent; + Raul::Path _path; + Raul::Symbol _symbol; }; } // namespace Server } // namespace Ingen -#endif // INGEN_ENGINE_GRAPHOBJECTIMPL_HPP +#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<LV2_Feature> -Worker::Schedule::feature(World* world, GraphObject* n) +Worker::Schedule::feature(World* world, Node* n) { LV2Block* block = dynamic_cast<LV2Block*>(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<LV2_Feature> feature(World* world, GraphObject* n); + SharedPtr<LV2_Feature> 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<Ingen::Resource*>(_engine.store()->get(GraphObject::uri_to_path(_subject))) + ? static_cast<Ingen::Resource*>(_engine.store()->get(Node::uri_to_path(_subject))) : static_cast<Ingen::Resource*>(_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<GraphObjectImpl*>(_object); + NodeImpl* obj = dynamic_cast<NodeImpl*>(_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<GraphObjectImpl*>(_object); - BlockImpl* const block = dynamic_cast<BlockImpl*>(_object); - PortImpl* const port = dynamic_cast<PortImpl*>(_object); + NodeImpl* const object = dynamic_cast<NodeImpl*>(_object); + BlockImpl* const block = dynamic_cast<BlockImpl*>(_object); + PortImpl* const port = dynamic_cast<PortImpl*>(_object); std::vector<SpecialType>::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<GraphObjectImpl*>( + NodeImpl* const object = dynamic_cast<NodeImpl*>( _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<EdgeImpl*> 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 <utility> -#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 |