From 299f075679fc7ea6a67001c2cc0442511e167cbc Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 7 Oct 2007 18:14:01 +0000 Subject: Shared abstract Node interface. git-svn-id: http://svn.drobilla.net/lad/ingen@835 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/Patch.hpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'src/libs/engine/Patch.hpp') 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* tn); - Raul::ListNode* remove_node(const string& name); + void add_node(Raul::ListNode* tn); + Raul::ListNode* remove_node(const string& name); - Raul::List& nodes() { return _nodes; } + Raul::List& nodes() { return _nodes; } Raul::List& connections() { return _connections; } - const Raul::List& nodes() const { return _nodes; } + const Raul::List& nodes() const { return _nodes; } const Raul::List& 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 _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 + Raul::List _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::iterator i = n->providers()->begin(); i != n->providers()->end(); ++i) + for (Raul::List::iterator i = n->providers()->begin(); i != n->providers()->end(); ++i) if ( ! (*i)->traversed() ) compile_recursive((*i), output); -- cgit v1.2.1