|
HikoGUI
A low latency retained GUI
|
#include <hikogui/observer/observable.hpp>
Public Member Functions | |
| observable (observable const &)=delete | |
| observable (observable &&)=delete | |
| observable & | operator= (observable const &)=delete |
| observable & | operator= (observable &&)=delete |
| virtual void const * | read () const noexcept=0 |
| Get a pointer to the current value. | |
| virtual void * | copy (void const *ptr) const noexcept=0 |
| Allocate and make a copy of the value. | |
| virtual void | commit (void *ptr) noexcept=0 |
| Commit the modified copy. | |
| virtual void | abort (void *ptr) const noexcept=0 |
| Abort the modified copy. | |
| virtual void | read_lock () const noexcept=0 |
| Lock for reading. | |
| virtual void | read_unlock () const noexcept=0 |
| Unlock for reading. | |
| virtual void | write_lock () const noexcept=0 |
| Lock for writing. | |
| virtual void | write_unlock () const noexcept=0 |
| Unlock for writing. | |
An abstract observable object.
This type is referenced by observers
|
pure virtualnoexcept |
Abort the modified copy.
abort() does not write_unlock(). | ptr | A pointer to the modified new value returned by copy(). |
|
pure virtualnoexcept |
Commit the modified copy.
commit() does not write_unlock(). | ptr | A pointer to the modified new value returned by copy(). |
|
pure virtualnoexcept |
Allocate and make a copy of the value.
copy() does not write_lock() the observable and should be done before read(). | ptr | A pointer to the value that was read(). |
|
pure virtualnoexcept |
Get a pointer to the current value.
read() does not read_lock() the observable and should be done before read(). observer should cast this to a pointer to the value-type.
|
pure virtualnoexcept |
Lock for reading.
|
pure virtualnoexcept |
Unlock for reading.
|
pure virtualnoexcept |
Lock for writing.
|
pure virtualnoexcept |
Unlock for writing.