29#ifndef OBSERVABLE_EVT_H
30#define OBSERVABLE_EVT_H
44 explicit ObservedEvt(wxEventType commandType = obsNOTIFY,
int id = 0)
45 : wxCommandEvent(commandType, id) {}
48 this->m_shared_ptr =
event.m_shared_ptr;
51 [[nodiscard]] wxEvent*
Clone()
const override{
return new ObservedEvt(*
this); }
53 [[nodiscard]] std::shared_ptr<const void>
GetSharedPtr()
const {
return m_shared_ptr; }
55 void SetSharedPtr(
const std::shared_ptr<const void> p) { m_shared_ptr = p; }
58 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.