OpenCPN Partial API docs
|
Generic event handling between MVC Model and Controller based on a shared EventVar variable. More...
#include <observable_evtvar.h>
Public Member Functions | |
void | Notify () override |
Notify all listeners, no data supplied. | |
void | Notify (void *data) |
Notify all listeners about variable change with ClientData. | |
void | Notify (const std::string &s) |
Notify all listeners about variable change with a string. | |
void | Notify (int n, const std::string &s) |
Notify all listeners about variable change with a string and an int. | |
void | Notify (int n, void *p) |
Notify all listeners about variable change with an int and ClientData. | |
void | Notify (const std::shared_ptr< void > &p, const std::string &s, int n=0) |
Notify all listeners about variable change with shared_ptr, a string and an optional number. | |
void | Notify (const std::shared_ptr< const void > &p) |
Notify all listeners about variable change with const* shared_ptr,. | |
![]() | |
Observable (const std::string &_key) | |
Observable (const KeyProvider &kp) | |
~Observable () override=default | |
Destroy the Observable object. | |
void | Notify (const std::shared_ptr< const void > &p) |
bool | Unlisten (wxEvtHandler *listener, wxEventType ev) |
Remove window listening to ev from list of listeners. | |
std::string | GetKey () const override |
Get the Key object from the Key Provider. | |
![]() | |
virtual | ~KeyProvider ()=default |
Destroy the Key Provider object. | |
Additional Inherited Members | |
![]() | |
const std::string | key |
The key used to create and clone. | |
![]() | |
void | Notify (const std::shared_ptr< const void > &ptr, const std::string &s, int num, void *client_data) |
Notify all listeners: send them a 'type' ObservedEvt message as defined by listen() with optional data available using GetString() and/or GetClientData(). | |
void | Notify (const std::string &s, void *client_data) |
Generic event handling between MVC Model and Controller based on a shared EventVar variable.
Model usage:
Controller/GUI usage:
Definition at line 73 of file observable_evtvar.h.
|
inline |
Definition at line 75 of file observable_evtvar.h.
|
inlineoverridevirtual |
Notify all listeners, no data supplied.
Reimplemented from Observable.
Definition at line 78 of file observable_evtvar.h.
|
inline |
Notify all listeners about variable change with const* shared_ptr,.
Definition at line 102 of file observable_evtvar.h.
|
inline |
Notify all listeners about variable change with shared_ptr, a string and an optional number.
Definition at line 97 of file observable_evtvar.h.
|
inline |
Notify all listeners about variable change with a string.
Definition at line 85 of file observable_evtvar.h.
|
inline |
Notify all listeners about variable change with a string and an int.
Definition at line 88 of file observable_evtvar.h.
|
inline |
Notify all listeners about variable change with an int and ClientData.
Definition at line 91 of file observable_evtvar.h.
|
inline |
Notify all listeners about variable change with ClientData.
Definition at line 82 of file observable_evtvar.h.