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 | |
const void | Notify () |
Notify all listeners, no data supplied. | |
const void | Notify (void *data) |
Notify all listeners about variable change with ClientData. | |
const void | Notify (const std::string &s) |
Notify all listeners about variable change with a string. | |
const void | Notify (int n, const std::string &s) |
Notify all listeners about variable change with a string and an int. | |
const void | Notify (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. | |
Public Member Functions inherited from Observable | |
Observable (const std::string &_key) | |
Observable (const KeyProvider &kp) | |
const void | Notify (std::shared_ptr< const void > p) |
bool | Unlisten (wxEvtHandler *listener, wxEventType ev) |
Remove window listening to ev from list of listeners. More... | |
std::string | GetKey () const |
Additional Inherited Members | |
Public Attributes inherited from Observable | |
const std::string | key |
The key used to create and clone. | |
Protected Member Functions inherited from Observable | |
const void | Notify (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(). | |
const 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 71 of file observable_evtvar.h.