Veethree D7 SDK
Loading...
Searching...
No Matches
io_state_event.h
Go to the documentation of this file.
1
5#ifndef IO_STATE_EVENT_H
6#define IO_STATE_EVENT_H
7
8#include "digital_common.h"
9#include "io_event.h"
10#include "io_event_data.h"
11
12#include <memory>
13
14namespace vsdk::io {
15
20
26class state_event : public event {
27public:
35 state_event(event_source evt_src, event_type evt_type, bool state, bool value);
49 state_event(state_event&& evt) noexcept;
50
51 ~state_event() noexcept override;
52
57 state_event& operator=(const state_event& evt);
58 state_event& operator=(state_event&& evt) noexcept;
60
65 event_source source() const override;
70 event_type type() const override;
75 bool criteria() const;
80 bool value() const;
98 void get_data(event_data& e) const override;
99
100private:
101 class impl;
102 std::unique_ptr<impl> _impl;
103};
104
112public:
120 void process(const state_event* e) override;
121
125 bool criteria{};
129 bool value{};
130};
131
133
134} // namespace vsdk::io
135
136#endif // IO_STATE_EVENT_H
The event_data class.
Definition io_event_data.h:22
Describes the source of an event.
Definition io_event_source.h:25
The event class interface.
Definition io_event.h:24
The state_event_data class.
Definition io_state_event.h:111
bool value
value The value used for evaluating the event
Definition io_state_event.h:129
void process(const state_event *e) override
process
bool criteria
criteria The event criteria
Definition io_state_event.h:125
The state_event class.
Definition io_state_event.h:26
event_source source() const override
The event source as defined by vsdk::io::event_source.
state_event(const state_event &evt)
Copy constructor.
state_event()
Default constructor.
bool value() const
The value used when determining if the event should have been created.
state_event(event_source evt_src, event_type evt_type, bool state, bool value)
Constructor that takes all required values for creating a state_event object.
state_event(state_event &&evt) noexcept
Move constructor.
event_type type() const override
The event type as defined by vsdk::io::event_type.
void get_data(event_data &e) const override
Get data from a state event object.
bool criteria() const
The event state value criteria for this event.
Digital IO common types.
event_type
Describes the event type.
Definition io_event_common.h:41
IO event interface.
IO event data interface.
Any entities that belong to the IO library.