26#ifndef Observable_EVTVAR_H
27#define Observable_EVTVAR_H
92 void Notify(
int n,
const std::string& s) {
103 void Notify(
const std::shared_ptr<void>& p,
const std::string& s,
int n = 0) {
108 void Notify(
const std::shared_ptr<const void>& p)
override {
113 static std::string Autokey() {
114 static std::atomic<unsigned long> last_ix(0);
115 return std::string(
"!@%/+") + std::to_string(last_ix++);
Generic event handling between for example MVC Model and Controller based on a shared EventVar variab...
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::string &s)
Notify all listeners about variable change with a string.
void Notify() override
Notify all listeners, no data supplied.
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(void *data)
Notify all listeners about variable change with ClientData.
void Notify(const std::shared_ptr< const void > &p) override
Notify all listeners about variable change with const* shared_ptr,.
The observable notify/listen basic nuts and bolts.
virtual void Notify()
Notify all listeners to configured key about variable change.
General observable pattern implementation built on top of wxWidgets event handling.