20 #ifndef ESSENTIA_STREAMINGALGORITHM_H
21 #define ESSENTIA_STREAMINGALGORITHM_H
23 #include "../configurable.h"
24 #include "../threading.h"
46 void connect(SourceBase& source, SinkBase& sink);
63 void disconnect(SourceBase& source, SinkBase& sink);
70 Algorithm* sinkAlgo,
const std::string& sinkPort);
179 std::vector<std::string>
inputNames()
const {
return _inputs.keys(); }
184 std::vector<std::string>
outputNames()
const {
return _outputs.keys(); }
233 void declareInput(
SinkBase& sink,
int acquireSize,
int releaseSize,
const std::string& name,
const std::string& desc);
252 #if DEBUGGING_ENABLED
Definition: configurable.h:38
Definition: streamingalgorithm.h:140
SourceBase & output(const std::string &name)
OutputMap _outputs
Definition: streamingalgorithm.h:249
const InputMap & inputs() const
Definition: streamingalgorithm.h:172
std::vector< std::string > inputNames() const
Definition: streamingalgorithm.h:179
void declareInput(SinkBase &sink, const std::string &name, const std::string &desc)
DescriptionMap outputDescription
Definition: streamingalgorithm.h:149
OrderedMap< SourceBase > OutputMap
Definition: streamingalgorithm.h:146
virtual void shouldStop(bool stop)
void declareInput(SinkBase &sink, int n, const std::string &name, const std::string &desc)
AlgorithmStatus acquireData()
void declareOutput(SourceBase &source, int n, const std::string &name, const std::string &desc)
SourceBase & output(int idx)
int nProcess
Definition: streamingalgorithm.h:256
virtual ~Algorithm()
Definition: streamingalgorithm.h:160
SinkBase & input(int idx)
OrderedMap< SinkBase > InputMap
Definition: streamingalgorithm.h:145
bool _shouldStop
Definition: streamingalgorithm.h:247
SinkBase & input(const std::string &name)
InputMap _inputs
Definition: streamingalgorithm.h:250
virtual bool shouldStop() const
Definition: streamingalgorithm.h:198
static const std::string processingMode
Definition: streamingalgorithm.h:143
DescriptionMap inputDescription
Definition: streamingalgorithm.h:148
void declareInput(SinkBase &sink, int acquireSize, int releaseSize, const std::string &name, const std::string &desc)
void declareOutput(SourceBase &source, int acquireSize, int releaseSize, const std::string &name, const std::string &desc)
virtual AlgorithmStatus process()=0
void declareOutput(SourceBase &source, const std::string &name, const std::string &desc)
std::vector< std::string > outputNames() const
Definition: streamingalgorithm.h:184
Algorithm()
Definition: streamingalgorithm.h:154
const OutputMap & outputs() const
Definition: streamingalgorithm.h:173
Definition: sinkbase.h:52
Definition: sourcebase.h:52
#define DEBUGGING_ENABLED
Definition: config.h:50
void disconnect(SourceBase &source, DevNullConnector devnull)
void operator>>(SourceBase &source, DevNullConnector devnull)
Definition: devnull.h:81
void connect(SourceBase &source, DevNullConnector devnull)
AlgorithmStatus
Definition: streamingalgorithm.h:106
@ PASS
Definition: streamingalgorithm.h:109
@ OK
Definition: streamingalgorithm.h:107
@ CONTINUE
Definition: streamingalgorithm.h:108
@ NO_INPUT
Definition: streamingalgorithm.h:111
@ NO_OUTPUT
Definition: streamingalgorithm.h:112
@ FINISHED
Definition: streamingalgorithm.h:110
Definition: algorithm.h:28