Essentia
2.1-beta6-dev
|
#include <sink.h>
Public Member Functions | |
Sink (Algorithm *parent=0, const std::string &name="unnamed") | |
Sink (const std::string &name) | |
const MultiRateBuffer< TokenType > & | buffer () const |
MultiRateBuffer< TokenType > & | buffer () |
const std::vector< TokenType > & | tokens () const |
const TokenType & | firstToken () const |
const TokenType & | lastTokenProduced () const |
virtual const void * | getTokens () const |
virtual const void * | getFirstToken () const |
void | acquire () |
virtual bool | acquire (int n) |
void | release () |
virtual void | release (int n) |
virtual int | available () const |
virtual void | reset () |
TokenType | pop () |
Public Member Functions inherited from SinkBase | |
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) |
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 |
Public Member Functions inherited from StreamConnector | |
StreamConnector () | |
virtual | ~StreamConnector () |
bool | acquire () |
void | release () |
virtual int | acquireSize () const |
virtual int | releaseSize () const |
virtual void | setAcquireSize (int n) |
virtual void | setReleaseSize (int n) |
Private Member Functions | |
virtual const std::type_info & | typeInfo () const |
virtual const std::type_info & | vectorTypeInfo () const |
Additional Inherited Members | |
Protected Member Functions inherited from SinkBase | |
virtual void | connect (SourceBase &source) |
virtual void | disconnect (SourceBase &source) |
void | attachProxy (SinkProxyBase *sproxy) |
void | detachProxy (SinkProxyBase *sproxy) |
Protected Attributes inherited from SinkBase | |
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 |
|
inline |
|
inline |
References StreamConnector::acquire().
Referenced by Sink< TokenType >::pop().
|
inlinevirtual |
Acquire (consume) the requested number of tokens.
Implements StreamConnector.
References SinkBase::_id, SinkBase::_source, SinkBase::_sproxy, SinkProxyBase::acquire(), MultiRateBuffer< T >::acquireForRead(), Sink< TokenType >::buffer(), and Connector::fullName().
|
inlinevirtual |
Returns how many tokens are available in the stream.
Implements StreamConnector.
References SinkBase::_id, SinkBase::_source, SinkBase::_sproxy, StreamConnector::available(), MultiRateBuffer< T >::availableForRead(), Sink< TokenType >::buffer(), and Connector::fullName().
|
inline |
|
inline |
References SinkBase::_source, SinkBase::_sproxy, SinkProxyBase::buffer(), SourceBase::buffer(), and Connector::fullName().
Referenced by Sink< TokenType >::acquire(), Sink< TokenType >::available(), Sink< TokenType >::firstToken(), Sink< TokenType >::lastTokenProduced(), Sink< TokenType >::release(), and Sink< TokenType >::tokens().
|
inline |
References SinkBase::_id, Sink< TokenType >::buffer(), and MultiRateBuffer< T >::readView().
Referenced by Sink< TokenType >::getFirstToken(), and DiskWriter< T >::process().
|
inlinevirtual |
Implements SinkBase.
References Sink< TokenType >::firstToken().
Referenced by Sink< TokenType >::pop().
|
inlinevirtual |
Implements SinkBase.
References Sink< TokenType >::tokens().
|
inline |
References Sink< TokenType >::buffer(), and MultiRateBuffer< T >::lastTokenProduced().
|
inline |
|
inline |
References StreamConnector::release().
Referenced by Sink< TokenType >::pop().
|
inlinevirtual |
Release (produce) the requested number of tokens.
Implements StreamConnector.
References SinkBase::_id, SinkBase::_source, SinkBase::_sproxy, Sink< TokenType >::buffer(), Connector::fullName(), SinkProxyBase::release(), and MultiRateBuffer< T >::releaseForRead().
|
inlinevirtual |
Resets the state of this StreamConnector
Implements StreamConnector.
|
inline |
References SinkBase::_id, Sink< TokenType >::buffer(), and MultiRateBuffer< T >::readView().
Referenced by Sink< TokenType >::getTokens().
|
inlineprivatevirtual |
Implements TypeProxy.
|
inlineprivatevirtual |
Implements TypeProxy.