24#ifndef _OBSERVABLE_GLOBVAR_H
25#define _OBSERVABLE_GLOBVAR_H
33#include "observable.h"
78 void Set(
const T& arg) {
84 const T
Get() {
return *variable; }
Wrapper for global variable, supports notification events when value changes.
void Set(const T &arg)
Set variable value and notify all listeners.
const T Get()
Return current variable value.
GlobalVar(T *ptr)
Create a GlobalVar using given pointer (variable address) as key.
The observable notify/listen basic nuts and bolts.
virtual const void Notify()
Notify all listeners about variable change.