17template <
class... _Types>
34template <
typename TFirst,
typename... TRest>
36 static_assert(std::is_base_of_v<SensorConverter, TFirst>,
"Template parameters must inherit from SensorConverter");
47 if (currentStep.Valid) {
48 return TBase::convert(currentStep.Value);
56 std::enable_if_t<std::is_same_v<TGet, TFirst>, TGet &>
get() {
61 std::enable_if_t<std::is_same_v<TGet, TFirst>, TGet *>
getPtr() {
67 std::enable_if_t<!std::is_same_v<TGet, TFirst>, TGet &>
get() {
68 return TBase::template get<TGet>();
73 std::enable_if_t<!std::is_same_v<TGet, TFirst>, TGet *>
getPtr() {
74 return TBase::template getPtr<TGet>();
79 m_f.showInfo(testInputValue);
82 auto res = m_f.convert(testInputValue);
84 TBase::showInfo(res.Value);
93template <
typename... TFuncs>
98 return m_fs.convert(input);
102 template <
typename TGet>
104 return m_fs.template get<TGet>();
108 template <
typename TGet>
110 return m_fs.template getPtr<TGet>();
113 void showInfo(
float testInputValue)
const override {
114 m_fs.showInfo(testInputValue);
priv::FuncChain< TFuncs... > m_fs
SensorResult convert(float input) const override
void showInfo(float testInputValue) const override
SensorResult convert(float input) const
std::enable_if_t< std::is_same_v< TGet, TFirst >, TGet * > getPtr()
void showInfo(float testInputValue) const
std::enable_if_t<!std::is_same_v< TGet, TFirst >, TGet & > get()
std::enable_if_t<!std::is_same_v< TGet, TFirst >, TGet * > getPtr()
std::enable_if_t< std::is_same_v< TGet, TFirst >, TGet & > get()
SensorResult convert(float input) const
void showInfo(float testInputValue) const
expected< float > SensorResult