Essentia  2.1-beta5-dev
SourceProxyBase Class Reference

#include <sourceproxy.h>

Inheritance diagram for SourceProxyBase:
SourceBase Connector TypeProxy StreamConnector SourceProxy< TokenType >

Public Member Functions

 SourceProxyBase (Algorithm *parent=0, const std::string &name="unnamed")
 
 SourceProxyBase (const std::string &name)
 
 ~SourceProxyBase ()
 
SourceBaseproxiedSource ()
 
const void * buffer () const
 
void * buffer ()
 
virtual void setBufferType (BufferUsage::BufferUsageType type)
 
virtual BufferInfo bufferInfo () const
 
virtual void setBufferInfo (const BufferInfo &info)
 
void acquire ()
 
virtual bool acquire (int n)
 
virtual int acquireSize () const
 
void release ()
 
virtual void release (int n)
 
virtual int releaseSize () const
 
void detach ()
 
virtual void connect (SinkBase &sink)
 
virtual void disconnect (SinkBase &sink)
 
- Public Member Functions inherited from SourceBase
 SourceBase (Algorithm *parent=0, const std::string &name="unnamed")
 
 SourceBase (const std::string &name)
 
 ~SourceBase ()
 
virtual int totalProduced () const =0
 
const std::vector< SinkBase * > & sinks () const
 
std::vector< SinkBase * > & sinks ()
 
virtual void * getTokens ()=0
 
virtual void * getFirstToken ()=0
 
bool isProxied () const
 
const std::vector< SinkBase * > & proxiedSinks () const
 
template<typename TokenType >
void push (const TokenType &value)
 
- Public Member Functions inherited from Connector
 Connector (Algorithm *parent=0, const std::string &name="Unnamed")
 
 Connector (const std::string &name)
 
const Algorithmparent () const
 
Algorithmparent ()
 
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 ()
 
void release ()
 
virtual void setAcquireSize (int n)
 
virtual void setReleaseSize (int n)
 
virtual void reset ()=0
 

Protected Member Functions

void attach (SourceBase *source)
 
void detach (SourceBase *source)
 
- Protected Member Functions inherited from SourceBase
virtual ReaderID addReader ()=0
 
virtual void removeReader (ReaderID id)=0
 
void attachProxy (SourceProxyBase *sproxy)
 
void detachProxy (SourceProxyBase *sproxy)
 

Protected Attributes

SourceBase_proxiedSource
 
- Protected Attributes inherited from SourceBase
std::vector< SinkBase * > _sinks
 
SourceProxyBase_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 attach (SourceBase &innerSource, SourceProxyBase &proxy)
 
void detach (SourceBase &innerSource, SourceProxyBase &proxy)
 

Detailed Description

Non template base class for the proxy source, contains a pointer to the actual Source being proxied.

Constructor & Destructor Documentation

◆ SourceProxyBase() [1/2]

SourceProxyBase ( Algorithm parent = 0,
const std::string &  name = "unnamed" 
)
inline

◆ SourceProxyBase() [2/2]

SourceProxyBase ( const std::string &  name)
inline

◆ ~SourceProxyBase()

Member Function Documentation

◆ acquire() [1/2]

void acquire ( )
inline

◆ acquire() [2/2]

virtual bool acquire ( int  n)
inlinevirtual

Acquire (consume) the requested number of tokens.

Implements StreamConnector.

References Connector::fullName().

◆ acquireSize()

virtual int acquireSize ( ) const
inlinevirtual

Returns the default number of tokens to be acquired.

Reimplemented from StreamConnector.

References StreamConnector::acquireSize(), and Connector::fullName().

◆ attach()

◆ buffer() [1/2]

const void* buffer ( ) const
inline

◆ buffer() [2/2]

void* buffer ( )
inlinevirtual

◆ bufferInfo()

virtual BufferInfo bufferInfo ( ) const
inlinevirtual

Implements SourceBase.

References SourceBase::bufferInfo().

◆ connect()

virtual void connect ( SinkBase sink)
inlinevirtual

◆ detach() [1/2]

void detach ( )
inline

◆ detach() [2/2]

void detach ( SourceBase source)
inlineprotected

◆ disconnect()

virtual void disconnect ( SinkBase sink)
inlinevirtual

◆ proxiedSource()

SourceBase* proxiedSource ( )
inline

◆ release() [1/2]

void release ( )
inline

◆ release() [2/2]

virtual void release ( int  n)
inlinevirtual

Release (produce) the requested number of tokens.

Implements StreamConnector.

References Connector::fullName().

◆ releaseSize()

virtual int releaseSize ( ) const
inlinevirtual

Returns the default number of tokens to be released.

Reimplemented from StreamConnector.

References Connector::fullName(), and StreamConnector::releaseSize().

◆ setBufferInfo()

virtual void setBufferInfo ( const BufferInfo info)
inlinevirtual

Implements SourceBase.

References SourceBase::setBufferInfo().

◆ setBufferType()

virtual void setBufferType ( BufferUsage::BufferUsageType  type)
inlinevirtual

Implements SourceBase.

References SourceBase::setBufferType().

Friends And Related Function Documentation

◆ attach

void attach ( SourceBase innerSource,
SourceProxyBase proxy 
)
friend

◆ detach

void detach ( SourceBase innerSource,
SourceProxyBase proxy 
)
friend

◆ SourceBase

friend class SourceBase
friend

Member Data Documentation

◆ _proxiedSource


The documentation for this class was generated from the following file: