Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
trigger_in.h
1#ifndef TRIGGER_IN_H
2#define TRIGGER_IN_H
3
4#include "./trigger.h"
5
6namespace ara
7{
8 namespace sm
9 {
12 template <typename T>
14 {
15 private:
16 Trigger<T> mTrigger;
17
18 public:
22 TriggerIn(T &state, TriggerHandler handler) : mTrigger(state, handler)
23 {
24 }
25
26 TriggerIn() = delete;
27 ~TriggerIn() noexcept = default;
28 TriggerIn(const TriggerIn &) = delete;
29 TriggerIn(TriggerIn &&) = delete;
30 TriggerIn &operator=(const TriggerIn &) = delete;
31 TriggerIn &operator=(TriggerIn &&) = delete;
32
35 Trigger<T> &GetTrigger() noexcept
36 {
37 return mTrigger;
38 }
39 };
40 }
41}
42
43#endif
State input trigger.
Definition: trigger_in.h:14
TriggerIn(T &state, TriggerHandler handler)
Constructor.
Definition: trigger_in.h:22
Trigger< T > & GetTrigger() noexcept
Trigger property getter.
Definition: trigger_in.h:35
State changing trigger wrapper.
Definition: trigger.h:17
std::function< void()> TriggerHandler
Callback on trigger invocation.
Definition: trigger.h:11