LambdaStage.h File
Function-based stage executor wrapper. More...
Included Headers
#include "graph/StageExecutor.h"
#include "graph/nodes/StageNode.h"
#include <functional>
#include <memory>
#include <string>
#include <utility>
#include <vector>
Namespaces Index
| namespace | simaai |
| namespace | neat |
| namespace | graph |
| namespace | nodes |
Classes Index
| class | LambdaStage |
Description
Function-based stage executor wrapper.
File Listing
The file content with the documentation metadata removed is:
8#include "graph/StageExecutor.h"
9#include "graph/nodes/StageNode.h"
17namespace simaai::neat::graph::nodes {
19using LambdaOnInput = std::function<void(StageMsg&&, std::vector<StageOutMsg>&, const StagePorts&)>;
20using LambdaOnTick =
21 std::function<void(std::int64_t, std::vector<StageOutMsg>&, const StagePorts&)>;
23class LambdaStage final : public simaai::neat::graph::StageExecutor {
32 void set_ports(const StagePorts& ports) override {
46 StagePorts ports_;
47 LambdaOnInput on_input_;
48 LambdaOnTick on_tick_;
53LambdaStageNode(std::string kind, std::vector<std::string> inputs, std::vector<std::string> outputs,
54 LambdaOnInput on_input, std::string label = {}, StageNodeOptions options = {},
55 StageNode::OutputSpecFn out_fn = {}, LambdaOnTick on_tick = {}) {
56 LambdaOnInput fn = std::move(on_input);
57 LambdaOnTick tick = std::move(on_tick);
58 StageNode::StageExecutorFactory factory = [fn, tick]() mutable {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.