1 #ifndef AUDIOGRAPHER_SINK_H
2 #define AUDIOGRAPHER_SINK_H
4 #include <boost/shared_ptr.hpp>
6 #include "process_context.h"
8 #include "audiographer/visibility.h"
10 namespace AudioGrapher
14 * This is a pure virtual interface for all data sinks in AudioGrapher
17 class /*LIBAUDIOGRAPHER_API*/ Sink {
21 /** Process given data.
22 * The data can not be modified, so in-place processing is not allowed.
23 * At least this function must be implemented by deriving classes
25 virtual void process (ProcessContext<T> const & context) = 0;
27 /** Process given data
28 * Data may be modified, so in place processing is allowed.
29 * The default implementation calls the non-modifying version,
30 * so this function does not need to be overriden.
31 * However, if the sink can do in-place processing,
32 * overriding this is highly recommended.
34 * If this is not overridden adding "using Sink<T>::process;"
35 * to the deriving class declaration is suggested to avoid
36 * warnings about hidden virtual functions.
38 inline virtual void process (ProcessContext<T> & context)
40 this->process (static_cast<ProcessContext<T> const &> (context));
46 #endif // AUDIOGRAPHER_SINK_H