20 #ifndef ESSENTIA_SOURCEBASE_H
21 #define ESSENTIA_SOURCEBASE_H
24 #include "../connector.h"
30 class SourceProxyBase;
35 void connect(SourceBase& source, SinkBase& sink);
36 void disconnect(SourceBase& source, SinkBase& sink);
38 void attach(SourceBase& innerSource, SourceProxyBase& proxy);
39 void detach(SourceBase& innerSource, SourceProxyBase& proxy);
75 const std::vector<SinkBase*>&
sinks()
const {
return _sinks; }
94 template <
typename TokenType>
95 void push(
const TokenType& value) {
97 checkType<TokenType>();
virtual const char * what() const
Definition: types.h:100
const std::string & name() const
Definition: types.h:284
Definition: streamingalgorithm.h:140
Definition: connector.h:40
std::string fullName() const
const Algorithm * parent() const
Definition: connector.h:53
Definition: sinkbase.h:52
Definition: sinkproxy.h:179
Definition: sourcebase.h:52
virtual BufferInfo bufferInfo() const =0
const std::vector< SinkBase * > & proxiedSinks() const
virtual void * getTokens()=0
std::vector< SinkBase * > _sinks
Definition: sourcebase.h:54
virtual void * getFirstToken()=0
friend void attach(SourceBase &innerSource, SourceProxyBase &proxy)
Definition: sourceproxy.h:243
bool isProxied() const
Definition: sourcebase.h:86
friend void connect(SourceBase &source, SinkBase &sink)
virtual void setBufferType(BufferUsage::BufferUsageType type)=0
virtual int totalProduced() const =0
SourceProxyBase * _sproxy
Definition: sourcebase.h:58
friend void disconnect(SourceBase &source, SinkBase &sink)
virtual void removeReader(ReaderID id)=0
const std::vector< SinkBase * > & sinks() const
Definition: sourcebase.h:75
void push(const TokenType &value)
Definition: sourcebase.h:95
virtual void setBufferInfo(const BufferInfo &info)=0
std::vector< SinkBase * > & sinks()
Definition: sourcebase.h:78
void attachProxy(SourceProxyBase *sproxy)
virtual void disconnect(SinkBase &sink)
SourceBase(const std::string &name)
Definition: sourcebase.h:65
void detachProxy(SourceProxyBase *sproxy)
SourceBase(Algorithm *parent=0, const std::string &name="unnamed")
Definition: sourcebase.h:62
virtual ReaderID addReader()=0
friend void detach(SourceBase &innerSource, SourceProxyBase &proxy)
Definition: sourceproxy.h:260
virtual void connect(SinkBase &sink)
virtual void * buffer()=0
Definition: sourceproxy.h:37
Definition: sourceproxy.h:175
void release()
Definition: streamconnector.h:59
bool acquire()
Definition: streamconnector.h:49
BufferUsageType
Definition: types.h:436
void detach(SinkProxyBase &proxy, SinkBase &innerSink)
Definition: sinkproxy.h:257
void disconnect(SourceBase &source, DevNullConnector devnull)
void connect(SourceBase &source, DevNullConnector devnull)
void attach(SinkProxyBase &proxy, SinkBase &innerSink)
Definition: sinkproxy.h:239
Definition: algorithm.h:28
int ReaderID
Definition: types.h:344