summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-18 23:05:06 +0000
committerDavid Robillard <d@drobilla.net>2012-08-18 23:05:06 +0000
commit317627ef40f7654c298aa1ac707851c852259e3a (patch)
tree38f7ed57aafb7b3b8e21e6caa3429a39207e4a9a /src/server/events
parent160b2baf7df8b960f22619c013b3197c0dc51c2b (diff)
downloadingen-317627ef40f7654c298aa1ac707851c852259e3a.tar.gz
ingen-317627ef40f7654c298aa1ac707851c852259e3a.tar.bz2
ingen-317627ef40f7654c298aa1ac707851c852259e3a.zip
Node => Block
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4720 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Connect.cpp38
-rw-r--r--src/server/events/CreateBlock.cpp (renamed from src/server/events/CreateNode.cpp)54
-rw-r--r--src/server/events/CreateBlock.hpp (renamed from src/server/events/CreateNode.hpp)28
-rw-r--r--src/server/events/CreatePatch.cpp4
-rw-r--r--src/server/events/Delete.cpp22
-rw-r--r--src/server/events/Delete.hpp8
-rw-r--r--src/server/events/Delta.cpp26
-rw-r--r--src/server/events/Disconnect.cpp44
-rw-r--r--src/server/events/DisconnectAll.cpp20
-rw-r--r--src/server/events/DisconnectAll.hpp6
-rw-r--r--src/server/events/Get.cpp32
-rw-r--r--src/server/events/Get.hpp4
-rw-r--r--src/server/events/Move.cpp2
-rw-r--r--src/server/events/SetPortValue.cpp4
14 files changed, 146 insertions, 146 deletions
diff --git a/src/server/events/Connect.cpp b/src/server/events/Connect.cpp
index 2403b327..db8e044f 100644
--- a/src/server/events/Connect.cpp
+++ b/src/server/events/Connect.cpp
@@ -70,15 +70,15 @@ Connect::pre_process()
return Event::pre_process_done(BAD_REQUEST, _head_path);
}
- NodeImpl* const tail_node = tail_output->parent_node();
- NodeImpl* const head_node = _head->parent_node();
- if (!tail_node || !head_node) {
+ BlockImpl* const tail_block = tail_output->parent_block();
+ BlockImpl* const head_block = _head->parent_block();
+ if (!tail_block || !head_block) {
return Event::pre_process_done(PARENT_NOT_FOUND, _head_path);
}
- if (tail_node->parent() != head_node->parent()
- && tail_node != head_node->parent()
- && tail_node->parent() != head_node) {
+ if (tail_block->parent() != head_block->parent()
+ && tail_block != head_block->parent()
+ && tail_block->parent() != head_block) {
return Event::pre_process_done(PARENT_DIFFERS, _head_path);
}
@@ -86,20 +86,20 @@ Connect::pre_process()
return Event::pre_process_done(TYPE_MISMATCH, _head_path);
}
- if (tail_node->parent_patch() != head_node->parent_patch()) {
+ if (tail_block->parent_patch() != head_block->parent_patch()) {
// Edge to a patch port from inside the patch
- assert(tail_node->parent() == head_node || head_node->parent() == tail_node);
- if (tail_node->parent() == head_node) {
- _patch = dynamic_cast<PatchImpl*>(head_node);
+ assert(tail_block->parent() == head_block || head_block->parent() == tail_block);
+ if (tail_block->parent() == head_block) {
+ _patch = dynamic_cast<PatchImpl*>(head_block);
} else {
- _patch = dynamic_cast<PatchImpl*>(tail_node);
+ _patch = dynamic_cast<PatchImpl*>(tail_block);
}
- } else if (tail_node == head_node && dynamic_cast<PatchImpl*>(tail_node)) {
+ } else if (tail_block == head_block && dynamic_cast<PatchImpl*>(tail_block)) {
// Edge from a patch input to a patch output (pass through)
- _patch = dynamic_cast<PatchImpl*>(tail_node);
+ _patch = dynamic_cast<PatchImpl*>(tail_block);
} else {
- // Normal edge between nodes with the same parent
- _patch = tail_node->parent_patch();
+ // Normal edge between blocks with the same parent
+ _patch = tail_block->parent_patch();
}
if (_patch->has_edge(tail_output, _head)) {
@@ -114,12 +114,12 @@ Connect::pre_process()
Glib::RWLock::ReaderLock wlock(_engine.store()->lock());
/* Need to be careful about patch port edges here and adding a
- node's parent as a dependant/provider, or adding a patch as its own
+ block's parent as a dependant/provider, or adding a patch as its own
provider...
*/
- if (tail_node != head_node && tail_node->parent() == head_node->parent()) {
- head_node->providers().push_back(tail_node);
- tail_node->dependants().push_back(head_node);
+ if (tail_block != head_block && tail_block->parent() == head_block->parent()) {
+ head_block->providers().push_back(tail_block);
+ tail_block->dependants().push_back(head_block);
}
_patch->add_edge(_edge);
diff --git a/src/server/events/CreateNode.cpp b/src/server/events/CreateBlock.cpp
index ca2be305..73ff7ba2 100644
--- a/src/server/events/CreateNode.cpp
+++ b/src/server/events/CreateBlock.cpp
@@ -19,11 +19,11 @@
#include "raul/Maid.hpp"
#include "raul/Path.hpp"
+#include "BlockFactory.hpp"
+#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
-#include "CreateNode.hpp"
+#include "CreateBlock.hpp"
#include "Engine.hpp"
-#include "NodeFactory.hpp"
-#include "NodeImpl.hpp"
#include "PatchImpl.hpp"
#include "PluginImpl.hpp"
#include "PortImpl.hpp"
@@ -32,22 +32,22 @@ namespace Ingen {
namespace Server {
namespace Events {
-CreateNode::CreateNode(Engine& engine,
- SharedPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& path,
- const Resource::Properties& properties)
+CreateBlock::CreateBlock(Engine& engine,
+ SharedPtr<Interface> client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ const Resource::Properties& properties)
: Event(engine, client, id, timestamp)
, _path(path)
, _properties(properties)
, _patch(NULL)
- , _node(NULL)
+ , _block(NULL)
, _compiled_patch(NULL)
{}
bool
-CreateNode::pre_process()
+CreateBlock::pre_process()
{
Ingen::URIs& uris = _engine.world()->uris();
@@ -75,7 +75,7 @@ CreateNode::pre_process()
}
const Raul::URI plugin_uri(plugin_uri_str);
- PluginImpl* plugin = _engine.node_factory()->plugin(plugin_uri);
+ PluginImpl* plugin = _engine.block_factory()->plugin(plugin_uri);
if (!plugin) {
return Event::pre_process_done(PLUGIN_NOT_FOUND, Raul::URI(plugin_uri));
}
@@ -86,7 +86,7 @@ CreateNode::pre_process()
p->second.type() == _engine.world()->forge().Bool &&
p->second.get_bool());
- if (!(_node = plugin->instantiate(*_engine.buffer_factory(),
+ if (!(_block = plugin->instantiate(*_engine.buffer_factory(),
Raul::Symbol(_path.symbol()),
polyphonic,
_patch,
@@ -94,23 +94,23 @@ CreateNode::pre_process()
return Event::pre_process_done(CREATION_FAILED, _path);
}
- _node->properties().insert(_properties.begin(), _properties.end());
- _node->activate(*_engine.buffer_factory());
+ _block->properties().insert(_properties.begin(), _properties.end());
+ _block->activate(*_engine.buffer_factory());
- // Add node to the store and the patch's pre-processor only node list
- _patch->add_node(*_node);
- _engine.store()->add(_node);
+ // Add block to the store and the patch's pre-processor only block list
+ _patch->add_block(*_block);
+ _engine.store()->add(_block);
- /* Compile patch with new node added for insertion in audio thread
- TODO: Since the node is not connected at this point, a full compilation
- could be avoided and the node simply appended. */
+ /* Compile patch with new block added for insertion in audio thread
+ TODO: Since the block is not connected at this point, a full compilation
+ could be avoided and the block simply appended. */
if (_patch->enabled()) {
_compiled_patch = _patch->compile();
}
- _update.push_back(make_pair(_node->uri(), _node->properties()));
- for (uint32_t i = 0; i < _node->num_ports(); ++i) {
- const PortImpl* port = _node->port_impl(i);
+ _update.push_back(make_pair(_block->uri(), _block->properties()));
+ for (uint32_t i = 0; i < _block->num_ports(); ++i) {
+ const PortImpl* port = _block->port_impl(i);
Resource::Properties pprops = port->properties();
pprops.erase(uris.ingen_value);
pprops.insert(std::make_pair(uris.ingen_value, port->value()));
@@ -121,16 +121,16 @@ CreateNode::pre_process()
}
void
-CreateNode::execute(ProcessContext& context)
+CreateBlock::execute(ProcessContext& context)
{
- if (_node) {
+ if (_block) {
_engine.maid()->dispose(_patch->compiled_patch());
_patch->compiled_patch(_compiled_patch);
}
}
void
-CreateNode::post_process()
+CreateBlock::post_process()
{
if (!respond()) {
for (Update::const_iterator i = _update.begin(); i != _update.end(); ++i) {
diff --git a/src/server/events/CreateNode.hpp b/src/server/events/CreateBlock.hpp
index 32c0f4b9..ea3c4b5c 100644
--- a/src/server/events/CreateNode.hpp
+++ b/src/server/events/CreateBlock.hpp
@@ -14,8 +14,8 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef INGEN_EVENTS_CREATENODE_HPP
-#define INGEN_EVENTS_CREATENODE_HPP
+#ifndef INGEN_EVENTS_CREATEBLOCK_HPP
+#define INGEN_EVENTS_CREATEBLOCK_HPP
#include <list>
#include <utility>
@@ -27,25 +27,25 @@
namespace Ingen {
namespace Server {
-class PatchImpl;
-class NodeImpl;
+class BlockImpl;
class CompiledPatch;
+class PatchImpl;
namespace Events {
-/** An event to load a Node and insert it into a Patch.
+/** An event to load a Block and insert it into a Patch.
*
* \ingroup engine
*/
-class CreateNode : public Event
+class CreateBlock : public Event
{
public:
- CreateNode(Engine& engine,
- SharedPtr<Interface> client,
- int32_t id,
- SampleCount timestamp,
- const Raul::Path& node_path,
- const Resource::Properties& properties);
+ CreateBlock(Engine& engine,
+ SharedPtr<Interface> client,
+ int32_t id,
+ SampleCount timestamp,
+ const Raul::Path& block_path,
+ const Resource::Properties& properties);
bool pre_process();
void execute(ProcessContext& context);
@@ -59,7 +59,7 @@ private:
Resource::Properties _properties;
Update _update;
PatchImpl* _patch;
- NodeImpl* _node;
+ BlockImpl* _block;
CompiledPatch* _compiled_patch;
};
@@ -67,4 +67,4 @@ private:
} // namespace Server
} // namespace Ingen
-#endif // INGEN_EVENTS_CREATENODE_HPP
+#endif // INGEN_EVENTS_CREATEBLOCK_HPP
diff --git a/src/server/events/CreatePatch.cpp b/src/server/events/CreatePatch.cpp
index 4f14ade5..e9adc547 100644
--- a/src/server/events/CreatePatch.cpp
+++ b/src/server/events/CreatePatch.cpp
@@ -81,9 +81,9 @@ CreatePatch::pre_process()
_patch->properties().insert(_properties.begin(), _properties.end());
_patch->add_property(uris.rdf_type, uris.ingen_Patch);
_patch->add_property(uris.rdf_type,
- Resource::Property(uris.ingen_Node, Resource::EXTERNAL));
+ Resource::Property(uris.ingen_Block, Resource::EXTERNAL));
- _parent->add_node(*_patch);
+ _parent->add_block(*_patch);
if (_parent->enabled()) {
_patch->enable();
_compiled_patch = _parent->compile();
diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp
index d2e3e58e..dbda331c 100644
--- a/src/server/events/Delete.cpp
+++ b/src/server/events/Delete.cpp
@@ -18,6 +18,7 @@
#include "raul/Maid.hpp"
#include "raul/Path.hpp"
+#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
#include "ControlBindings.hpp"
#include "Delete.hpp"
@@ -25,7 +26,6 @@
#include "Driver.hpp"
#include "Engine.hpp"
#include "EnginePort.hpp"
-#include "NodeImpl.hpp"
#include "PatchImpl.hpp"
#include "PluginImpl.hpp"
#include "PortImpl.hpp"
@@ -73,24 +73,24 @@ Delete::pre_process()
return Event::pre_process_done(NOT_FOUND, _path);
}
- if (!(_node = PtrCast<NodeImpl>(iter->second))) {
+ if (!(_block = PtrCast<BlockImpl>(iter->second))) {
_port = PtrCast<DuplexPort>(iter->second);
}
- if (!_node && !_port) {
+ if (!_block && !_port) {
return Event::pre_process_done(NOT_DELETABLE, _path);
}
- PatchImpl* parent = _node ? _node->parent_patch() : _port->parent_patch();
+ PatchImpl* parent = _block ? _block->parent_patch() : _port->parent_patch();
if (!parent) {
return Event::pre_process_done(INTERNAL_ERROR, _path);
}
_engine.store()->remove(iter, _removed_objects);
- if (_node) {
- parent->remove_node(*_node);
- _disconnect_event = new DisconnectAll(_engine, parent, _node.get());
+ if (_block) {
+ parent->remove_block(*_block);
+ _disconnect_event = new DisconnectAll(_engine, parent, _block.get());
_disconnect_event->pre_process();
if (parent->enabled()) {
@@ -122,7 +122,7 @@ Delete::execute(ProcessContext& context)
_disconnect_event->execute(context);
}
- PatchImpl* parent = _node ? _node->parent_patch() : _port->parent_patch();
+ PatchImpl* parent = _block ? _block->parent_patch() : _port->parent_patch();
if (_port) {
_engine.maid()->dispose(parent->external_ports());
parent->external_ports(_ports_array);
@@ -143,9 +143,9 @@ Delete::post_process()
{
_lock.release();
_removed_bindings.reset();
- if (!respond() && (_node || _port)) {
- if (_node) {
- _node->deactivate();
+ if (!respond() && (_block || _port)) {
+ if (_block) {
+ _block->deactivate();
}
_engine.broadcaster()->bundle_begin();
diff --git a/src/server/events/Delete.hpp b/src/server/events/Delete.hpp
index f307eba4..c14c5567 100644
--- a/src/server/events/Delete.hpp
+++ b/src/server/events/Delete.hpp
@@ -30,11 +30,11 @@ template<typename T> class Array;
namespace Ingen {
namespace Server {
-class NodeImpl;
-class PortImpl;
+class BlockImpl;
+class CompiledPatch;
class DuplexPort;
class EnginePort;
-class CompiledPatch;
+class PortImpl;
namespace Events {
@@ -72,7 +72,7 @@ public:
private:
Raul::URI _uri;
Raul::Path _path;
- SharedPtr<NodeImpl> _node; ///< Non-NULL iff a node
+ SharedPtr<BlockImpl> _block; ///< Non-NULL iff a block
SharedPtr<DuplexPort> _port; ///< Non-NULL iff a port
EnginePort* _engine_port;
Raul::Array<PortImpl*>* _ports_array; ///< New (external) ports for Patch
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 1120af92..3b31cedb 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -24,7 +24,7 @@
#include "Broadcaster.hpp"
#include "ControlBindings.hpp"
-#include "CreateNode.hpp"
+#include "CreateBlock.hpp"
#include "CreatePatch.hpp"
#include "CreatePort.hpp"
#include "Delta.hpp"
@@ -112,7 +112,7 @@ Delta::pre_process()
_object = is_graph_object
? static_cast<Ingen::Resource*>(_engine.store()->get(GraphObject::uri_to_path(_subject)))
- : static_cast<Ingen::Resource*>(_engine.node_factory()->plugin(_subject));
+ : static_cast<Ingen::Resource*>(_engine.block_factory()->plugin(_subject));
if (!_object && (!is_graph_object || !_create)) {
return Event::pre_process_done(NOT_FOUND, _subject);
@@ -122,14 +122,14 @@ Delta::pre_process()
if (is_graph_object && !_object) {
Raul::Path path(GraphObject::uri_to_path(_subject));
- bool is_patch = false, is_node = false, is_port = false, is_output = false;
- Ingen::Resource::type(uris, _properties, is_patch, is_node, is_port, is_output);
+ bool is_patch = false, is_block = false, is_port = false, is_output = false;
+ Ingen::Resource::type(uris, _properties, is_patch, is_block, is_port, is_output);
if (is_patch) {
_create_event = new CreatePatch(
_engine, _request_client, _request_id, _time, path, _properties);
- } else if (is_node) {
- _create_event = new CreateNode(
+ } else if (is_block) {
+ _create_event = new CreateBlock(
_engine, _request_client, _request_id, _time, path, _properties);
} else if (is_port) {
_create_event = new CreatePort(
@@ -223,9 +223,9 @@ Delta::pre_process()
if (value.type() == uris.forge.Bool) {
op = POLYPHONIC;
obj->set_property(key, value, value.context());
- NodeImpl* node = dynamic_cast<NodeImpl*>(obj);
- if (node)
- node->set_polyphonic(value.get_bool());
+ BlockImpl* block = dynamic_cast<BlockImpl*>(obj);
+ if (block)
+ block->set_polyphonic(value.get_bool());
if (value.get_bool()) {
obj->prepare_poly(*_engine.buffer_factory(), parent->internal_poly());
} else {
@@ -271,7 +271,7 @@ Delta::execute(ProcessContext& context)
}
GraphObjectImpl* const object = dynamic_cast<GraphObjectImpl*>(_object);
- NodeImpl* const node = 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();
@@ -315,9 +315,9 @@ Delta::execute(ProcessContext& context)
case CONTROL_BINDING:
if (port) {
_engine.control_bindings()->port_binding_changed(context, port, value);
- } else if (node) {
- if (node->plugin_impl()->type() == Plugin::Internal) {
- node->learn();
+ } else if (block) {
+ if (block->plugin_impl()->type() == Plugin::Internal) {
+ block->learn();
}
}
break;
diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp
index 9e1e9531..9cf2974a 100644
--- a/src/server/events/Disconnect.cpp
+++ b/src/server/events/Disconnect.cpp
@@ -67,21 +67,21 @@ Disconnect::Impl::Impl(Engine& e,
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
- NodeImpl* const src_node = _src_output_port->parent_node();
- NodeImpl* const dst_node = _dst_input_port->parent_node();
+ BlockImpl* const src_block = _src_output_port->parent_block();
+ BlockImpl* const dst_block = _dst_input_port->parent_block();
- for (std::list<NodeImpl*>::iterator i = dst_node->providers().begin();
- i != dst_node->providers().end(); ++i) {
- if ((*i) == src_node) {
- dst_node->providers().erase(i);
+ for (std::list<BlockImpl*>::iterator i = dst_block->providers().begin();
+ i != dst_block->providers().end(); ++i) {
+ if ((*i) == src_block) {
+ dst_block->providers().erase(i);
break;
}
}
- for (std::list<NodeImpl*>::iterator i = src_node->dependants().begin();
- i != src_node->dependants().end(); ++i) {
- if ((*i) == dst_node) {
- src_node->dependants().erase(i);
+ for (std::list<BlockImpl*>::iterator i = src_block->dependants().begin();
+ i != src_block->dependants().end(); ++i) {
+ if ((*i) == dst_block) {
+ src_block->dependants().erase(i);
break;
}
}
@@ -130,23 +130,23 @@ Disconnect::pre_process()
return Event::pre_process_done(PORT_NOT_FOUND, _head_path);
}
- NodeImpl* const src_node = tail->parent_node();
- NodeImpl* const dst_node = head->parent_node();
+ BlockImpl* const src_block = tail->parent_block();
+ BlockImpl* const dst_block = head->parent_block();
- if (src_node->parent_patch() != dst_node->parent_patch()) {
+ if (src_block->parent_patch() != dst_block->parent_patch()) {
// Edge to a patch port from inside the patch
- assert(src_node->parent() == dst_node || dst_node->parent() == src_node);
- if (src_node->parent() == dst_node) {
- _patch = dynamic_cast<PatchImpl*>(dst_node);
+ assert(src_block->parent() == dst_block || dst_block->parent() == src_block);
+ if (src_block->parent() == dst_block) {
+ _patch = dynamic_cast<PatchImpl*>(dst_block);
} else {
- _patch = dynamic_cast<PatchImpl*>(src_node);
+ _patch = dynamic_cast<PatchImpl*>(src_block);
}
- } else if (src_node == dst_node && dynamic_cast<PatchImpl*>(src_node)) {
+ } else if (src_block == dst_block && dynamic_cast<PatchImpl*>(src_block)) {
// Edge from a patch input to a patch output (pass through)
- _patch = dynamic_cast<PatchImpl*>(src_node);
+ _patch = dynamic_cast<PatchImpl*>(src_block);
} else {
- // Normal edge between nodes with the same parent
- _patch = src_node->parent_patch();
+ // Normal edge between blocks with the same parent
+ _patch = src_block->parent_patch();
}
assert(_patch);
@@ -155,7 +155,7 @@ Disconnect::pre_process()
return Event::pre_process_done(NOT_FOUND, _head_path);
}
- if (src_node == NULL || dst_node == NULL) {
+ if (src_block == NULL || dst_block == NULL) {
return Event::pre_process_done(PARENT_NOT_FOUND, _head_path);
}
diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp
index 693c8784..4169622d 100644
--- a/src/server/events/DisconnectAll.cpp
+++ b/src/server/events/DisconnectAll.cpp
@@ -24,11 +24,11 @@
#include "raul/Maid.hpp"
#include "raul/Path.hpp"
+#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
#include "EdgeImpl.hpp"
#include "Engine.hpp"
#include "InputPort.hpp"
-#include "NodeImpl.hpp"
#include "OutputPort.hpp"
#include "PatchImpl.hpp"
#include "PortImpl.hpp"
@@ -50,7 +50,7 @@ DisconnectAll::DisconnectAll(Engine& engine,
, _parent_path(parent_path)
, _path(path)
, _parent(NULL)
- , _node(NULL)
+ , _block(NULL)
, _port(NULL)
, _compiled_patch(NULL)
, _deleting(false)
@@ -66,7 +66,7 @@ DisconnectAll::DisconnectAll(Engine& engine,
, _parent_path(parent->path())
, _path(object->path())
, _parent(parent)
- , _node(dynamic_cast<NodeImpl*>(object))
+ , _block(dynamic_cast<BlockImpl*>(object))
, _port(dynamic_cast<PortImpl*>(object))
, _compiled_patch(NULL)
, _deleting(true)
@@ -104,10 +104,10 @@ DisconnectAll::pre_process()
}
// Only one of these will succeed
- _node = dynamic_cast<NodeImpl*>(object);
- _port = dynamic_cast<PortImpl*>(object);
+ _block = dynamic_cast<BlockImpl*>(object);
+ _port = dynamic_cast<PortImpl*>(object);
- assert((_node || _port) && !(_node && _port));
+ assert((_block || _port) && !(_block && _port));
}
// Find set of edges to remove
@@ -115,9 +115,9 @@ DisconnectAll::pre_process()
for (GraphObject::Edges::const_iterator i = _parent->edges().begin();
i != _parent->edges().end(); ++i) {
EdgeImpl* const c = (EdgeImpl*)i->second.get();
- if (_node) {
- if (c->tail()->parent_node() == _node
- || c->head()->parent_node() == _node) {
+ if (_block) {
+ if (c->tail()->parent_block() == _block
+ || c->head()->parent_block() == _block) {
to_remove.insert(c);
}
} else {
@@ -149,7 +149,7 @@ DisconnectAll::execute(ProcessContext& context)
if (_status == SUCCESS) {
for (Impls::iterator i = _impls.begin(); i != _impls.end(); ++i) {
(*i)->execute(context,
- !_deleting || ((*i)->head()->parent_node() != _node));
+ !_deleting || ((*i)->head()->parent_block() != _block));
}
}
diff --git a/src/server/events/DisconnectAll.hpp b/src/server/events/DisconnectAll.hpp
index 12c04ffa..68ba8ebe 100644
--- a/src/server/events/DisconnectAll.hpp
+++ b/src/server/events/DisconnectAll.hpp
@@ -27,8 +27,8 @@
namespace Ingen {
namespace Server {
+class BlockImpl;
class CompiledPatch;
-class NodeImpl;
class PatchImpl;
class PortImpl;
@@ -36,7 +36,7 @@ namespace Events {
class Disconnect;
-/** An event to disconnect all connections to a Node.
+/** An event to disconnect all connections to a Block.
*
* \ingroup engine
*/
@@ -66,7 +66,7 @@ private:
Raul::Path _parent_path;
Raul::Path _path;
PatchImpl* _parent;
- NodeImpl* _node;
+ BlockImpl* _block;
PortImpl* _port;
Impls _impls;
CompiledPatch* _compiled_patch;
diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp
index 294a15b3..24b4daae 100644
--- a/src/server/events/Get.cpp
+++ b/src/server/events/Get.cpp
@@ -20,12 +20,12 @@
#include "ingen/Interface.hpp"
#include "ingen/Store.hpp"
+#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
#include "BufferFactory.hpp"
#include "Driver.hpp"
#include "Engine.hpp"
#include "Get.hpp"
-#include "NodeImpl.hpp"
#include "PatchImpl.hpp"
#include "PluginImpl.hpp"
#include "PortImpl.hpp"
@@ -56,7 +56,7 @@ Get::pre_process()
_lock.acquire();
if (_uri == "ingen:plugins") {
- _plugins = _engine.node_factory()->plugins();
+ _plugins = _engine.block_factory()->plugins();
return Event::pre_process_done(SUCCESS);
} else if (_uri == "ingen:engine") {
return Event::pre_process_done(SUCCESS);
@@ -64,7 +64,7 @@ Get::pre_process()
_object = _engine.store()->get(GraphObject::uri_to_path(_uri));
return Event::pre_process_done(_object ? SUCCESS : NOT_FOUND, _uri);
} else {
- _plugin = _engine.node_factory()->plugin(_uri);
+ _plugin = _engine.block_factory()->plugin(_uri);
return Event::pre_process_done(_plugin ? SUCCESS : NOT_FOUND, _uri);
}
}
@@ -84,15 +84,15 @@ send_port(Interface* client, const PortImpl* port)
}
static void
-send_node(Interface* client, const NodeImpl* node)
+send_block(Interface* client, const BlockImpl* block)
{
- PluginImpl* const plugin = node->plugin_impl();
+ PluginImpl* const plugin = block->plugin_impl();
if (plugin->type() == Plugin::Patch) {
- send_patch(client, (const PatchImpl*)node);
+ send_patch(client, (const PatchImpl*)block);
} else {
- client->put(node->uri(), node->properties());
- for (size_t j = 0; j < node->num_ports(); ++j) {
- send_port(client, node->port_impl(j));
+ client->put(block->uri(), block->properties());
+ for (size_t j = 0; j < block->num_ports(); ++j) {
+ send_port(client, block->port_impl(j));
}
}
}
@@ -108,10 +108,10 @@ send_patch(Interface* client, const PatchImpl* patch)
patch->properties(Resource::EXTERNAL),
Resource::EXTERNAL);
- // Send nodes
- for (PatchImpl::Nodes::const_iterator j = patch->nodes().begin();
- j != patch->nodes().end(); ++j) {
- send_node(client, &*j);
+ // Send blocks
+ for (PatchImpl::Blocks::const_iterator j = patch->blocks().begin();
+ j != patch->blocks().end(); ++j) {
+ send_block(client, &*j);
}
// Send ports
@@ -141,13 +141,13 @@ Get::post_process()
uris.forge.make(int32_t(_engine.driver()->sample_rate())));
} else if (_object) {
_request_client->bundle_begin();
- const NodeImpl* node = NULL;
+ const BlockImpl* block = NULL;
const PatchImpl* patch = NULL;
const PortImpl* port = NULL;
if ((patch = dynamic_cast<const PatchImpl*>(_object))) {
send_patch(_request_client.get(), patch);
- } else if ((node = dynamic_cast<const NodeImpl*>(_object))) {
- send_node(_request_client.get(), node);
+ } else if ((block = dynamic_cast<const BlockImpl*>(_object))) {
+ send_block(_request_client.get(), block);
} else if ((port = dynamic_cast<const PortImpl*>(_object))) {
send_port(_request_client.get(), port);
}
diff --git a/src/server/events/Get.hpp b/src/server/events/Get.hpp
index 12cedd4d..7b33304e 100644
--- a/src/server/events/Get.hpp
+++ b/src/server/events/Get.hpp
@@ -20,7 +20,7 @@
#include <glibmm/thread.h>
#include "Event.hpp"
-#include "NodeFactory.hpp"
+#include "BlockFactory.hpp"
#include "types.hpp"
namespace Ingen {
@@ -51,7 +51,7 @@ private:
const Raul::URI _uri;
const GraphObject* _object;
const PluginImpl* _plugin;
- NodeFactory::Plugins _plugins;
+ BlockFactory::Plugins _plugins;
Glib::RWLock::ReaderLock _lock;
};
diff --git a/src/server/events/Move.cpp b/src/server/events/Move.cpp
index 5fa58825..d5b4d116 100644
--- a/src/server/events/Move.cpp
+++ b/src/server/events/Move.cpp
@@ -19,11 +19,11 @@
#include "ingen/Store.hpp"
#include "raul/Path.hpp"
+#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
#include "Driver.hpp"
#include "Engine.hpp"
#include "EnginePort.hpp"
-#include "NodeImpl.hpp"
#include "PatchImpl.hpp"
#include "events/Move.hpp"
diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp
index d81a38f7..7a994caa 100644
--- a/src/server/events/SetPortValue.cpp
+++ b/src/server/events/SetPortValue.cpp
@@ -19,12 +19,12 @@
#include "ingen/URIs.hpp"
#include "ingen/World.hpp"
+#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
#include "Buffer.hpp"
#include "ControlBindings.hpp"
#include "Driver.hpp"
#include "Engine.hpp"
-#include "NodeImpl.hpp"
#include "PortImpl.hpp"
#include "ProcessContext.hpp"
#include "SetPortValue.hpp"
@@ -71,7 +71,7 @@ SetPortValue::execute(ProcessContext& context)
{
assert(_time >= context.start() && _time <= context.end());
- if (_port->parent_node()->context() == Context::MESSAGE)
+ if (_port->parent_block()->context() == Context::MESSAGE)
return;
apply(context);