27#ifndef OBSERVABLE_EVT_H
28#define OBSERVABLE_EVT_H
45 explicit ObservedEvt(wxEventType commandType = obsNOTIFY,
int id = 0)
46 : wxCommandEvent(commandType, id) {}
49 this->m_shared_ptr =
event.m_shared_ptr;
52 [[nodiscard]] wxEvent*
Clone()
const override{
return new ObservedEvt(*
this); }
54 [[nodiscard]] std::shared_ptr<const void>
GetSharedPtr()
const {
return m_shared_ptr; }
56 void SetSharedPtr(
const std::shared_ptr<const void> p) { m_shared_ptr = p; }
59 std::shared_ptr<const void> m_shared_ptr;
Custom event class for OpenCPN's notification system.
void SetSharedPtr(std::shared_ptr< const void > p)
Sets the event's payload data.
wxEvent * Clone() const
Creates a cloned copy of this event.
std::shared_ptr< const void > GetSharedPtr() const
Gets the event's payload data.