830911f6f9
git-svn-id: svn://localhost/ardour2/branches/3.0@6760 d708f5d6-7413-0410-9779-e7cbd77b26cf
37 lines
728 B
C++
37 lines
728 B
C++
#ifndef AUDIOGRAPHER_SOURCE_H
|
|
#define AUDIOGRAPHER_SOURCE_H
|
|
|
|
#include "types.h"
|
|
#include "sink.h"
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
namespace AudioGrapher
|
|
{
|
|
|
|
/** A source for data
|
|
* This is a pure virtual interface for all data sources in AudioGrapher
|
|
*/
|
|
template<typename T>
|
|
class Source
|
|
{
|
|
public:
|
|
virtual ~Source () { }
|
|
|
|
typedef boost::shared_ptr<Sink<T> > SinkPtr;
|
|
|
|
/// Adds an output to this source. All data generated is forwarded to \a output
|
|
virtual void add_output (SinkPtr output) = 0;
|
|
|
|
/// Removes all outputs added
|
|
virtual void clear_outputs () = 0;
|
|
|
|
/// Removes a specific output from this source
|
|
virtual void remove_output (SinkPtr output) = 0;
|
|
};
|
|
|
|
} // namespace
|
|
|
|
#endif //AUDIOGRAPHER_SOURCE_H
|
|
|