events.h
Go to the documentation of this file.
1 
26 #ifndef TESSERACT_ENVIRONMENT_EVENTS_H
27 #define TESSERACT_ENVIRONMENT_EVENTS_H
28 
31 #include <memory>
32 #include <vector>
34 
36 
37 namespace tesseract_environment
38 {
39 class Command;
40 
41 enum class Events
42 {
43  COMMAND_APPLIED = 0,
45 };
46 
48 struct Event
49 {
50  Event(Events type);
51  virtual ~Event() = default;
52  Event(const Event&) = default;
53  Event& operator=(const Event&) = delete;
54  Event(Event&&) = default;
55  Event& operator=(Event&&) = delete;
56 
57  const Events type; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
58 };
59 
64 struct CommandAppliedEvent : public Event
65 {
66  CommandAppliedEvent(const std::vector<std::shared_ptr<const Command>>& commands, int revision);
67 
68  const std::vector<std::shared_ptr<const Command>>&
69  commands; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
70  int revision;
71 };
72 
78 {
80 
81  const tesseract_scene_graph::SceneState& state; // NOLINT(cppcoreguidelines-avoid-const-or-ref-data-members)
82 };
83 
84 } // namespace tesseract_environment
85 
86 #endif // TESSERACT_ENVIRONMENT_EVENTS_H
tesseract_environment::Events
Events
Definition: events.h:41
tesseract_environment::Event::~Event
virtual ~Event()=default
tesseract_environment
Definition: command.h:45
tesseract_environment::Event::operator=
Event & operator=(const Event &)=delete
tesseract_environment::CommandAppliedEvent::commands
const std::vector< std::shared_ptr< const Command > > & commands
Definition: events.h:69
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
tesseract_scene_graph::SceneState
tesseract_environment::Event::type
const Events type
Definition: events.h:57
tesseract_environment::CommandAppliedEvent
The command applied event.
Definition: events.h:64
tesseract_environment::CommandAppliedEvent::revision
int revision
Definition: events.h:70
tesseract_environment::Events::SCENE_STATE_CHANGED
@ SCENE_STATE_CHANGED
TESSERACT_COMMON_IGNORE_WARNINGS_POP
fwd.h
tesseract_environment::SceneStateChangedEvent
The scene state changed event.
Definition: events.h:77
tesseract_environment::CommandAppliedEvent::CommandAppliedEvent
CommandAppliedEvent(const std::vector< std::shared_ptr< const Command >> &commands, int revision)
Definition: events.cpp:35
tesseract_environment::Events::COMMAND_APPLIED
@ COMMAND_APPLIED
tesseract_environment::Event
The event base class.
Definition: events.h:48
tesseract_environment::Event::Event
Event(Events type)
Definition: events.cpp:33
tesseract_environment::SceneStateChangedEvent::state
const tesseract_scene_graph::SceneState & state
Definition: events.h:81
macros.h
tesseract_environment::SceneStateChangedEvent::SceneStateChangedEvent
SceneStateChangedEvent(const tesseract_scene_graph::SceneState &state)
Definition: events.cpp:40


tesseract_environment
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:02:21