summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/Patch.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-07 18:14:01 +0000
committerDavid Robillard <d@drobilla.net>2007-10-07 18:14:01 +0000
commit299f075679fc7ea6a67001c2cc0442511e167cbc (patch)
tree1fa210526bb92ceafa057b423e466686d55d00bd /src/libs/engine/Patch.hpp
parent91031b8f5a4bf86b39e4c4a02412a16e247f8b15 (diff)
downloadingen-299f075679fc7ea6a67001c2cc0442511e167cbc.tar.gz
ingen-299f075679fc7ea6a67001c2cc0442511e167cbc.tar.bz2
ingen-299f075679fc7ea6a67001c2cc0442511e167cbc.zip
Shared abstract Node interface.
git-svn-id: http://svn.drobilla.net/lad/ingen@835 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/Patch.hpp')
-rw-r--r--src/libs/engine/Patch.hpp25
1 files changed, 16 insertions, 9 deletions
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);