diff options
author | David Robillard <d@drobilla.net> | 2012-12-29 20:34:32 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-12-29 20:34:32 +0000 |
commit | 79275fc579c0dbe1ce4ca109edb95f2c1e0802a5 (patch) | |
tree | 72bb18ea61f485c47514a511dd3067c57aa2fb4b /src/server/events | |
parent | 9bdf223f830d3b430563e96d93efc073b1882e96 (diff) | |
download | ingen-79275fc579c0dbe1ce4ca109edb95f2c1e0802a5.tar.gz ingen-79275fc579c0dbe1ce4ca109edb95f2c1e0802a5.tar.bz2 ingen-79275fc579c0dbe1ce4ca109edb95f2c1e0802a5.zip |
"edge" => "arc".
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4897 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events')
-rw-r--r-- | src/server/events/Connect.cpp | 22 | ||||
-rw-r--r-- | src/server/events/Connect.hpp | 8 | ||||
-rw-r--r-- | src/server/events/Disconnect.cpp | 22 | ||||
-rw-r--r-- | src/server/events/Disconnect.hpp | 4 | ||||
-rw-r--r-- | src/server/events/DisconnectAll.cpp | 16 | ||||
-rw-r--r-- | src/server/events/Get.cpp | 6 |
6 files changed, 39 insertions, 39 deletions
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp index a496bbb4..0559ec39 100644 --- a/src/server/events/Connect.cpp +++ b/src/server/events/Connect.cpp @@ -20,9 +20,9 @@ #include "raul/Maid.hpp" #include "raul/Path.hpp" +#include "ArcImpl.hpp" #include "Broadcaster.hpp" #include "Connect.hpp" -#include "EdgeImpl.hpp" #include "Engine.hpp" #include "GraphImpl.hpp" #include "InputPort.hpp" @@ -82,12 +82,12 @@ Connect::pre_process() return Event::pre_process_done(PARENT_DIFFERS, _head_path); } - if (!EdgeImpl::can_connect(tail_output, _head)) { + if (!ArcImpl::can_connect(tail_output, _head)) { return Event::pre_process_done(TYPE_MISMATCH, _head_path); } if (tail_block->parent_graph() != head_block->parent_graph()) { - // Edge to a graph port from inside the graph + // Arc to a graph port from inside the graph assert(tail_block->parent() == head_block || head_block->parent() == tail_block); if (tail_block->parent() == head_block) { _graph = dynamic_cast<GraphImpl*>(head_block); @@ -95,25 +95,25 @@ Connect::pre_process() _graph = dynamic_cast<GraphImpl*>(tail_block); } } else if (tail_block == head_block && dynamic_cast<GraphImpl*>(tail_block)) { - // Edge from a graph input to a graph output (pass through) + // Arc from a graph input to a graph output (pass through) _graph = dynamic_cast<GraphImpl*>(tail_block); } else { - // Normal edge between blocks with the same parent + // Normal arc between blocks with the same parent _graph = tail_block->parent_graph(); } - if (_graph->has_edge(tail_output, _head)) { + if (_graph->has_arc(tail_output, _head)) { return Event::pre_process_done(EXISTS, _head_path); } - _edge = SharedPtr<EdgeImpl>(new EdgeImpl(tail_output, _head)); + _arc = SharedPtr<ArcImpl>(new ArcImpl(tail_output, _head)); rlock.release(); { Glib::RWLock::ReaderLock wlock(_engine.store()->lock()); - /* Need to be careful about graph port edges here and adding a + /* Need to be careful about graph port arcs here and adding a block's parent as a dependant/provider, or adding a graph as its own provider... */ @@ -122,8 +122,8 @@ Connect::pre_process() tail_block->dependants().push_back(head_block); } - _graph->add_edge(_edge); - _head->increment_num_edges(); + _graph->add_arc(_arc); + _head->increment_num_arcs(); } _buffers = new Raul::Array<BufferRef>(_head->poly()); @@ -143,7 +143,7 @@ void Connect::execute(ProcessContext& context) { if (!_status) { - _head->add_edge(context, _edge.get()); + _head->add_arc(context, _arc.get()); _engine.maid()->dispose(_head->set_buffers(context, _buffers)); _head->connect_buffers(); _graph->set_compiled_graph(_compiled_graph); diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp index 445ee80e..a84b9fcf 100644 --- a/src/server/events/Connect.hpp +++ b/src/server/events/Connect.hpp @@ -30,15 +30,15 @@ template <typename T> class Array; namespace Ingen { namespace Server { +class ArcImpl; class CompiledGraph; -class EdgeImpl; +class GraphImpl; class InputPort; class OutputPort; -class GraphImpl; namespace Events { -/** Make an Edge between two Ports. +/** Make an Arc between two Ports. * * \ingroup engine */ @@ -62,7 +62,7 @@ private: GraphImpl* _graph; InputPort* _head; CompiledGraph* _compiled_graph; - SharedPtr<EdgeImpl> _edge; + SharedPtr<ArcImpl> _arc; Raul::Array<BufferRef>* _buffers; }; diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index 645d89c5..829500f5 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -22,10 +22,10 @@ #include "raul/Maid.hpp" #include "raul/Path.hpp" +#include "ArcImpl.hpp" #include "Broadcaster.hpp" #include "Buffer.hpp" #include "DuplexPort.hpp" -#include "EdgeImpl.hpp" #include "Engine.hpp" #include "GraphImpl.hpp" #include "InputPort.hpp" @@ -62,7 +62,7 @@ Disconnect::Impl::Impl(Engine& e, , _src_output_port(s) , _dst_input_port(d) , _graph(graph) - , _edge(graph->remove_edge(_src_output_port, _dst_input_port)) + , _arc(graph->remove_arc(_src_output_port, _dst_input_port)) , _buffers(NULL) { ThreadManager::assert_thread(THREAD_PRE_PROCESS); @@ -86,9 +86,9 @@ Disconnect::Impl::Impl(Engine& e, } } - _dst_input_port->decrement_num_edges(); + _dst_input_port->decrement_num_arcs(); - if (_dst_input_port->num_edges() == 0) { + if (_dst_input_port->num_arcs() == 0) { _buffers = new Raul::Array<BufferRef>(_dst_input_port->poly()); _dst_input_port->get_buffers(*_engine.buffer_factory(), _buffers, @@ -134,7 +134,7 @@ Disconnect::pre_process() BlockImpl* const dst_block = head->parent_block(); if (src_block->parent_graph() != dst_block->parent_graph()) { - // Edge to a graph port from inside the graph + // Arc to a graph port from inside the graph assert(src_block->parent() == dst_block || dst_block->parent() == src_block); if (src_block->parent() == dst_block) { _graph = dynamic_cast<GraphImpl*>(dst_block); @@ -142,16 +142,16 @@ Disconnect::pre_process() _graph = dynamic_cast<GraphImpl*>(src_block); } } else if (src_block == dst_block && dynamic_cast<GraphImpl*>(src_block)) { - // Edge from a graph input to a graph output (pass through) + // Arc from a graph input to a graph output (pass through) _graph = dynamic_cast<GraphImpl*>(src_block); } else { - // Normal edge between blocks with the same parent + // Normal arc between blocks with the same parent _graph = src_block->parent_graph(); } if (!_graph) { return Event::pre_process_done(INTERNAL_ERROR, _head_path); - } else if (!_graph->has_edge(tail, head)) { + } else if (!_graph->has_arc(tail, head)) { return Event::pre_process_done(NOT_FOUND, _head_path); } @@ -173,9 +173,9 @@ Disconnect::pre_process() bool Disconnect::Impl::execute(ProcessContext& context, bool set_dst_buffers) { - EdgeImpl* const port_edge = - _dst_input_port->remove_edge(context, _src_output_port); - if (!port_edge) { + ArcImpl* const port_arc = + _dst_input_port->remove_arc(context, _src_output_port); + if (!port_arc) { return false; } diff --git a/src/server/events/Disconnect.hpp b/src/server/events/Disconnect.hpp index feb1d17f..b0c9408c 100644 --- a/src/server/events/Disconnect.hpp +++ b/src/server/events/Disconnect.hpp @@ -38,7 +38,7 @@ class PortImpl; namespace Events { -/** Remove an Edge between two Ports. +/** Remove an Arc between two Ports. * * \ingroup engine */ @@ -72,7 +72,7 @@ public: OutputPort* _src_output_port; InputPort* _dst_input_port; GraphImpl* _graph; - SharedPtr<EdgeImpl> _edge; + SharedPtr<ArcImpl> _arc; Raul::Array<BufferRef>* _buffers; }; diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp index b3e24e3f..c2475b45 100644 --- a/src/server/events/DisconnectAll.cpp +++ b/src/server/events/DisconnectAll.cpp @@ -24,9 +24,9 @@ #include "raul/Maid.hpp" #include "raul/Path.hpp" +#include "ArcImpl.hpp" #include "BlockImpl.hpp" #include "Broadcaster.hpp" -#include "EdgeImpl.hpp" #include "Engine.hpp" #include "GraphImpl.hpp" #include "InputPort.hpp" @@ -112,11 +112,11 @@ DisconnectAll::pre_process() } } - // Find set of edges to remove - std::set<EdgeImpl*> to_remove; - for (Node::Edges::const_iterator i = _parent->edges().begin(); - i != _parent->edges().end(); ++i) { - EdgeImpl* const c = (EdgeImpl*)i->second.get(); + // Find set of arcs to remove + std::set<ArcImpl*> to_remove; + for (Node::Arcs::const_iterator i = _parent->arcs().begin(); + i != _parent->arcs().end(); ++i) { + ArcImpl* const c = (ArcImpl*)i->second.get(); if (_block) { if (c->tail()->parent_block() == _block || c->head()->parent_block() == _block) { @@ -129,8 +129,8 @@ DisconnectAll::pre_process() } } - // Create disconnect events (which erases from _parent->edges()) - for (std::set<EdgeImpl*>::const_iterator i = to_remove.begin(); + // Create disconnect events (which erases from _parent->arcs()) + for (std::set<ArcImpl*>::const_iterator i = to_remove.begin(); i != to_remove.end(); ++i) { _impls.push_back(new Disconnect::Impl( _engine, _parent, diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp index b65b47bf..93af8bf2 100644 --- a/src/server/events/Get.cpp +++ b/src/server/events/Get.cpp @@ -119,9 +119,9 @@ send_graph(Interface* client, const GraphImpl* graph) send_port(client, graph->port_impl(i)); } - // Send edges - for (GraphImpl::Edges::const_iterator j = graph->edges().begin(); - j != graph->edges().end(); ++j) { + // Send arcs + for (GraphImpl::Arcs::const_iterator j = graph->arcs().begin(); + j != graph->arcs().end(); ++j) { client->connect(j->second->tail_path(), j->second->head_path()); } } |