diff options
Diffstat (limited to 'src/libs')
62 files changed, 194 insertions, 194 deletions
diff --git a/src/libs/engine/ClientBroadcaster.cpp b/src/libs/engine/ClientBroadcaster.cpp index be765390..ce916ca9 100644 --- a/src/libs/engine/ClientBroadcaster.cpp +++ b/src/libs/engine/ClientBroadcaster.cpp @@ -24,7 +24,7 @@ #include "NodeFactory.hpp" #include "util.hpp" #include "Patch.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Plugin.hpp" #include "Port.hpp" #include "Connection.hpp" @@ -122,7 +122,7 @@ ClientBroadcaster::send_plugins(const list<Plugin*>& plugin_list) void -ClientBroadcaster::send_node(const Node* node, bool recursive) +ClientBroadcaster::send_node(const NodeImpl* node, bool recursive) { for (Clients::const_iterator i = _clients.begin(); i != _clients.end(); ++i) ObjectSender::send_node((*i).second, node, recursive); diff --git a/src/libs/engine/ClientBroadcaster.hpp b/src/libs/engine/ClientBroadcaster.hpp index ea2563be..a40b2579 100644 --- a/src/libs/engine/ClientBroadcaster.hpp +++ b/src/libs/engine/ClientBroadcaster.hpp @@ -26,13 +26,11 @@ #include "interface/ClientInterface.hpp" #include "types.hpp" -using std::map; using std::string; -using std::list; namespace Ingen { -class Node; +class NodeImpl; class Port; class Plugin; class Patch; @@ -63,9 +61,9 @@ public: // Error that isn't the direct result of a request void send_error(const string& msg); - void send_plugins(const list<Plugin*>& plugin_list); + void send_plugins(const std::list<Plugin*>& plugin_list); void send_patch(const Patch* const p, bool recursive); - void send_node(const Node* const node, bool recursive); + void send_node(const NodeImpl* const node, bool recursive); void send_port(const Port* port); void send_destroyed(const string& path); void send_polyphonic(const string& path, bool polyphonic); @@ -82,7 +80,7 @@ public: void send_program_add(const string& node_path, int bank, int program, const string& name); void send_program_remove(const string& node_path, int bank, int program); - void send_plugins_to(ClientInterface*, const list<Plugin*>& plugin_list); + void send_plugins_to(ClientInterface*, const std::list<Plugin*>& plugin_list); private: typedef std::map<string, ClientInterface*> Clients; diff --git a/src/libs/engine/CompiledPatch.hpp b/src/libs/engine/CompiledPatch.hpp index 953d94d6..9ca1d6e9 100644 --- a/src/libs/engine/CompiledPatch.hpp +++ b/src/libs/engine/CompiledPatch.hpp @@ -34,25 +34,25 @@ namespace Ingen { /** All information required about a node to execute it in an audio thread. */ struct CompiledNode { - CompiledNode(Node* n, size_t np, List<Node*>* d) + CompiledNode(NodeImpl* n, size_t np, List<NodeImpl*>* d) : _node(n), _n_providers(np) { // Copy to a vector for maximum iteration speed and cache optimization // (Need to take a copy anyway) _dependants.reserve(d->size()); - for (List<Node*>::iterator i = d->begin(); i != d->end(); ++i) + for (List<NodeImpl*>::iterator i = d->begin(); i != d->end(); ++i) _dependants.push_back(*i); } - Node* node() const { return _node; } - size_t n_providers() const { return _n_providers; } - const vector<Node*>& dependants() const { return _dependants; } + NodeImpl* node() const { return _node; } + size_t n_providers() const { return _n_providers; } + const vector<NodeImpl*>& dependants() const { return _dependants; } private: - Node* _node; - size_t _n_providers; ///< Number of input ready signals to trigger run - vector<Node*> _dependants; ///< Nodes this one's output ports are connected to + NodeImpl* _node; + size_t _n_providers; ///< Number of input ready signals to trigger run + vector<NodeImpl*> _dependants; ///< Nodes this one's output ports are connected to }; diff --git a/src/libs/engine/Connection.cpp b/src/libs/engine/Connection.cpp index fedd2198..5b45f6fc 100644 --- a/src/libs/engine/Connection.cpp +++ b/src/libs/engine/Connection.cpp @@ -19,7 +19,7 @@ #include <raul/Maid.hpp> #include "util.hpp" #include "Connection.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Port.hpp" #include "BufferFactory.hpp" #include "AudioBuffer.hpp" diff --git a/src/libs/engine/DuplexPort.cpp b/src/libs/engine/DuplexPort.cpp index 04b97460..b349a7d6 100644 --- a/src/libs/engine/DuplexPort.cpp +++ b/src/libs/engine/DuplexPort.cpp @@ -22,14 +22,14 @@ #include "DuplexPort.hpp" #include "Connection.hpp" #include "OutputPort.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" using namespace std; namespace Ingen { -DuplexPort::DuplexPort(Node* parent, const string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size, bool is_output) +DuplexPort::DuplexPort(NodeImpl* parent, const string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size, bool is_output) : Port(parent, name, index, poly, type, buffer_size) , InputPort(parent, name, index, poly, type, buffer_size) , OutputPort(parent, name, index, poly, type, buffer_size) diff --git a/src/libs/engine/DuplexPort.hpp b/src/libs/engine/DuplexPort.hpp index 0af45c1e..c8413b70 100644 --- a/src/libs/engine/DuplexPort.hpp +++ b/src/libs/engine/DuplexPort.hpp @@ -27,7 +27,7 @@ namespace Ingen { -class Node; +class NodeImpl; /** A duplex port (which is both an InputPort and an OutputPort) @@ -41,7 +41,7 @@ class Node; class DuplexPort : public InputPort, public OutputPort { public: - DuplexPort(Node* parent, const std::string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size, bool is_output); + DuplexPort(NodeImpl* parent, const std::string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size, bool is_output); virtual ~DuplexPort() {} void pre_process(ProcessContext& context); diff --git a/src/libs/engine/GraphObjectImpl.cpp b/src/libs/engine/GraphObjectImpl.cpp index 966f8238..d0820f61 100644 --- a/src/libs/engine/GraphObjectImpl.cpp +++ b/src/libs/engine/GraphObjectImpl.cpp @@ -25,7 +25,7 @@ namespace Ingen { Patch* GraphObjectImpl::parent_patch() const { - return dynamic_cast<Patch*>((Node*)_parent); + return dynamic_cast<Patch*>((NodeImpl*)_parent); } diff --git a/src/libs/engine/GraphObjectImpl.hpp b/src/libs/engine/GraphObjectImpl.hpp index 1fa6ad06..74d24763 100644 --- a/src/libs/engine/GraphObjectImpl.hpp +++ b/src/libs/engine/GraphObjectImpl.hpp @@ -47,26 +47,16 @@ class ProcessContext; * * \ingroup engine */ -class GraphObjectImpl : public Ingen::Shared::GraphObject +class GraphObjectImpl : virtual public Ingen::Shared::GraphObject { public: - typedef std::map<string, Atom> MetadataMap; - - GraphObjectImpl(GraphObjectImpl* parent, const string& name, bool polyphonic=false) - : _parent(parent), _name(name), _polyphonic(polyphonic) - { - assert(parent == NULL || _name.length() > 0); - assert(_name.find("/") == string::npos); - assert(path().find("//") == string::npos); - } - virtual ~GraphObjectImpl() {} bool polyphonic() const { return _polyphonic; } virtual void set_polyphonic(Raul::Maid& maid, bool p) { _polyphonic = p; } inline GraphObjectImpl* parent() const { return _parent; } - inline const string& name() const { return _name; } + const string& name() const { return _name; } virtual void process(ProcessContext& context) = 0; @@ -92,7 +82,7 @@ public: virtual Patch* parent_patch() const; /** Path is dynamically generated from parent to ease renaming */ - inline const Path path() const { + const Path path() const { if (_parent == NULL) return Path(string("/").append(_name)); else if (_parent->path() == "/") @@ -102,6 +92,14 @@ public: } protected: + GraphObjectImpl(GraphObjectImpl* parent, const string& name, bool polyphonic=false) + : _parent(parent), _name(name), _polyphonic(polyphonic) + { + assert(parent == NULL || _name.length() > 0); + assert(_name.find("/") == string::npos); + assert(path().find("//") == string::npos); + } + GraphObjectImpl* _parent; std::string _name; bool _polyphonic; diff --git a/src/libs/engine/InputPort.cpp b/src/libs/engine/InputPort.cpp index bb3e57ce..678e3d8d 100644 --- a/src/libs/engine/InputPort.cpp +++ b/src/libs/engine/InputPort.cpp @@ -22,7 +22,7 @@ #include "AudioBuffer.hpp" #include "Connection.hpp" #include "OutputPort.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "ProcessContext.hpp" #include "util.hpp" @@ -31,7 +31,7 @@ using namespace std; namespace Ingen { -InputPort::InputPort(Node* parent, const string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size) +InputPort::InputPort(NodeImpl* parent, const string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size) : Port(parent, name, index, poly, type, buffer_size) { } diff --git a/src/libs/engine/InputPort.hpp b/src/libs/engine/InputPort.hpp index bb8bf26b..ffba62e6 100644 --- a/src/libs/engine/InputPort.hpp +++ b/src/libs/engine/InputPort.hpp @@ -30,7 +30,7 @@ namespace Ingen { class Connection; class OutputPort; -class Node; +class NodeImpl; /** An input port on a Node or Patch. @@ -47,7 +47,7 @@ class Node; class InputPort : virtual public Port { public: - InputPort(Node* parent, const string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size); + InputPort(NodeImpl* parent, const string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size); virtual ~InputPort() {} void add_connection(Raul::ListNode<Connection*>* c); diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp index 0d4eb878..c8350b5c 100644 --- a/src/libs/engine/JackAudioDriver.cpp +++ b/src/libs/engine/JackAudioDriver.cpp @@ -28,7 +28,7 @@ #include "QueuedEvent.hpp" #include "EventSource.hpp" #include "PostProcessor.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Patch.hpp" #include "Port.hpp" #include "MidiDriver.hpp" diff --git a/src/libs/engine/JackMidiDriver.hpp b/src/libs/engine/JackMidiDriver.hpp index 5d7ae493..54d0cc1a 100644 --- a/src/libs/engine/JackMidiDriver.hpp +++ b/src/libs/engine/JackMidiDriver.hpp @@ -26,7 +26,7 @@ namespace Ingen { -class Node; +class NodeImpl; class SetPortValueEvent; class JackMidiDriver; class DuplexPort; diff --git a/src/libs/engine/NodeBase.cpp b/src/libs/engine/NodeBase.cpp index f5d8d11a..3d30d604 100644 --- a/src/libs/engine/NodeBase.cpp +++ b/src/libs/engine/NodeBase.cpp @@ -34,7 +34,7 @@ namespace Ingen { NodeBase::NodeBase(const Plugin* plugin, const string& name, bool polyphonic, Patch* parent, SampleRate srate, size_t buffer_size) -: Node(parent, name, polyphonic), +: NodeImpl(parent, name, polyphonic), _plugin(plugin), _polyphony((polyphonic && parent) ? parent->internal_poly() : 1), _srate(srate), @@ -45,8 +45,8 @@ NodeBase::NodeBase(const Plugin* plugin, const string& name, bool polyphonic, Pa _process_lock(0), _n_inputs_ready(0), _ports(NULL), - _providers(new Raul::List<Node*>()), - _dependants(new Raul::List<Node*>()) + _providers(new Raul::List<NodeImpl*>()), + _dependants(new Raul::List<NodeImpl*>()) { assert(_plugin); assert(_polyphony > 0); diff --git a/src/libs/engine/NodeBase.hpp b/src/libs/engine/NodeBase.hpp index d81b90a1..833e4edd 100644 --- a/src/libs/engine/NodeBase.hpp +++ b/src/libs/engine/NodeBase.hpp @@ -23,7 +23,7 @@ #include <cstdlib> #include <raul/Semaphore.hpp> #include <raul/AtomicInt.hpp> -#include "Node.hpp" +#include "NodeImpl.hpp" using std::string; @@ -44,7 +44,7 @@ namespace Shared { * * \ingroup engine */ -class NodeBase : public Node +class NodeBase : public NodeImpl { public: NodeBase(const Plugin* plugin, @@ -90,11 +90,11 @@ public: * The providers and dependants in CompiledNode are for that */ - virtual Raul::List<Node*>* providers() { return _providers; } - virtual void providers(Raul::List<Node*>* l) { _providers = l; } + Raul::List<NodeImpl*>* providers() { return _providers; } + void providers(Raul::List<NodeImpl*>* l) { _providers = l; } - virtual Raul::List<Node*>* dependants() { return _dependants; } - virtual void dependants(Raul::List<Node*>* l) { _dependants = l; } + Raul::List<NodeImpl*>* dependants() { return _dependants; } + void dependants(Raul::List<NodeImpl*>* l) { _dependants = l; } virtual const Plugin* plugin() const { return _plugin; } @@ -111,13 +111,13 @@ protected: size_t _buffer_size; bool _activated; - bool _traversed; ///< Flag for process order algorithm - Raul::Semaphore _input_ready; ///< Parallelism: input ready signal - Raul::AtomicInt _process_lock; ///< Parallelism: Waiting on inputs 'lock' - Raul::AtomicInt _n_inputs_ready; ///< Parallelism: # input ready signals this cycle - Raul::Array<Port*>* _ports; ///< Access in audio thread only - Raul::List<Node*>* _providers; ///< Nodes connected to this one's input ports - Raul::List<Node*>* _dependants; ///< Nodes this one's output ports are connected to + bool _traversed; ///< Flag for process order algorithm + Raul::Semaphore _input_ready; ///< Parallelism: input ready signal + Raul::AtomicInt _process_lock; ///< Parallelism: Waiting on inputs 'lock' + Raul::AtomicInt _n_inputs_ready; ///< Parallelism: # input ready signals this cycle + Raul::Array<Port*>* _ports; ///< Access in audio thread only + Raul::List<NodeImpl*>* _providers; ///< Nodes connected to this one's input ports + Raul::List<NodeImpl*>* _dependants; ///< Nodes this one's output ports are connected to }; diff --git a/src/libs/engine/NodeFactory.cpp b/src/libs/engine/NodeFactory.cpp index 74b700ac..8be55161 100644 --- a/src/libs/engine/NodeFactory.cpp +++ b/src/libs/engine/NodeFactory.cpp @@ -60,7 +60,7 @@ NodeFactory::NodeFactory(Ingen::Shared::World* world) Patch* parent = new Patch(*world->local_engine, "dummy", 1, NULL, 1, 1, 1); - Node* n = NULL; + NodeImpl* n = NULL; n = new MidiNoteNode("foo", 1, parent, 1, 1); _internal_plugins.push_back(new Plugin(n->plugin())); delete n; @@ -175,7 +175,7 @@ NodeFactory::load_plugins() * * Calls the load_*_plugin functions to actually do things, just a wrapper. */ -Node* +NodeImpl* NodeFactory::load_plugin(const Plugin* a_plugin, const string& name, bool polyphonic, @@ -184,7 +184,7 @@ NodeFactory::load_plugin(const Plugin* a_plugin, assert(parent != NULL); assert(a_plugin); - Node* r = NULL; + NodeImpl* r = NULL; Plugin* plugin = NULL; const SampleRate srate = parent->sample_rate(); @@ -251,7 +251,7 @@ NodeFactory::load_plugin(const Plugin* a_plugin, /** Loads an internal plugin. */ -Node* +NodeImpl* NodeFactory::load_internal_plugin(const string& uri, const string& name, bool polyphonic, @@ -324,9 +324,9 @@ NodeFactory::load_lv2_plugins() /** Loads a LV2 plugin. - * Returns 'poly' independant plugins as a Node* + * Returns 'poly' independant plugins as a NodeImpl* */ -Node* +NodeImpl* NodeFactory::load_lv2_plugin(const string& plug_uri, const string& node_name, bool polyphonic, @@ -342,7 +342,7 @@ NodeFactory::load_lv2_plugin(const string& plug_uri, if ((*i)->uri() == plug_uri) break; } - Node* n = NULL; + NodeImpl* n = NULL; if (plugin) { n = new LV2Node(plugin, node_name, polyphonic, parent, srate, buffer_size); @@ -460,7 +460,7 @@ NodeFactory::load_dssi_plugins() /** Creates a Node by instancing a DSSI plugin. */ -Node* +NodeImpl* NodeFactory::load_dssi_plugin(const string& uri, const string& name, bool polyphonic, @@ -475,7 +475,7 @@ NodeFactory::load_dssi_plugin(const string& uri, DSSI_Descriptor_Function df = NULL; const Plugin* plugin = NULL; - Node* n = NULL; + NodeImpl* n = NULL; // Attempt to find the lib list<Plugin*>::iterator i; @@ -626,9 +626,9 @@ NodeFactory::load_ladspa_plugins() /** Loads a LADSPA plugin. - * Returns 'poly' independant plugins as a Node* + * Returns 'poly' independant plugins as a NodeImpl* */ -Node* +NodeImpl* NodeFactory::load_ladspa_plugin(const string& uri, const string& name, bool polyphonic, @@ -641,7 +641,7 @@ NodeFactory::load_ladspa_plugin(const string& uri, LADSPA_Descriptor_Function df = NULL; Plugin* plugin = NULL; - Node* n = NULL; + NodeImpl* n = NULL; // Attempt to find the lib list<Plugin*>::iterator i; diff --git a/src/libs/engine/NodeFactory.hpp b/src/libs/engine/NodeFactory.hpp index d8f662d4..8538d33d 100644 --- a/src/libs/engine/NodeFactory.hpp +++ b/src/libs/engine/NodeFactory.hpp @@ -36,7 +36,7 @@ using std::string; using std::list; namespace Ingen { -class Node; +class NodeImpl; class Patch; class Plugin; @@ -58,7 +58,7 @@ public: ~NodeFactory(); void load_plugins(); - Node* load_plugin(const Plugin* info, const string& name, bool polyphonic, Patch* parent); + NodeImpl* load_plugin(const Plugin* info, const string& name, bool polyphonic, Patch* parent); const list<Plugin*>& plugins() { return _plugins; } @@ -68,20 +68,20 @@ public: private: #ifdef HAVE_LADSPA void load_ladspa_plugins(); - Node* load_ladspa_plugin(const string& plugin_uri, const string& name, bool polyphonic, Patch* parent, SampleRate srate, size_t buffer_size); + NodeImpl* load_ladspa_plugin(const string& plugin_uri, const string& name, bool polyphonic, Patch* parent, SampleRate srate, size_t buffer_size); #endif #ifdef HAVE_SLV2 void load_lv2_plugins(); - Node* load_lv2_plugin(const string& plugin_uri, const string& name, bool polyphonic, Patch* parent, SampleRate srate, size_t buffer_size); + NodeImpl* load_lv2_plugin(const string& plugin_uri, const string& name, bool polyphonic, Patch* parent, SampleRate srate, size_t buffer_size); #endif #ifdef HAVE_DSSI void load_dssi_plugins(); - Node* load_dssi_plugin(const string& plugin_uri, const string& name, bool polyphonic, Patch* parent, SampleRate srate, size_t buffer_size); + NodeImpl* load_dssi_plugin(const string& plugin_uri, const string& name, bool polyphonic, Patch* parent, SampleRate srate, size_t buffer_size); #endif - Node* load_internal_plugin(const string& plug_label, const string& name, bool polyphonic, Patch* parent, SampleRate srate, size_t buffer_size); + NodeImpl* load_internal_plugin(const string& plug_label, const string& name, bool polyphonic, Patch* parent, SampleRate srate, size_t buffer_size); Glib::Module* library(const string& path); diff --git a/src/libs/engine/Node.hpp b/src/libs/engine/NodeImpl.hpp index 083ceea2..97c9e8d4 100644 --- a/src/libs/engine/Node.hpp +++ b/src/libs/engine/NodeImpl.hpp @@ -15,11 +15,12 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef NODE_H -#define NODE_H +#ifndef NODEIMPL_H +#define NODEIMPL_H #include <string> #include <raul/Array.hpp> +#include "interface/Node.hpp" #include "types.hpp" #include "GraphObjectImpl.hpp" @@ -31,8 +32,6 @@ class Buffer; class Plugin; class Patch; class Port; -class OutputPort; -namespace Shared { class ClientInterface; } /** A Node (or "module") in a Patch (which is also a Node). @@ -46,15 +45,13 @@ namespace Shared { class ClientInterface; } * * \ingroup engine */ -class Node : public GraphObjectImpl +class NodeImpl : public GraphObjectImpl, public Ingen::Shared::Node { public: - Node(GraphObjectImpl* parent, const std::string& name, bool poly) + NodeImpl(GraphObjectImpl* parent, const std::string& name, bool poly) : GraphObjectImpl(parent, name, poly) {} - virtual ~Node() {} - /** Activate this Node. * * This function will be called in a non-realtime thread before it is @@ -133,14 +130,14 @@ public: /** Nodes that are connected to this Node's inputs. * (This Node depends on them) */ - virtual Raul::List<Node*>* providers() = 0; - virtual void providers(Raul::List<Node*>* l) = 0; + virtual Raul::List<NodeImpl*>* providers() = 0; + virtual void providers(Raul::List<NodeImpl*>* l) = 0; /** Nodes are are connected to this Node's outputs. * (They depend on this Node) */ - virtual Raul::List<Node*>* dependants() = 0; - virtual void dependants(Raul::List<Node*>* l) = 0; + virtual Raul::List<NodeImpl*>* dependants() = 0; + virtual void dependants(Raul::List<NodeImpl*>* l) = 0; /** The Patch this Node belongs to. */ virtual Patch* parent_patch() const = 0; @@ -156,4 +153,4 @@ public: } // namespace Ingen -#endif // NODE_H +#endif // NODEIMPL_H diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp index d719cfa1..8ea06fa6 100644 --- a/src/libs/engine/OSCClientSender.cpp +++ b/src/libs/engine/OSCClientSender.cpp @@ -24,7 +24,7 @@ #include "NodeFactory.hpp" #include "util.hpp" #include "Patch.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Plugin.hpp" #include "Port.hpp" #include "Connection.hpp" diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp index 07cb0f01..f0919257 100644 --- a/src/libs/engine/ObjectSender.cpp +++ b/src/libs/engine/ObjectSender.cpp @@ -19,7 +19,7 @@ #include "interface/ClientInterface.hpp" #include "ObjectStore.hpp" #include "Patch.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Port.hpp" #include "Port.hpp" #include "Connection.hpp" @@ -38,10 +38,10 @@ ObjectSender::send_patch(ClientInterface* client, const Patch* patch, bool recur if (recursive) { // Send nodes - for (Raul::List<Node*>::const_iterator j = patch->nodes().begin(); + for (Raul::List<NodeImpl*>::const_iterator j = patch->nodes().begin(); j != patch->nodes().end(); ++j) { - const Node* const node = (*j); + const NodeImpl* const node = (*j); send_node(client, node, true); } @@ -75,7 +75,7 @@ ObjectSender::send_patch(ClientInterface* client, const Patch* patch, bool recur /** Sends a node or a patch */ void -ObjectSender::send_node(ClientInterface* client, const Node* node, bool recursive) +ObjectSender::send_node(ClientInterface* client, const NodeImpl* node, bool recursive) { const Plugin* const plugin = node->plugin(); diff --git a/src/libs/engine/ObjectSender.hpp b/src/libs/engine/ObjectSender.hpp index 51ecb34c..fdd39101 100644 --- a/src/libs/engine/ObjectSender.hpp +++ b/src/libs/engine/ObjectSender.hpp @@ -27,7 +27,7 @@ namespace Shared { } using Shared::ClientInterface; class Patch; -class Node; +class NodeImpl; class Port; class Plugin; @@ -47,7 +47,7 @@ public: // FIXME: Make all object parameters const static void send_patch(ClientInterface* client, const Patch* patch, bool recursive); - static void send_node(ClientInterface* client, const Node* node, bool recursive); + static void send_node(ClientInterface* client, const NodeImpl* node, bool recursive); static void send_port(ClientInterface* client, const Port* port); static void send_plugins(ClientInterface* client, const std::list<Plugin*>& plugs); }; diff --git a/src/libs/engine/ObjectStore.cpp b/src/libs/engine/ObjectStore.cpp index 27e7565b..b321e51c 100644 --- a/src/libs/engine/ObjectStore.cpp +++ b/src/libs/engine/ObjectStore.cpp @@ -22,7 +22,7 @@ #include <raul/TableImpl.hpp> #include "ObjectStore.hpp" #include "Patch.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Port.hpp" #include "ThreadManager.hpp" @@ -44,11 +44,11 @@ ObjectStore::find_patch(const Path& path) /** Find the Node at the given path. */ -Node* +NodeImpl* ObjectStore::find_node(const Path& path) { GraphObjectImpl* const object = find_object(path); - return dynamic_cast<Node*>(object); + return dynamic_cast<NodeImpl*>(object); } @@ -82,7 +82,7 @@ ObjectStore::add(GraphObjectImpl* o) cerr << "[ObjectStore] Adding " << o->path() << endl; _objects.insert(make_pair(o->path(), o)); - Node* node = dynamic_cast<Node*>(o); + NodeImpl* node = dynamic_cast<NodeImpl*>(o); if (node) { for (uint32_t i=0; i < node->num_ports(); ++i) { add(node->ports().at(i)); diff --git a/src/libs/engine/ObjectStore.hpp b/src/libs/engine/ObjectStore.hpp index d0504d70..e99450ab 100644 --- a/src/libs/engine/ObjectStore.hpp +++ b/src/libs/engine/ObjectStore.hpp @@ -27,7 +27,7 @@ using namespace Raul; namespace Ingen { class Patch; -class Node; +class NodeImpl; class Port; class GraphObjectImpl; @@ -47,7 +47,7 @@ public: typedef Raul::PathTable<GraphObjectImpl*> Objects; Patch* find_patch(const Path& path); - Node* find_node(const Path& path); + NodeImpl* find_node(const Path& path); Port* find_port(const Path& path); GraphObjectImpl* find_object(const Path& path); diff --git a/src/libs/engine/OutputPort.hpp b/src/libs/engine/OutputPort.hpp index bd42f07d..54f4f2bc 100644 --- a/src/libs/engine/OutputPort.hpp +++ b/src/libs/engine/OutputPort.hpp @@ -40,7 +40,7 @@ namespace Ingen { class OutputPort : virtual public Port { public: - OutputPort(Node* parent, + OutputPort(NodeImpl* parent, const string& name, uint32_t index, uint32_t poly, diff --git a/src/libs/engine/Patch.cpp b/src/libs/engine/Patch.cpp index b717142a..70f3b535 100644 --- a/src/libs/engine/Patch.cpp +++ b/src/libs/engine/Patch.cpp @@ -19,7 +19,7 @@ #include <cmath> #include <iostream> #include "ThreadManager.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Patch.hpp" #include "Plugin.hpp" #include "Port.hpp" @@ -59,7 +59,7 @@ Patch::~Patch() delete _connections.erase(i); } - for (Raul::List<Node*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) { + for (Raul::List<NodeImpl*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) { assert(!(*i)->activated()); delete (*i); delete _nodes.erase(i); @@ -74,7 +74,7 @@ Patch::activate() { NodeBase::activate(); - for (Raul::List<Node*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) + for (Raul::List<NodeImpl*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) (*i)->activate(); assert(_activated); @@ -88,7 +88,7 @@ Patch::deactivate() NodeBase::deactivate(); - for (Raul::List<Node*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) { + for (Raul::List<NodeImpl*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) { if ((*i)->activated()) (*i)->deactivate(); assert(!(*i)->activated()); @@ -113,7 +113,7 @@ Patch::prepare_internal_poly(uint32_t poly) { /* TODO: ports? internal/external poly? */ - for (Raul::List<Node*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) + for (Raul::List<NodeImpl*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) (*i)->prepare_poly(poly); for (Raul::List<Connection*>::iterator i = _connections.begin(); i != _connections.end(); ++i) @@ -130,7 +130,7 @@ Patch::apply_internal_poly(Raul::Maid& maid, uint32_t poly) { /* TODO: ports? internal/external poly? */ - for (Raul::List<Node*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) + for (Raul::List<NodeImpl*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) (*i)->apply_poly(maid, poly); for (Raul::List<Connection*>::iterator i = _connections.begin(); i != _connections.end(); ++i) @@ -248,7 +248,7 @@ Patch::set_buffer_size(size_t size) NodeBase::set_buffer_size(size); assert(_buffer_size == size); - for (Raul::List<Node*>::iterator j = _nodes.begin(); j != _nodes.end(); ++j) + for (Raul::List<NodeImpl*>::iterator j = _nodes.begin(); j != _nodes.end(); ++j) (*j)->set_buffer_size(size); } @@ -257,7 +257,7 @@ Patch::set_buffer_size(size_t size) void -Patch::add_node(Raul::ListNode<Node*>* ln) +Patch::add_node(Raul::ListNode<NodeImpl*>* ln) { assert(ln != NULL); assert(ln->elem() != NULL); @@ -271,10 +271,10 @@ Patch::add_node(Raul::ListNode<Node*>* ln) /** Remove a node. * Realtime Safe. Preprocessing thread. */ -Raul::ListNode<Node*>* +Raul::ListNode<NodeImpl*>* Patch::remove_node(const string& name) { - for (Raul::List<Node*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) + for (Raul::List<NodeImpl*>::iterator i = _nodes.begin(); i != _nodes.end(); ++i) if ((*i)->name() == name) return _nodes.erase(i); @@ -405,19 +405,19 @@ Patch::compile() const CompiledPatch* const compiled_patch = new CompiledPatch();//_nodes.size()); - for (Raul::List<Node*>::const_iterator i = _nodes.begin(); i != _nodes.end(); ++i) + for (Raul::List<NodeImpl*>::const_iterator i = _nodes.begin(); i != _nodes.end(); ++i) (*i)->traversed(false); - for (Raul::List<Node*>::const_iterator i = _nodes.begin(); i != _nodes.end(); ++i) { - Node* const node = (*i); + for (Raul::List<NodeImpl*>::const_iterator i = _nodes.begin(); i != _nodes.end(); ++i) { + NodeImpl* const node = (*i); // Either a sink or connected to our output ports: if ( ( ! node->traversed()) && node->dependants()->size() == 0) compile_recursive(node, compiled_patch); } // Traverse any nodes we didn't hit yet - for (Raul::List<Node*>::const_iterator i = _nodes.begin(); i != _nodes.end(); ++i) { - Node* const node = (*i); + for (Raul::List<NodeImpl*>::const_iterator i = _nodes.begin(); i != _nodes.end(); ++i) { + NodeImpl* const node = (*i); if ( ! node->traversed()) compile_recursive(node, compiled_patch); } diff --git a/src/libs/engine/Patch.hpp b/src/libs/engine/Patch.hpp index 6bd07768..bd1723a5 100644 --- a/src/libs/engine/Patch.hpp +++ b/src/libs/engine/Patch.hpp @@ -48,7 +48,14 @@ class CompiledPatch; class Patch : public NodeBase { public: - Patch(Engine& engine, const string& name, uint32_t poly, Patch* parent, SampleRate srate, size_t buffer_size, uint32_t local_poly); + Patch(Engine& engine, + const string& name, + uint32_t poly, + Patch* parent, + SampleRate srate, + size_t buffer_size, + uint32_t local_poly); + virtual ~Patch(); void activate(); @@ -76,13 +83,13 @@ public: // Patch specific stuff not inherited from Node - void add_node(Raul::ListNode<Node*>* tn); - Raul::ListNode<Node*>* remove_node(const string& name); + void add_node(Raul::ListNode<NodeImpl*>* tn); + Raul::ListNode<NodeImpl*>* remove_node(const string& name); - Raul::List<Node*>& nodes() { return _nodes; } + Raul::List<NodeImpl*>& nodes() { return _nodes; } Raul::List<Connection*>& connections() { return _connections; } - const Raul::List<Node*>& nodes() const { return _nodes; } + const Raul::List<NodeImpl*>& nodes() const { return _nodes; } const Raul::List<Connection*>& connections() const { return _connections; } uint32_t num_ports() const; @@ -112,7 +119,7 @@ public: uint32_t internal_poly() const { return _internal_poly; } private: - inline void compile_recursive(Node* n, CompiledPatch* output) const; + inline void compile_recursive(NodeImpl* n, CompiledPatch* output) const; void process_parallel(ProcessContext& context); void process_single(ProcessContext& context); @@ -122,7 +129,7 @@ private: Raul::List<Connection*> _connections; ///< Accessed in audio thread only Raul::List<Port*> _input_ports; ///< Accessed in preprocessing thread only Raul::List<Port*> _output_ports; ///< Accessed in preprocessing thread only - Raul::List<Node*> _nodes; ///< Accessed in preprocessing thread only + Raul::List<NodeImpl*> _nodes; ///< Accessed in preprocessing thread only bool _process; }; @@ -130,7 +137,7 @@ private: /** Private helper for compile */ inline void -Patch::compile_recursive(Node* n, CompiledPatch* output) const +Patch::compile_recursive(NodeImpl* n, CompiledPatch* output) const { if (n == NULL || n->traversed()) return; @@ -138,7 +145,7 @@ Patch::compile_recursive(Node* n, CompiledPatch* output) const n->traversed(true); assert(output != NULL); - for (Raul::List<Node*>::iterator i = n->providers()->begin(); i != n->providers()->end(); ++i) + for (Raul::List<NodeImpl*>::iterator i = n->providers()->begin(); i != n->providers()->end(); ++i) if ( ! (*i)->traversed() ) compile_recursive((*i), output); diff --git a/src/libs/engine/Plugin.cpp b/src/libs/engine/Plugin.cpp index 11e59162..3e0a30fc 100644 --- a/src/libs/engine/Plugin.cpp +++ b/src/libs/engine/Plugin.cpp @@ -23,7 +23,7 @@ namespace Ingen { -Node* +NodeImpl* Plugin::instantiate(const string& name, bool polyphonic, Ingen::Patch* parent, SampleRate srate, size_t buffer_size) { assert(_type == Internal); diff --git a/src/libs/engine/Plugin.hpp b/src/libs/engine/Plugin.hpp index c4e6b4ce..dd14e815 100644 --- a/src/libs/engine/Plugin.hpp +++ b/src/libs/engine/Plugin.hpp @@ -36,7 +36,7 @@ using std::cerr; using std::endl; namespace Ingen { class Patch; -class Node; +class NodeImpl; /** Representation of a plugin (of various types). @@ -120,7 +120,7 @@ public: void slv2_plugin(SLV2Plugin p) { _slv2_plugin = p; } #endif - Node* instantiate(const string& name, bool polyphonic, Ingen::Patch* parent, SampleRate srate, size_t buffer_size); + NodeImpl* instantiate(const string& name, bool polyphonic, Ingen::Patch* parent, SampleRate srate, size_t buffer_size); private: Type _type; diff --git a/src/libs/engine/Port.cpp b/src/libs/engine/Port.cpp index 880b2c46..2e0c362e 100644 --- a/src/libs/engine/Port.cpp +++ b/src/libs/engine/Port.cpp @@ -19,7 +19,7 @@ #include <raul/Array.hpp> #include <raul/Maid.hpp> #include "Port.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "DataType.hpp" #include "AudioBuffer.hpp" #include "MidiBuffer.hpp" @@ -36,7 +36,7 @@ namespace Ingen { const char* const DataType::type_uris[4] = { "UNKNOWN", "FLOAT", "MIDI", "OSC" }; -Port::Port(Node* const node, const string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size) +Port::Port(NodeImpl* const node, const string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size) : GraphObjectImpl(node, name, true) , _index(index) , _poly(poly) diff --git a/src/libs/engine/Port.hpp b/src/libs/engine/Port.hpp index fa9c454f..2484ea1f 100644 --- a/src/libs/engine/Port.hpp +++ b/src/libs/engine/Port.hpp @@ -29,7 +29,7 @@ namespace Raul { class Maid; } namespace Ingen { -class Node; +class NodeImpl; class Buffer; class ProcessContext; @@ -48,7 +48,7 @@ public: virtual ~Port(); /** A port's parent is always a node, so static cast should be safe */ - Node* parent_node() const { return (Node*)_parent; } + NodeImpl* parent_node() const { return (NodeImpl*)_parent; } /** Prepare for a new (external) polyphony value. * @@ -91,7 +91,7 @@ public: bool broadcast() { return _broadcast; } protected: - Port(Node* const node, const std::string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size); + Port(NodeImpl* node, const std::string& name, uint32_t index, uint32_t poly, DataType type, size_t buffer_size); virtual void allocate_buffers(); virtual void connect_buffers(); diff --git a/src/libs/engine/ProcessSlave.cpp b/src/libs/engine/ProcessSlave.cpp index 4a4107d0..c7c868e8 100644 --- a/src/libs/engine/ProcessSlave.cpp +++ b/src/libs/engine/ProcessSlave.cpp @@ -17,7 +17,7 @@ #include <iostream> #include "ProcessSlave.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "CompiledPatch.hpp" using namespace std; diff --git a/src/libs/engine/ProcessSlave.hpp b/src/libs/engine/ProcessSlave.hpp index 87a190a2..40becd48 100644 --- a/src/libs/engine/ProcessSlave.hpp +++ b/src/libs/engine/ProcessSlave.hpp @@ -29,7 +29,7 @@ namespace Ingen { -class Node; +class NodeImpl; class CompiledPatch; diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp index a4d5c8df..891ca53b 100644 --- a/src/libs/engine/events/ClearPatchEvent.cpp +++ b/src/libs/engine/events/ClearPatchEvent.cpp @@ -15,6 +15,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <raul/Maid.hpp> #include "ClearPatchEvent.hpp" #include "Responder.hpp" #include "Engine.hpp" @@ -23,8 +24,7 @@ #include "util.hpp" #include "ObjectStore.hpp" #include "Port.hpp" -#include <raul/Maid.hpp> -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Connection.hpp" #include "QueuedEventSource.hpp" @@ -85,7 +85,7 @@ ClearPatchEvent::post_process() { if (_patch != NULL) { // Delete all nodes - for (Raul::List<Node*>::iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i) { + for (Raul::List<NodeImpl*>::iterator i = _patch->nodes().begin(); i != _patch->nodes().end(); ++i) { (*i)->deactivate(); delete *i; } diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp index 4953eb02..d1ec1a89 100644 --- a/src/libs/engine/events/ConnectionEvent.cpp +++ b/src/libs/engine/events/ConnectionEvent.cpp @@ -91,8 +91,8 @@ ConnectionEvent::pre_process() return; } - Node* const src_node = _src_port->parent_node(); - Node* const dst_node = _dst_port->parent_node(); + NodeImpl* const src_node = _src_port->parent_node(); + NodeImpl* const dst_node = _dst_port->parent_node(); // Connection to a patch port from inside the patch if (src_node->parent_patch() != dst_node->parent_patch()) { @@ -133,8 +133,8 @@ ConnectionEvent::pre_process() // Need to be careful about patch port connections here and adding a node's // parent as a dependant/provider, or adding a patch as it's own provider... if (src_node != dst_node && src_node->parent() == dst_node->parent()) { - dst_node->providers()->push_back(new Raul::ListNode<Node*>(src_node)); - src_node->dependants()->push_back(new Raul::ListNode<Node*>(dst_node)); + dst_node->providers()->push_back(new Raul::ListNode<NodeImpl*>(src_node)); + src_node->dependants()->push_back(new Raul::ListNode<NodeImpl*>(dst_node)); } if (_patch->enabled()) diff --git a/src/libs/engine/events/ConnectionEvent.hpp b/src/libs/engine/events/ConnectionEvent.hpp index ed2318d8..eb128660 100644 --- a/src/libs/engine/events/ConnectionEvent.hpp +++ b/src/libs/engine/events/ConnectionEvent.hpp @@ -32,7 +32,7 @@ namespace Raul { namespace Ingen { class Patch; -class Node; +class NodeImpl; class Connection; class MidiMessage; class Port; diff --git a/src/libs/engine/events/CreateNodeEvent.cpp b/src/libs/engine/events/CreateNodeEvent.cpp index 6ed860dd..991ee0a8 100644 --- a/src/libs/engine/events/CreateNodeEvent.cpp +++ b/src/libs/engine/events/CreateNodeEvent.cpp @@ -21,7 +21,7 @@ #include "CreateNodeEvent.hpp" #include "Responder.hpp" #include "Patch.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Plugin.hpp" #include "Engine.hpp" #include "Patch.hpp" @@ -91,7 +91,7 @@ CreateNodeEvent::pre_process() // This can be done here because the audio thread doesn't touch the // node tree - just the process order array - _patch->add_node(new Raul::ListNode<Node*>(_node)); + _patch->add_node(new Raul::ListNode<NodeImpl*>(_node)); //_node->add_to_store(_engine.object_store()); _engine.object_store()->add(_node); diff --git a/src/libs/engine/events/CreateNodeEvent.hpp b/src/libs/engine/events/CreateNodeEvent.hpp index 73cbcc02..1452df05 100644 --- a/src/libs/engine/events/CreateNodeEvent.hpp +++ b/src/libs/engine/events/CreateNodeEvent.hpp @@ -29,7 +29,7 @@ template<typename T> class TreeNode; namespace Ingen { class Patch; -class Node; +class NodeImpl; class Plugin; class CompiledPatch; @@ -71,7 +71,7 @@ private: string _plugin_label; bool _poly; Patch* _patch; - Node* _node; + NodeImpl* _node; CompiledPatch* _compiled_patch; ///< Patch's new process order bool _node_already_exists; }; diff --git a/src/libs/engine/events/CreatePatchEvent.cpp b/src/libs/engine/events/CreatePatchEvent.cpp index 748d44dc..a7cc7f8c 100644 --- a/src/libs/engine/events/CreatePatchEvent.cpp +++ b/src/libs/engine/events/CreatePatchEvent.cpp @@ -20,7 +20,7 @@ #include "CreatePatchEvent.hpp" #include "Responder.hpp" #include "Patch.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Plugin.hpp" #include "Engine.hpp" #include "ClientBroadcaster.hpp" @@ -71,7 +71,7 @@ CreatePatchEvent::pre_process() _patch = new Patch(_engine, _path.name(), poly, _parent, _engine.audio_driver()->sample_rate(), _engine.audio_driver()->buffer_size(), _poly); if (_parent != NULL) { - _parent->add_node(new Raul::ListNode<Node*>(_patch)); + _parent->add_node(new Raul::ListNode<NodeImpl*>(_patch)); if (_parent->enabled()) _compiled_patch = _parent->compile(); diff --git a/src/libs/engine/events/CreatePatchEvent.hpp b/src/libs/engine/events/CreatePatchEvent.hpp index 933ce066..0b614013 100644 --- a/src/libs/engine/events/CreatePatchEvent.hpp +++ b/src/libs/engine/events/CreatePatchEvent.hpp @@ -30,7 +30,7 @@ template<typename T> class TreeNode; namespace Ingen { class Patch; -class Node; +class NodeImpl; class Plugin; class CompiledPatch; diff --git a/src/libs/engine/events/DSSIConfigureEvent.cpp b/src/libs/engine/events/DSSIConfigureEvent.cpp index a1588bed..631ee608 100644 --- a/src/libs/engine/events/DSSIConfigureEvent.cpp +++ b/src/libs/engine/events/DSSIConfigureEvent.cpp @@ -17,7 +17,7 @@ #include "DSSIConfigureEvent.hpp" #include "Engine.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "ClientBroadcaster.hpp" #include "Plugin.hpp" #include "ObjectStore.hpp" @@ -38,7 +38,7 @@ DSSIConfigureEvent::DSSIConfigureEvent(Engine& engine, SharedPtr<Responder> resp void DSSIConfigureEvent::pre_process() { - Node* node = _engine.object_store()->find_node(_node_path); + NodeImpl* node = _engine.object_store()->find_node(_node_path); if (node != NULL && node->plugin()->type() == Plugin::DSSI) { _node = (DSSINode*)node; diff --git a/src/libs/engine/events/DSSIControlEvent.cpp b/src/libs/engine/events/DSSIControlEvent.cpp index 648ec05a..25bcaaf4 100644 --- a/src/libs/engine/events/DSSIControlEvent.cpp +++ b/src/libs/engine/events/DSSIControlEvent.cpp @@ -17,7 +17,7 @@ #include "DSSIControlEvent.hpp" #include "Engine.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Plugin.hpp" #include "ObjectStore.hpp" @@ -37,7 +37,7 @@ DSSIControlEvent::DSSIControlEvent(Engine& engine, SharedPtr<Responder> responde void DSSIControlEvent::pre_process() { - Node* node = _engine.object_store()->find_node(_node_path); + NodeImpl* node = _engine.object_store()->find_node(_node_path); if (node->plugin()->type() != Plugin::DSSI) _node = NULL; diff --git a/src/libs/engine/events/DSSIProgramEvent.cpp b/src/libs/engine/events/DSSIProgramEvent.cpp index d791e484..d47e3294 100644 --- a/src/libs/engine/events/DSSIProgramEvent.cpp +++ b/src/libs/engine/events/DSSIProgramEvent.cpp @@ -19,7 +19,7 @@ #include <cstdio> #include <iostream> #include "Engine.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "ClientBroadcaster.hpp" #include "Plugin.hpp" #include "ObjectStore.hpp" @@ -42,7 +42,7 @@ DSSIProgramEvent::DSSIProgramEvent(Engine& engine, SharedPtr<Responder> responde void DSSIProgramEvent::pre_process() { - Node* node = _engine.object_store()->find_node(_node_path); + NodeImpl* node = _engine.object_store()->find_node(_node_path); if (node != NULL && node->plugin()->type() == Plugin::DSSI) _node = (DSSINode*)node; diff --git a/src/libs/engine/events/DSSIUpdateEvent.cpp b/src/libs/engine/events/DSSIUpdateEvent.cpp index 807cedad..61d2ab97 100644 --- a/src/libs/engine/events/DSSIUpdateEvent.cpp +++ b/src/libs/engine/events/DSSIUpdateEvent.cpp @@ -17,7 +17,7 @@ #include "DSSIUpdateEvent.hpp" #include <iostream> -#include "Node.hpp" +#include "NodeImpl.hpp" #include "ObjectStore.hpp" #include "Engine.hpp" #include "DSSINode.hpp" @@ -40,7 +40,7 @@ DSSIUpdateEvent::DSSIUpdateEvent(Engine& engine, SharedPtr<Responder> responder, void DSSIUpdateEvent::pre_process() { - Node* node = _engine.object_store()->find_node(_path); + NodeImpl* node = _engine.object_store()->find_node(_path); if (node == NULL || node->plugin()->type() != Plugin::DSSI) { _node = NULL; diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp index 2ccad693..96d8874a 100644 --- a/src/libs/engine/events/DestroyEvent.cpp +++ b/src/libs/engine/events/DestroyEvent.cpp @@ -67,7 +67,7 @@ DestroyEvent::pre_process() _store_iterator = _engine.object_store()->find(_path); if (_store_iterator != _engine.object_store()->objects().end()) { - _node = dynamic_cast<Node*>(_store_iterator->second); + _node = dynamic_cast<NodeImpl*>(_store_iterator->second); if (!_node) _port = dynamic_cast<Port*>(_store_iterator->second); diff --git a/src/libs/engine/events/DestroyEvent.hpp b/src/libs/engine/events/DestroyEvent.hpp index 77167598..78ff3d7b 100644 --- a/src/libs/engine/events/DestroyEvent.hpp +++ b/src/libs/engine/events/DestroyEvent.hpp @@ -35,7 +35,7 @@ namespace Ingen { class GraphObjectImpl; class Patch; -class Node; +class NodeImpl; class Port; class DriverPort; class Plugin; @@ -62,10 +62,10 @@ private: Path _path; ObjectStore::Objects::iterator _store_iterator; Table<Path,GraphObjectImpl*> _removed_table; - Node* _node; ///< Same as _object if it is a Node, otherwise NULL + NodeImpl* _node; ///< Same as _object if it is a Node, otherwise NULL Port* _port; ///< Same as _object if it is a Port, otherwise NULL DriverPort* _driver_port; - Raul::ListNode<Node*>* _patch_node_listnode; + Raul::ListNode<NodeImpl*>* _patch_node_listnode; Raul::ListNode<Port*>* _patch_port_listnode; Raul::Array<Port*>* _ports_array; ///< New (external) ports array for Patch CompiledPatch* _compiled_patch; ///< Patch's new process order diff --git a/src/libs/engine/events/DisconnectNodeEvent.cpp b/src/libs/engine/events/DisconnectNodeEvent.cpp index 26f31549..3ee93b81 100644 --- a/src/libs/engine/events/DisconnectNodeEvent.cpp +++ b/src/libs/engine/events/DisconnectNodeEvent.cpp @@ -25,7 +25,7 @@ #include "DisconnectionEvent.hpp" #include "Engine.hpp" #include "InputPort.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "ObjectStore.hpp" #include "OutputPort.hpp" #include "Patch.hpp" @@ -49,7 +49,7 @@ DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, SharedPtr<Responder> re /** Internal version, disconnects parent port as well (in the case of InputNode, etc). */ -DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, Node* node) +DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, NodeImpl* node) : QueuedEvent(engine), _node_path(node->path()), _patch(node->parent_patch()), diff --git a/src/libs/engine/events/DisconnectNodeEvent.hpp b/src/libs/engine/events/DisconnectNodeEvent.hpp index 616f321f..5decb923 100644 --- a/src/libs/engine/events/DisconnectNodeEvent.hpp +++ b/src/libs/engine/events/DisconnectNodeEvent.hpp @@ -29,7 +29,7 @@ namespace Ingen { class DisconnectionEvent; class Patch; -class Node; +class NodeImpl; class Connection; class Port; class InputPort; @@ -44,7 +44,7 @@ class DisconnectNodeEvent : public QueuedEvent { public: DisconnectNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path); - DisconnectNodeEvent(Engine& engine, Node* node); + DisconnectNodeEvent(Engine& engine, NodeImpl* node); ~DisconnectNodeEvent(); void pre_process(); @@ -54,7 +54,7 @@ public: private: Raul::Path _node_path; Patch* _patch; - Node* _node; + NodeImpl* _node; Raul::List<DisconnectionEvent*> _disconnection_events; bool _succeeded; diff --git a/src/libs/engine/events/DisconnectPortEvent.cpp b/src/libs/engine/events/DisconnectPortEvent.cpp index 5056877d..6ed328cf 100644 --- a/src/libs/engine/events/DisconnectPortEvent.cpp +++ b/src/libs/engine/events/DisconnectPortEvent.cpp @@ -22,7 +22,7 @@ #include <raul/Array.hpp> #include "Responder.hpp" #include "Engine.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Connection.hpp" #include "DisconnectionEvent.hpp" #include "Port.hpp" diff --git a/src/libs/engine/events/DisconnectPortEvent.hpp b/src/libs/engine/events/DisconnectPortEvent.hpp index a58dc612..85c37ed3 100644 --- a/src/libs/engine/events/DisconnectPortEvent.hpp +++ b/src/libs/engine/events/DisconnectPortEvent.hpp @@ -29,7 +29,7 @@ namespace Ingen { class Patch; -class Node; +class NodeImpl; class Connection; class Port; class DisconnectionEvent; @@ -58,7 +58,7 @@ private: Port* _port; Raul::List<DisconnectionEvent*> _disconnection_events; - Raul::Array<Node*>* _process_order; // Patch's new process order + Raul::Array<NodeImpl*>* _process_order; // Patch's new process order bool _succeeded; bool _lookup; diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp index da91c147..33dbdeeb 100644 --- a/src/libs/engine/events/DisconnectionEvent.cpp +++ b/src/libs/engine/events/DisconnectionEvent.cpp @@ -103,8 +103,8 @@ DisconnectionEvent::pre_process() return; } - Node* const src_node = _src_port->parent_node(); - Node* const dst_node = _dst_port->parent_node(); + NodeImpl* const src_node = _src_port->parent_node(); + NodeImpl* const dst_node = _dst_port->parent_node(); // Connection to a patch port from inside the patch if (src_node->parent_patch() != dst_node->parent_patch()) { @@ -132,13 +132,13 @@ DisconnectionEvent::pre_process() return; } - for (Raul::List<Node*>::iterator i = dst_node->providers()->begin(); i != dst_node->providers()->end(); ++i) + for (Raul::List<NodeImpl*>::iterator i = dst_node->providers()->begin(); i != dst_node->providers()->end(); ++i) if ((*i) == src_node) { delete dst_node->providers()->erase(i); break; } - for (Raul::List<Node*>::iterator i = src_node->dependants()->begin(); i != src_node->dependants()->end(); ++i) + for (Raul::List<NodeImpl*>::iterator i = src_node->dependants()->begin(); i != src_node->dependants()->end(); ++i) if ((*i) == dst_node) { delete src_node->dependants()->erase(i); break; diff --git a/src/libs/engine/events/DisconnectionEvent.hpp b/src/libs/engine/events/DisconnectionEvent.hpp index cefcb17b..46b2c015 100644 --- a/src/libs/engine/events/DisconnectionEvent.hpp +++ b/src/libs/engine/events/DisconnectionEvent.hpp @@ -32,7 +32,7 @@ namespace Raul { namespace Ingen { class Patch; -class Node; +class NodeImpl; class Connection; class MidiMessage; class Port; diff --git a/src/libs/engine/events/EnablePatchEvent.hpp b/src/libs/engine/events/EnablePatchEvent.hpp index a5d7d7e7..fa36aae4 100644 --- a/src/libs/engine/events/EnablePatchEvent.hpp +++ b/src/libs/engine/events/EnablePatchEvent.hpp @@ -28,7 +28,7 @@ namespace Raul { template <typename T> class Array; } namespace Ingen { class Patch; -class Node; +class NodeImpl; class CompiledPatch; diff --git a/src/libs/engine/events/MidiLearnEvent.cpp b/src/libs/engine/events/MidiLearnEvent.cpp index 66f0ae2f..683c879a 100644 --- a/src/libs/engine/events/MidiLearnEvent.cpp +++ b/src/libs/engine/events/MidiLearnEvent.cpp @@ -19,7 +19,7 @@ #include "Responder.hpp" #include "Engine.hpp" #include "ObjectStore.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "MidiControlNode.hpp" #include "ClientBroadcaster.hpp" #include "Plugin.hpp" diff --git a/src/libs/engine/events/MidiLearnEvent.hpp b/src/libs/engine/events/MidiLearnEvent.hpp index 18cbcb43..c0fc4a17 100644 --- a/src/libs/engine/events/MidiLearnEvent.hpp +++ b/src/libs/engine/events/MidiLearnEvent.hpp @@ -26,7 +26,7 @@ using std::string; namespace Ingen { -class Node; +class NodeImpl; class ControlChangeEvent; @@ -72,8 +72,8 @@ public: void post_process(); private: - string _node_path; - Node* _node; + const string _node_path; + NodeImpl* _node; /// Event to respond with when learned MidiLearnResponseEvent* _response_event; diff --git a/src/libs/engine/events/NoteEvent.cpp b/src/libs/engine/events/NoteEvent.cpp index b0b3e926..72191d84 100644 --- a/src/libs/engine/events/NoteEvent.cpp +++ b/src/libs/engine/events/NoteEvent.cpp @@ -19,7 +19,7 @@ #include "Responder.hpp" #include "Engine.hpp" #include "ObjectStore.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "MidiNoteNode.hpp" #include "MidiTriggerNode.hpp" #include "Plugin.hpp" @@ -32,7 +32,7 @@ namespace Ingen { * * Used to be triggered by MIDI. Not used anymore. */ -NoteEvent::NoteEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* node, bool on, uchar note_num, uchar velocity) +NoteEvent::NoteEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, NodeImpl* node, bool on, uchar note_num, uchar velocity) : Event(engine, responder, timestamp), _node(node), _on(on), diff --git a/src/libs/engine/events/NoteEvent.hpp b/src/libs/engine/events/NoteEvent.hpp index 93e61113..31ae9d27 100644 --- a/src/libs/engine/events/NoteEvent.hpp +++ b/src/libs/engine/events/NoteEvent.hpp @@ -25,7 +25,7 @@ using std::string; namespace Ingen { -class Node; +class NodeImpl; /** A note on event. @@ -38,7 +38,7 @@ public: NoteEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, - Node* node, + NodeImpl* node, bool on, uchar note_num, uchar velocity); @@ -55,7 +55,7 @@ public: void post_process(); private: - Node* _node; + NodeImpl* _node; const string _node_path; bool _on; uchar _note_num; diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp index c643e456..edd67fad 100644 --- a/src/libs/engine/events/RenameEvent.cpp +++ b/src/libs/engine/events/RenameEvent.cpp @@ -18,7 +18,7 @@ #include <raul/Path.hpp> #include "ClientBroadcaster.hpp" #include "Engine.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "ObjectStore.hpp" #include "Patch.hpp" #include "RenameEvent.hpp" diff --git a/src/libs/engine/events/RenameEvent.hpp b/src/libs/engine/events/RenameEvent.hpp index e01f4409..1a68173f 100644 --- a/src/libs/engine/events/RenameEvent.hpp +++ b/src/libs/engine/events/RenameEvent.hpp @@ -32,7 +32,7 @@ namespace Ingen { class GraphObjectImpl; class Patch; -class Node; +class NodeImpl; class Plugin; class DisconnectNodeEvent; class DisconnectPortEvent; diff --git a/src/libs/engine/events/RequestObjectEvent.cpp b/src/libs/engine/events/RequestObjectEvent.cpp index 4c875e45..0c46546f 100644 --- a/src/libs/engine/events/RequestObjectEvent.cpp +++ b/src/libs/engine/events/RequestObjectEvent.cpp @@ -23,7 +23,7 @@ #include "ObjectStore.hpp" #include "ClientBroadcaster.hpp" #include "Patch.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Port.hpp" #include "ObjectSender.hpp" #include "ProcessContext.hpp" @@ -72,7 +72,7 @@ RequestObjectEvent::post_process() return; } - Node* const node = dynamic_cast<Node*>(_object); + NodeImpl* const node = dynamic_cast<NodeImpl*>(_object); if (node) { _responder->respond_ok(); ObjectSender::send_node(_responder->client(), node, true); diff --git a/src/libs/engine/events/SetPolyphonicEvent.cpp b/src/libs/engine/events/SetPolyphonicEvent.cpp index bce9a1b2..04bdc6aa 100644 --- a/src/libs/engine/events/SetPolyphonicEvent.cpp +++ b/src/libs/engine/events/SetPolyphonicEvent.cpp @@ -24,7 +24,7 @@ #include "util.hpp" #include "ObjectStore.hpp" #include "Port.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Connection.hpp" #include "QueuedEventSource.hpp" diff --git a/src/libs/engine/events/SetPolyphonyEvent.cpp b/src/libs/engine/events/SetPolyphonyEvent.cpp index 7a261b5e..a1f03add 100644 --- a/src/libs/engine/events/SetPolyphonyEvent.cpp +++ b/src/libs/engine/events/SetPolyphonyEvent.cpp @@ -24,7 +24,7 @@ #include "util.hpp" #include "ObjectStore.hpp" #include "Port.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "Connection.hpp" #include "QueuedEventSource.hpp" diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp index b0fc273e..cc7a79e3 100644 --- a/src/libs/engine/events/SetPortValueEvent.cpp +++ b/src/libs/engine/events/SetPortValueEvent.cpp @@ -21,7 +21,7 @@ #include "Engine.hpp" #include "Port.hpp" #include "ClientBroadcaster.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "ObjectStore.hpp" #include "AudioBuffer.hpp" #include "MidiBuffer.hpp" diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp index 00de1cce..941905fc 100644 --- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp +++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp @@ -22,7 +22,7 @@ #include "Port.hpp" #include "ClientBroadcaster.hpp" #include "Plugin.hpp" -#include "Node.hpp" +#include "NodeImpl.hpp" #include "ObjectStore.hpp" #include "AudioBuffer.hpp" #include "MidiBuffer.hpp" |