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 | |
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')
-rw-r--r-- | src/server/ArcImpl.cpp (renamed from src/server/EdgeImpl.cpp) | 16 | ||||
-rw-r--r-- | src/server/ArcImpl.hpp (renamed from src/server/EdgeImpl.hpp) | 20 | ||||
-rw-r--r-- | src/server/GraphImpl.cpp | 30 | ||||
-rw-r--r-- | src/server/GraphImpl.hpp | 12 | ||||
-rw-r--r-- | src/server/InputPort.cpp | 82 | ||||
-rw-r--r-- | src/server/InputPort.hpp | 28 | ||||
-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 | ||||
-rw-r--r-- | src/server/wscript | 2 |
13 files changed, 134 insertions, 134 deletions
diff --git a/src/server/EdgeImpl.cpp b/src/server/ArcImpl.cpp index 08096d45..debd2c1e 100644 --- a/src/server/EdgeImpl.cpp +++ b/src/server/ArcImpl.cpp @@ -17,10 +17,10 @@ #include "ingen/URIs.hpp" #include "lv2/lv2plug.in/ns/ext/atom/util.h" +#include "ArcImpl.hpp" #include "BlockImpl.hpp" #include "Buffer.hpp" #include "BufferFactory.hpp" -#include "EdgeImpl.hpp" #include "Engine.hpp" #include "InputPort.hpp" #include "OutputPort.hpp" @@ -29,12 +29,12 @@ namespace Ingen { namespace Server { -/** Constructor for a edge from a block's output port. +/** Constructor for an arc from a block's output port. * * This handles both polyphonic and monophonic blocks, transparently to the * user (InputPort). */ -EdgeImpl::EdgeImpl(PortImpl* tail, PortImpl* head) +ArcImpl::ArcImpl(PortImpl* tail, PortImpl* head) : _tail(tail) , _head(head) { @@ -43,19 +43,19 @@ EdgeImpl::EdgeImpl(PortImpl* tail, PortImpl* head) } const Raul::Path& -EdgeImpl::tail_path() const +ArcImpl::tail_path() const { return _tail->path(); } const Raul::Path& -EdgeImpl::head_path() const +ArcImpl::head_path() const { return _head->path(); } BufferRef -EdgeImpl::buffer(uint32_t voice) const +ArcImpl::buffer(uint32_t voice) const { assert(!must_mix()); assert(_tail->poly() == 1 || _tail->poly() > voice); @@ -67,13 +67,13 @@ EdgeImpl::buffer(uint32_t voice) const } bool -EdgeImpl::must_mix() const +ArcImpl::must_mix() const { return _tail->poly() > _head->poly(); } bool -EdgeImpl::can_connect(const OutputPort* src, const InputPort* dst) +ArcImpl::can_connect(const OutputPort* src, const InputPort* dst) { const Ingen::URIs& uris = src->bufs().uris(); return ( diff --git a/src/server/EdgeImpl.hpp b/src/server/ArcImpl.hpp index 0627a7ba..a28616da 100644 --- a/src/server/EdgeImpl.hpp +++ b/src/server/ArcImpl.hpp @@ -14,15 +14,15 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef INGEN_ENGINE_EDGE_IMPL_HPP -#define INGEN_ENGINE_EDGE_IMPL_HPP +#ifndef INGEN_ENGINE_ARC_IMPL_HPP +#define INGEN_ENGINE_ARC_IMPL_HPP #include <cstdlib> #include <boost/intrusive/slist.hpp> #include <boost/utility.hpp> -#include "ingen/Edge.hpp" +#include "ingen/Arc.hpp" #include "lv2/lv2plug.in/ns/ext/atom/atom.h" #include "raul/Deletable.hpp" @@ -48,14 +48,14 @@ class InputPort; * * \ingroup engine */ -class EdgeImpl +class ArcImpl : private Raul::Noncopyable - , public Edge + , public Arc , public boost::intrusive::slist_base_hook< boost::intrusive::link_mode<boost::intrusive::auto_unlink> > { public: - EdgeImpl(PortImpl* tail, PortImpl* head); + ArcImpl(PortImpl* tail, PortImpl* head); inline PortImpl* tail() const { return _tail; } inline PortImpl* head() const { return _head; } @@ -64,13 +64,13 @@ public: const Raul::Path& head_path() const; /** Get the buffer for a particular voice. - * An Edge is smart - it knows the destination port requesting the + * An Arc is smart - it knows the destination port requesting the * buffer, and will return accordingly (e.g. the same buffer for every - * voice in a mono->poly edge). + * voice in a mono->poly arc). */ BufferRef buffer(uint32_t voice) const; - /** Whether this edge must mix down voices into a local buffer */ + /** Whether this arc must mix down voices into a local buffer */ bool must_mix() const; static bool can_connect(const OutputPort* src, const InputPort* dst); @@ -83,4 +83,4 @@ protected: } // namespace Server } // namespace Ingen -#endif // INGEN_ENGINE_EDGEIMPL_HPP +#endif // INGEN_ENGINE_ARC_IMPL_HPP diff --git a/src/server/GraphImpl.cpp b/src/server/GraphImpl.cpp index 2353b977..5859d071 100644 --- a/src/server/GraphImpl.cpp +++ b/src/server/GraphImpl.cpp @@ -21,10 +21,10 @@ #include "ingen/World.hpp" #include "raul/Maid.hpp" +#include "ArcImpl.hpp" #include "BlockImpl.hpp" #include "BufferFactory.hpp" #include "DuplexPort.hpp" -#include "EdgeImpl.hpp" #include "Engine.hpp" #include "GraphImpl.hpp" #include "GraphPlugin.hpp" @@ -198,35 +198,35 @@ GraphImpl::remove_block(BlockImpl& block) } void -GraphImpl::add_edge(SharedPtr<EdgeImpl> c) +GraphImpl::add_arc(SharedPtr<ArcImpl> a) { ThreadManager::assert_thread(THREAD_PRE_PROCESS); - _edges.insert(make_pair(make_pair(c->tail(), c->head()), c)); + _arcs.insert(make_pair(make_pair(a->tail(), a->head()), a)); } -/** Remove a edge. +/** Remove an arc. * Preprocessing thread only. */ -SharedPtr<EdgeImpl> -GraphImpl::remove_edge(const PortImpl* tail, const PortImpl* dst_port) +SharedPtr<ArcImpl> +GraphImpl::remove_arc(const PortImpl* tail, const PortImpl* dst_port) { ThreadManager::assert_thread(THREAD_PRE_PROCESS); - Edges::iterator i = _edges.find(make_pair(tail, dst_port)); - if (i != _edges.end()) { - SharedPtr<EdgeImpl> c = PtrCast<EdgeImpl>(i->second); - _edges.erase(i); - return c; + Arcs::iterator i = _arcs.find(make_pair(tail, dst_port)); + if (i != _arcs.end()) { + SharedPtr<ArcImpl> arc = PtrCast<ArcImpl>(i->second); + _arcs.erase(i); + return arc; } else { - return SharedPtr<EdgeImpl>(); + return SharedPtr<ArcImpl>(); } } bool -GraphImpl::has_edge(const PortImpl* tail, const PortImpl* dst_port) const +GraphImpl::has_arc(const PortImpl* tail, const PortImpl* dst_port) const { ThreadManager::assert_thread(THREAD_PRE_PROCESS); - Edges::const_iterator i = _edges.find(make_pair(tail, dst_port)); - return (i != _edges.end()); + Arcs::const_iterator i = _arcs.find(make_pair(tail, dst_port)); + return (i != _arcs.end()); } void diff --git a/src/server/GraphImpl.hpp b/src/server/GraphImpl.hpp index 9ef707fc..2e534ca7 100644 --- a/src/server/GraphImpl.hpp +++ b/src/server/GraphImpl.hpp @@ -28,13 +28,13 @@ namespace Ingen { -class Edge; +class Arc; namespace Server { +class ArcImpl; class CompiledGraph; class Context; -class EdgeImpl; class Engine; class ProcessContext; @@ -128,12 +128,12 @@ public: void remove_port(DuplexPort& port); void clear_ports(); - void add_edge(SharedPtr<EdgeImpl> c); + void add_arc(SharedPtr<ArcImpl> arc); - SharedPtr<EdgeImpl> remove_edge(const PortImpl* tail, - const PortImpl* head); + SharedPtr<ArcImpl> remove_arc(const PortImpl* tail, + const PortImpl* head); - bool has_edge(const PortImpl* tail, const PortImpl* head) const; + bool has_arc(const PortImpl* tail, const PortImpl* head) const; void set_compiled_graph(CompiledGraph* cp); diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp index a272b305..9ab3cbfe 100644 --- a/src/server/InputPort.cpp +++ b/src/server/InputPort.cpp @@ -20,10 +20,10 @@ #include "ingen/Log.hpp" #include "ingen/URIs.hpp" +#include "ArcImpl.hpp" #include "BlockImpl.hpp" #include "Buffer.hpp" #include "BufferFactory.hpp" -#include "EdgeImpl.hpp" #include "Engine.hpp" #include "GraphImpl.hpp" #include "InputPort.hpp" @@ -46,7 +46,7 @@ InputPort::InputPort(BufferFactory& bufs, const Raul::Atom& value, size_t buffer_size) : PortImpl(bufs, parent, symbol, index, poly, type, buffer_type, value, buffer_size) - , _num_edges(0) + , _num_arcs(0) { const Ingen::URIs& uris = bufs.uris(); @@ -82,21 +82,21 @@ InputPort::get_buffers(BufferFactory& bufs, uint32_t poly, bool real_time) const { - const size_t num_edges = real_time ? _edges.size() : _num_edges; + const size_t num_arcs = real_time ? _arcs.size() : _num_arcs; - if (is_a(PortType::AUDIO) && num_edges == 0) { - // Audio input with no edges, use shared zero buffer + if (is_a(PortType::AUDIO) && num_arcs == 0) { + // Audio input with no arcs, use shared zero buffer for (uint32_t v = 0; v < poly; ++v) { buffers->at(v) = bufs.silent_buffer(); } return false; - } else if (num_edges == 1) { + } else if (num_arcs == 1) { if (real_time) { - if (!_edges.front().must_mix()) { + if (!_arcs.front().must_mix()) { // Single non-mixing connection, use buffers directly for (uint32_t v = 0; v < poly; ++v) { - buffers->at(v) = _edges.front().buffer(v); + buffers->at(v) = _arcs.front().buffer(v); } return false; } @@ -112,50 +112,50 @@ InputPort::get_buffers(BufferFactory& bufs, return true; } -/** Add a edge. Realtime safe. +/** Add an arc. Realtime safe. * - * The buffer of this port will be set directly to the edge's buffer - * if there is only one edge, since no copying/mixing needs to take place. + * The buffer of this port will be set directly to the arc's buffer + * if there is only one arc, since no copying/mixing needs to take place. * * Note that setup_buffers must be called after this before the change * will audibly take effect. */ void -InputPort::add_edge(ProcessContext& context, EdgeImpl* c) +InputPort::add_arc(ProcessContext& context, ArcImpl* c) { - _edges.push_front(*c); + _arcs.push_front(*c); if (_type != PortType::CV) { _broadcast = true; // Broadcast value/activity of connected input } } -/** Remove a edge. Realtime safe. +/** Remove a arc. Realtime safe. * * Note that setup_buffers must be called after this before the change * will audibly take effect. */ -EdgeImpl* -InputPort::remove_edge(ProcessContext& context, const OutputPort* tail) +ArcImpl* +InputPort::remove_arc(ProcessContext& context, const OutputPort* tail) { - EdgeImpl* edge = NULL; - for (Edges::iterator i = _edges.begin(); i != _edges.end(); ++i) { + ArcImpl* arc = NULL; + for (Arcs::iterator i = _arcs.begin(); i != _arcs.end(); ++i) { if (i->tail() == tail) { - edge = &*i; - _edges.erase(i); + arc = &*i; + _arcs.erase(i); break; } } - if (!edge) { - context.engine().log().error("Attempt to remove non-existent edge\n"); + if (!arc) { + context.engine().log().error("Attempt to remove non-existent arc\n"); return NULL; } - if (_edges.empty()) { + if (_arcs.empty()) { _broadcast = false; // Turn off broadcasting if no longer connected } - return edge; + return arc; } uint32_t @@ -165,24 +165,24 @@ InputPort::max_tail_poly(Context& context) const } static void -get_sources(const Context& context, - const EdgeImpl& edge, - uint32_t voice, - const Buffer** srcs, - uint32_t max_num_srcs, - uint32_t& num_srcs) +get_sources(const Context& context, + const ArcImpl& arc, + uint32_t voice, + const Buffer** srcs, + uint32_t max_num_srcs, + uint32_t& num_srcs) { - if (edge.must_mix()) { + if (arc.must_mix()) { // Mixing down voices: all tail voices => one head voice - for (uint32_t v = 0; v < edge.tail()->poly(); ++v) { + for (uint32_t v = 0; v < arc.tail()->poly(); ++v) { assert(num_srcs < max_num_srcs); - srcs[num_srcs++] = edge.tail()->buffer(v).get(); + srcs[num_srcs++] = arc.tail()->buffer(v).get(); } } else { // Matching polyphony: each tail voice => corresponding head voice - assert(edge.tail()->poly() == edge.head()->poly()); + assert(arc.tail()->poly() == arc.head()->poly()); assert(num_srcs < max_num_srcs); - srcs[num_srcs++] = edge.tail()->buffer(voice).get(); + srcs[num_srcs++] = arc.tail()->buffer(voice).get(); } } @@ -195,23 +195,23 @@ InputPort::pre_process(Context& context) if (_set_by_user) return; - if (_edges.empty()) { + if (_arcs.empty()) { for (uint32_t v = 0; v < _poly; ++v) { update_set_state(context, v); } } else if (direct_connect()) { for (uint32_t v = 0; v < _poly; ++v) { - _buffers->at(v) = _edges.front().buffer(v); + _buffers->at(v) = _arcs.front().buffer(v); } } else { const uint32_t src_poly = max_tail_poly(context); - const uint32_t max_num_srcs = _edges.size() * src_poly; + const uint32_t max_num_srcs = _arcs.size() * src_poly; const Buffer* srcs[max_num_srcs]; for (uint32_t v = 0; v < _poly; ++v) { // Get all the sources for this voice uint32_t num_srcs = 0; - for (Edges::iterator e = _edges.begin(); e != _edges.end(); ++e) { + for (Arcs::iterator e = _arcs.begin(); e != _arcs.end(); ++e) { get_sources(context, *e, v, srcs, max_num_srcs, num_srcs); } @@ -241,9 +241,9 @@ InputPort::post_process(Context& context) bool InputPort::direct_connect() const { - return _edges.size() == 1 + return _arcs.size() == 1 && !_parent->path().is_root() - && !_edges.front().must_mix(); + && !_arcs.front().must_mix(); } } // namespace Server diff --git a/src/server/InputPort.hpp b/src/server/InputPort.hpp index 7a4c7669..faf323f0 100644 --- a/src/server/InputPort.hpp +++ b/src/server/InputPort.hpp @@ -24,13 +24,13 @@ #include "raul/SharedPtr.hpp" +#include "ArcImpl.hpp" #include "PortImpl.hpp" -#include "EdgeImpl.hpp" namespace Ingen { namespace Server { -class EdgeImpl; +class ArcImpl; class Context; class BlockImpl; class OutputPort; @@ -39,10 +39,10 @@ class ProcessContext; /** An input port on a Block or Graph. * * All ports have a Buffer, but the actual contents (data) of that buffer may be - * set directly to the incoming edge's buffer if there's only one inbound - * edge, to eliminate the need to copy/mix. + * set directly to the incoming arc's buffer if there's only one inbound + * arc, to eliminate the need to copy/mix. * - * If a port has multiple edges, they will be mixed down into the local + * If a port has multiple arcs, they will be mixed down into the local * buffer and it will be used. * * \ingroup engine @@ -62,15 +62,15 @@ public: virtual ~InputPort() {} - typedef boost::intrusive::slist<EdgeImpl, + typedef boost::intrusive::slist<ArcImpl, boost::intrusive::constant_time_size<false> - > Edges; + > Arcs; /** Return the maximum polyphony of an output connected to this input. */ virtual uint32_t max_tail_poly(Context& context) const; - void add_edge(ProcessContext& context, EdgeImpl* c); - EdgeImpl* remove_edge(ProcessContext& context, + void add_arc(ProcessContext& context, ArcImpl* c); + ArcImpl* remove_arc(ProcessContext& context, const OutputPort* tail); bool apply_poly(ProcessContext& context, Raul::Maid& maid, uint32_t poly); @@ -83,9 +83,9 @@ public: void pre_process(Context& context); void post_process(Context& context); - size_t num_edges() const { return _num_edges; } ///< Pre-process thread - void increment_num_edges() { ++_num_edges; } - void decrement_num_edges() { --_num_edges; } + size_t num_arcs() const { return _num_arcs; } ///< Pre-process thread + void increment_num_arcs() { ++_num_arcs; } + void decrement_num_arcs() { --_num_arcs; } bool is_input() const { return true; } bool is_output() const { return false; } @@ -93,8 +93,8 @@ public: bool direct_connect() const; protected: - size_t _num_edges; ///< Pre-process thread - Edges _edges; ///< Audio thread + size_t _num_arcs; ///< Pre-process thread + Arcs _arcs; ///< Audio thread }; } // namespace Server 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()); } } diff --git a/src/server/wscript b/src/server/wscript index 107db69d..47090d90 100644 --- a/src/server/wscript +++ b/src/server/wscript @@ -3,6 +3,7 @@ from waflib.extras import autowaf as autowaf def build(bld): core_source = ''' + ArcImpl.cpp BlockFactory.cpp BlockImpl.cpp Broadcaster.cpp @@ -11,7 +12,6 @@ def build(bld): Context.cpp ControlBindings.cpp DuplexPort.cpp - EdgeImpl.cpp Engine.cpp EventWriter.cpp GraphImpl.cpp |