diff options
Diffstat (limited to 'libs/ardour/ardour/graphnode.h')
-rw-r--r-- | libs/ardour/ardour/graphnode.h | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/libs/ardour/ardour/graphnode.h b/libs/ardour/ardour/graphnode.h index aa04d9b20a..f30844532b 100644 --- a/libs/ardour/ardour/graphnode.h +++ b/libs/ardour/ardour/graphnode.h @@ -17,7 +17,6 @@ */ - #ifndef __ardour_graphnode_h__ #define __ardour_graphnode_h__ @@ -29,40 +28,48 @@ namespace ARDOUR { - class Graph; class GraphNode; typedef boost::shared_ptr<GraphNode> node_ptr_t; -typedef std::set< node_ptr_t > node_set_t; -typedef std::list< node_ptr_t > node_list_t; +typedef std::set<node_ptr_t> node_set_t; +typedef std::list<node_ptr_t> node_list_t; -/** A node on our processing graph, ie a Route */ -class LIBARDOUR_API GraphNode +class LIBARDOUR_API GraphActivision { - public: - GraphNode( boost::shared_ptr<Graph> Graph ); - virtual ~GraphNode(); +protected: + friend class Graph; + /** Nodes that we directly feed */ + node_set_t _activation_set[2]; + /** The number of nodes that we directly feed us (one count for each chain) */ + gint _init_refcount[2]; +}; - void prep( int chain ); - void dec_ref(); - void finish( int chain ); +/** A node on our processing graph, ie a Route */ +class LIBARDOUR_API GraphNode : public GraphActivision +{ +public: + GraphNode (boost::shared_ptr<Graph> Graph); + virtual ~GraphNode (); - virtual void process(); + void prep (int chain); + void trigger (); - private: - friend class Graph; + void + run (int chain) + { + process (); + finish (chain); + } - /** Nodes that we directly feed */ - node_set_t _activation_set[2]; +private: + void finish (int chain); + void process (); boost::shared_ptr<Graph> _graph; gint _refcount; - /** The number of nodes that we directly feed us (one count for each chain) */ - gint _init_refcount[2]; }; - } #endif |