Essentia
2.1-beta6-dev
|
#include <sinkbase.h>
Public Member Functions | |
SinkBase (Algorithm *parent=0, const std::string &name="unnamed") | |
SinkBase (const std::string &name) | |
~SinkBase () | |
const SourceBase * | source () const |
SourceBase * | source () |
virtual void | setSource (SourceBase *source) |
ReaderID | id () const |
virtual void | setId (ReaderID id) |
virtual const void * | getTokens () const =0 |
virtual const void * | getFirstToken () const =0 |
Public Member Functions inherited from Connector | |
Connector (Algorithm *parent=0, const std::string &name="Unnamed") | |
Connector (const std::string &name) | |
const Algorithm * | parent () const |
Algorithm * | parent () |
void | setParent (Algorithm *parent) |
std::string | parentName () const |
std::string | fullName () const |
Public Member Functions inherited from TypeProxy | |
TypeProxy () | |
TypeProxy (const std::string &name) | |
virtual | ~TypeProxy () |
const std::string & | name () const |
void | setName (const std::string &name) |
void | checkType (const std::type_info &received, const std::type_info &expected) const |
template<typename Type > | |
void | checkType () const |
void | checkSameTypeAs (const TypeProxy &obj) const |
void | checkVectorSameTypeAs (const TypeProxy &obj) const |
virtual const std::type_info & | typeInfo () const =0 |
virtual const std::type_info & | vectorTypeInfo () const =0 |
Public Member Functions inherited from StreamConnector | |
StreamConnector () | |
virtual | ~StreamConnector () |
virtual int | available () const =0 |
bool | acquire () |
virtual bool | acquire (int n)=0 |
void | release () |
virtual void | release (int n)=0 |
virtual int | acquireSize () const |
virtual int | releaseSize () const |
virtual void | setAcquireSize (int n) |
virtual void | setReleaseSize (int n) |
virtual void | reset ()=0 |
Protected Member Functions | |
virtual void | connect (SourceBase &source) |
virtual void | disconnect (SourceBase &source) |
void | attachProxy (SinkProxyBase *sproxy) |
void | detachProxy (SinkProxyBase *sproxy) |
Protected Attributes | |
SourceBase * | _source |
ReaderID | _id |
SinkProxyBase * | _sproxy |
Protected Attributes inherited from Connector | |
Algorithm * | _parent |
Protected Attributes inherited from TypeProxy | |
std::string | _name |
Protected Attributes inherited from StreamConnector | |
int | _acquireSize |
int | _releaseSize |
Friends | |
class | SourceBase |
void | connect (SourceBase &source, SinkBase &sink) |
void | disconnect (SourceBase &source, SinkBase &sink) |
void | attach (SinkProxyBase &proxy, SinkBase &innerSink) |
void | detach (SinkProxyBase &proxy, SinkBase &innerSink) |
This is the base class from which Sinks should derive. It defines the basic interface a Sink should provide, such as the acquire() and release() methods, and a way to get hold of one or more tokens that are waiting to be consumed. It is untyped (in the sense that it doesn't know which type are the tokens), but derives from TypeProxy and as such has functions to can do type-checking with respect to the types of the derived Sink (which is a templated class, the template being the token type). Look at the Sink implementation for more information.
|
inline |
|
inline |
|
protected |
|
protectedvirtual |
Reimplemented in SinkProxy< TokenType >.
|
protected |
|
protectedvirtual |
Reimplemented in SinkProxy< TokenType >.
|
pure virtual |
Implemented in SinkProxy< TokenType >, Sink< TokenType >, Sink< T >, Sink< std::vector< Real > >, and Sink< Real >.
Referenced by InputBase::setSinkFirstToken().
|
pure virtual |
Implemented in SinkProxy< TokenType >, Sink< TokenType >, Sink< T >, Sink< std::vector< Real > >, and Sink< Real >.
Referenced by InputBase::setSinkTokens().
ReaderID id | ( | ) | const |
|
virtual |
Reimplemented in SinkProxyBase.
Referenced by SinkProxyBase::setId(), and SinkProxyBase::updateProxiedSink().
|
virtual |
Reimplemented in SinkProxyBase.
Referenced by SinkProxy< TokenType >::disconnect(), SinkProxyBase::setSource(), and SinkProxyBase::updateProxiedSink().
|
inline |
References SinkBase::_source.
|
inline |
References SinkBase::_source.
Referenced by SinkProxy< TokenType >::connect(), and SinkProxyBase::setSource().
|
friend |
|
friend |
Global function used for connecting algorithms.
|
friend |
|
friend |
Global function used for disconnecting outputs from inputs.
|
friend |
|
protected |
|
protected |
Referenced by Sink< TokenType >::acquire(), Sink< TokenType >::available(), Sink< TokenType >::buffer(), SinkProxyBase::buffer(), SinkProxy< TokenType >::connect(), SinkProxy< TokenType >::disconnect(), Sink< TokenType >::release(), SinkBase::source(), SinkProxyBase::updateProxiedSink(), and SinkBase::~SinkBase().
|
protected |