better comment change
[ardour.git] / libs / audiographer / audiographer / source.h
1 #ifndef AUDIOGRAPHER_SOURCE_H
2 #define AUDIOGRAPHER_SOURCE_H
3
4 #include "types.h"
5 #include "sink.h"
6
7 #include <boost/shared_ptr.hpp>
8
9 namespace AudioGrapher
10 {
11
12 /** A source for data
13   * This is a pure virtual interface for all data sources in AudioGrapher
14   */
15 template<typename T>
16 class Source
17 {
18   public:
19         virtual ~Source () { }
20         
21         typedef boost::shared_ptr<Sink<T> > SinkPtr;
22         
23         /// Adds an output to this source. All data generated is forwarded to \a output
24         virtual void add_output (SinkPtr output) = 0;
25         
26         /// Removes all outputs added
27         virtual void clear_outputs () = 0;
28         
29         /// Removes a specific output from this source
30         virtual void remove_output (SinkPtr output) = 0;
31 };
32
33 } // namespace
34
35 #endif //AUDIOGRAPHER_SOURCE_H
36