25 auto it = _namedInputs.find(name);
26 if (it == _namedInputs.end())
throw PortAccessError(
27 "Pothos::Block::input("+name+
")",
"input port name does not exist");
33 if (index >= _indexedInputs.size())
throw PortAccessError(
34 "Pothos::Block::input("+std::to_string(index)+
")",
"input port index does not exist");
35 return _indexedInputs[index];
40 auto it = _namedOutputs.find(name);
41 if (it == _namedOutputs.end())
throw PortAccessError(
42 "Pothos::Block::output("+name+
")",
"output port name does not exist");
48 if (index >= _indexedOutputs.size())
throw PortAccessError(
49 "Pothos::Block::output("+std::to_string(index)+
")",
"output port index does not exist");
50 return _indexedOutputs[index];
55 return _indexedInputs;
60 return _indexedOutputs;
73 template <
typename... ArgsType>
76 const auto it = _namedOutputs.find(name);
77 if (it == _namedOutputs.end() or not it->second->isSignal())
throw PortAccessError(
78 "Pothos::Block::emitSignal("+name+
")",
"signal port does not exist");
81 it->second->postMessage(std::move(objArgs));
InputPort * input(const std::string &name) const
Definition: BlockImpl.hpp:23
Definition: WorkInfo.hpp:23
Definition: OutputPort.hpp:31
const std::map< std::string, InputPort * > & allInputs(void) const
Definition: BlockImpl.hpp:63
Definition: Object.hpp:47
const std::vector< InputPort * > & inputs(void) const
Definition: BlockImpl.hpp:53
std::vector< Object > ObjectVector
Definition: Containers.hpp:20
void emitSignal(const std::string &name, ArgsType &&... args)
Definition: BlockImpl.hpp:74
const std::vector< OutputPort * > & outputs(void) const
Definition: BlockImpl.hpp:58
const WorkInfo & workInfo(void) const
Definition: BlockImpl.hpp:18
OutputPort * output(const std::string &name) const
Definition: BlockImpl.hpp:38
const std::map< std::string, OutputPort * > & allOutputs(void) const
Definition: BlockImpl.hpp:68