OpenCPN Partial API docs
|
Keeps listening over it's lifespan, removes itself on destruction. More...
#include <observable.h>
Public Member Functions | |
ObservableListener () | |
Default constructor, does not listen to anything. More... | |
ObservableListener (const std::string &k, wxEvtHandler *l, wxEventType e) | |
Construct a listening object listening to key k. More... | |
ObservableListener (const KeyProvider &kp, wxEvtHandler *l, wxEventType e) | |
Construct a listening object listening to kp.GetKey() More... | |
ObservableListener (ObservableListener &&other) | |
A listener can only be transferred using std::move(). More... | |
ObservableListener (const ObservableListener &other)=delete | |
ObservableListener & | operator= (ObservableListener &)=delete |
void | Listen (const std::string &key, wxEvtHandler *listener, wxEventType evt) |
Set object to send wxEventType ev to listener on changes in key. More... | |
void | Listen (const KeyProvider &kp, wxEvtHandler *l, wxEventType evt) |
Set object to send wxEventType ev to listener on changes in a KeyProvider. More... | |
Keeps listening over it's lifespan, removes itself on destruction.
Definition at line 143 of file observable.h.
|
inline |
Default constructor, does not listen to anything.
Definition at line 146 of file observable.h.
|
inline |
Construct a listening object listening to key k.
Definition at line 149 of file observable.h.
|
inline |
Construct a listening object listening to kp.GetKey()
Definition at line 155 of file observable.h.
|
inline |
A listener can only be transferred using std::move().
Definition at line 159 of file observable.h.
|
inline |
Definition at line 168 of file observable.h.
|
inline |
Set object to send wxEventType ev to listener on changes in a KeyProvider.
Definition at line 177 of file observable.h.
void ObservableListener::Listen | ( | const std::string & | key, |
wxEvtHandler * | listener, | ||
wxEventType | evt | ||
) |
Set object to send wxEventType ev to listener on changes in key.
Definition at line 98 of file observable.cpp.