Essentia  2.1-beta6-dev
Connector Class Reference

#include <connector.h>

Inheritance diagram for Connector:
TypeProxy StreamConnector SinkBase SourceBase Sink< T > Sink< std::vector< Real > > Sink< Real > Sink< TokenType > SinkProxyBase Source< Real > Source< TokenType > SourceProxyBase

Public Member Functions

 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 ()
 
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 Attributes

Algorithm_parent
 
- Protected Attributes inherited from TypeProxy
std::string _name
 
- Protected Attributes inherited from StreamConnector
int _acquireSize
 
int _releaseSize
 

Detailed Description

This is the base class for connectors in Essentia. It is the highest-level class which is shared both by Sources and Sinks, and is a slightly better StreamConnector which has a parent Algorithm and is aware (through TypeProxy) of which type of data is supposed to flow through it.

Constructor & Destructor Documentation

◆ Connector() [1/2]

Connector ( Algorithm parent = 0,
const std::string &  name = "Unnamed" 
)
inline

◆ Connector() [2/2]

Connector ( const std::string &  name)
inline

Member Function Documentation

◆ fullName()

◆ parent() [1/2]

Algorithm* parent ( )
inline

References Connector::_parent.

◆ parent() [2/2]

const Algorithm* parent ( ) const
inline

References Connector::_parent.

Referenced by Connector::setParent().

◆ parentName()

std::string parentName ( ) const

Return parent's name if parent is set, "<NoParent>" otherwise.

◆ setParent()

void setParent ( Algorithm parent)
inline

Member Data Documentation

◆ _parent

Algorithm* _parent
protected

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