#include <hikogui/observer/observable.hpp>
|
|
| 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
◆ abort()
| virtual void v1::observable::abort |
( |
void * | ptr | ) |
const |
|
pure virtualnoexcept |
◆ commit()
| virtual void v1::observable::commit |
( |
void * | ptr | ) |
|
|
pure virtualnoexcept |
◆ copy()
| virtual void * v1::observable::copy |
( |
void const * | ptr | ) |
const |
|
nodiscardpure virtualnoexcept |
Allocate and make a copy of the value.
- Note
- copy() does not write_lock() the observable and should be done before read().
- Parameters
-
| ptr | A pointer to the value that was read(). |
- Returns
- A pointer to a newly allocated copy of the value.
◆ read()
| virtual void const * v1::observable::read |
( |
| ) |
const |
|
nodiscardpure virtualnoexcept |
Get a pointer to the current value.
- Note
- read() does not read_lock() the observable and should be done before read().
- Returns
- A const pointer to the value. The observer should cast this to a pointer to the value-type.
◆ read_lock()
| virtual void v1::observable::read_lock |
( |
| ) |
const |
|
pure virtualnoexcept |
◆ read_unlock()
| virtual void v1::observable::read_unlock |
( |
| ) |
const |
|
pure virtualnoexcept |
◆ write_lock()
| virtual void v1::observable::write_lock |
( |
| ) |
const |
|
pure virtualnoexcept |
◆ write_unlock()
| virtual void v1::observable::write_unlock |
( |
| ) |
const |
|
pure virtualnoexcept |
The documentation for this class was generated from the following file: