From fae7e7519afae5f42836eaaf5e317151ea9c4378 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 8 Oct 2007 04:21:18 +0000 Subject: Fixed missing symbol in Raul. Made Raul::List interface and uses thereof less fugly. git-svn-id: http://svn.drobilla.net/lad/ingen@845 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/Patch.hpp | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) (limited to 'src/libs/engine/Patch.hpp') diff --git a/src/libs/engine/Patch.hpp b/src/libs/engine/Patch.hpp index a39106a4..3097a87a 100644 --- a/src/libs/engine/Patch.hpp +++ b/src/libs/engine/Patch.hpp @@ -21,6 +21,7 @@ #include #include #include +#include #include "NodeBase.hpp" #include "PluginImpl.hpp" #include "interface/DataType.hpp" @@ -29,6 +30,7 @@ using std::string; template class Array; +using Raul::List; namespace Ingen { @@ -83,24 +85,27 @@ public: // Patch specific stuff not inherited from Node - void add_node(Raul::ListNode* tn); - Raul::ListNode* remove_node(const string& name); + typedef List< SharedPtr > Connections; + typedef List Nodes; + + void add_node(Nodes::Node* tn); + Nodes::Node* remove_node(const string& name); - Raul::List& nodes() { return _nodes; } - Raul::List& connections() { return _connections; } + Nodes& nodes() { return _nodes; } + Connections& connections() { return _connections; } - const Raul::List& nodes() const { return _nodes; } - const Raul::List& connections() const { return _connections; } + const Nodes& nodes() const { return _nodes; } + const Connections& connections() const { return _connections; } uint32_t num_ports() const; PortImpl* create_port(const string& name, DataType type, size_t buffer_size, bool is_output); - void add_input(Raul::ListNode* port) { _input_ports.push_back(port); } ///< Preprocesser thread - void add_output(Raul::ListNode* port) { _output_ports.push_back(port); } ///< Preprocessor thread - Raul::ListNode* remove_port(const string& name); + void add_input(List::Node* port) { _input_ports.push_back(port); } ///< Preprocesser thread + void add_output(List::Node* port) { _output_ports.push_back(port); } ///< Preprocessor thread + List::Node* remove_port(const string& name); - void add_connection(Raul::ListNode* c) { _connections.push_back(c); } - Raul::ListNode* remove_connection(const PortImpl* src_port, const PortImpl* dst_port); + void add_connection(Connections::Node* c) { _connections.push_back(c); } + Connections::Node* remove_connection(const PortImpl* src_port, const PortImpl* dst_port); CompiledPatch* compiled_patch() { return _compiled_patch; } void compiled_patch(CompiledPatch* cp) { _compiled_patch = cp; } @@ -123,14 +128,14 @@ private: void process_parallel(ProcessContext& context); void process_single(ProcessContext& context); - Engine& _engine; - uint32_t _internal_poly; - CompiledPatch* _compiled_patch; ///< Accessed in audio thread only - Raul::List _connections; ///< Accessed in audio thread only - Raul::List _input_ports; ///< Accessed in preprocessing thread only - Raul::List _output_ports; ///< Accessed in preprocessing thread only - Raul::List _nodes; ///< Accessed in preprocessing thread only - bool _process; + Engine& _engine; + uint32_t _internal_poly; + CompiledPatch* _compiled_patch; ///< Accessed in audio thread only + Connections _connections; ///< Accessed in audio thread only + List _input_ports; ///< Accessed in preprocessing thread only + List _output_ports; ///< Accessed in preprocessing thread only + Nodes _nodes; ///< Accessed in preprocessing thread only + bool _process; }; @@ -145,7 +150,7 @@ Patch::compile_recursive(NodeImpl* n, CompiledPatch* output) const n->traversed(true); assert(output != NULL); - for (Raul::List::iterator i = n->providers()->begin(); i != n->providers()->end(); ++i) + for (List::iterator i = n->providers()->begin(); i != n->providers()->end(); ++i) if ( ! (*i)->traversed() ) compile_recursive((*i), output); -- cgit v1.2.1