Logo
ApraPipes 1.0
Loading...
Searching...
No Matches
StatSink.h
1#pragma once
2
3#include "Module.h"
4#include <map>
5#include <vector>
6#include "declarative/PropertyMacros.h"
7
9{
10public:
12
13 // ============================================================
14 // Property Binding for Declarative Pipeline
15 // StatSink has no configurable properties
16 // ============================================================
17 template<typename PropsT>
18 static void applyProperties(
19 PropsT& props,
20 const std::map<std::string, apra::ScalarPropertyValue>& values,
21 std::vector<std::string>& missingRequired
22 ) {
23 // No properties to apply
24 }
25
26 apra::ScalarPropertyValue getProperty(const std::string& propName) const {
27 throw std::runtime_error("Unknown property: " + propName);
28 }
29
30 bool setProperty(const std::string& propName, const apra::ScalarPropertyValue& value) {
31 throw std::runtime_error("Unknown property: " + propName);
32 }
33
34 static std::vector<std::string> dynamicPropertyNames() {
35 return {};
36 }
37};
38
39class StatSink : public Module {
40public:
41 StatSink(StatSinkProps _props = StatSinkProps()): Module(SINK, "StatSink", _props) {}
42 virtual ~StatSink() {}
43 bool init() { return Module::init(); }
44 bool term() { return Module::term(); }
45protected:
46 bool process(frame_container& frames) { return true; }
47 bool validateInputPins() { return true; }
48private:
49};
Definition Module.h:33
Definition Module.h:151
virtual bool init()
Definition Module.cpp:571
@ SINK
Definition Module.h:158
virtual bool term()
Definition Module.cpp:187
Definition StatSink.h:9
StatSinkProps()
Definition StatSink.h:11
bool setProperty(const std::string &propName, const apra::ScalarPropertyValue &value)
Definition StatSink.h:30
static void applyProperties(PropsT &props, const std::map< std::string, apra::ScalarPropertyValue > &values, std::vector< std::string > &missingRequired)
Definition StatSink.h:18
apra::ScalarPropertyValue getProperty(const std::string &propName) const
Definition StatSink.h:26
static std::vector< std::string > dynamicPropertyNames()
Definition StatSink.h:34
Definition StatSink.h:39
bool process(frame_container &frames)
Definition StatSink.h:46
virtual ~StatSink()
Definition StatSink.h:42
bool init()
Definition StatSink.h:43
bool term()
Definition StatSink.h:44
StatSink(StatSinkProps _props=StatSinkProps())
Definition StatSink.h:41
bool validateInputPins()
Definition StatSink.h:47
std::variant< int64_t, double, bool, std::string > ScalarPropertyValue
Definition ModuleRegistry.h:30