qxLib
|
Tokens are used to automatically detach observer when the observer object is destroyed. More...
#include <observer.h>
Public Member Functions | |
observer_token_data (base_subject *pSubject, void *pObserver) noexcept | |
observer_token object constructor More... | |
observer_token_data (observer_token_data &&other) noexcept | |
observer_token object constructor More... | |
void | reset () noexcept |
Reset observer_token. More... | |
operator bool () const noexcept | |
operator bool More... | |
Tokens are used to automatically detach observer when the observer object is destroyed.
~
Definition at line 36 of file observer.h.
|
inlinenoexcept |
observer_token object constructor
pSubject | - corresponding subject pointer |
pObserver | - corresponding observer pointer |
Definition at line 15 of file observer.inl.
|
inlinenoexcept |
observer_token object constructor
other | - other observer_token object rvalue ref |
Definition at line 30 of file observer.inl.
|
inlinenoexcept |
operator bool
- | true if observer_token is valid |
Definition at line 53 of file observer.inl.
|
inlinenoexcept |
Reset observer_token.
Token won't unsubscribe observer from subject in destructor
Definition at line 21 of file observer.inl.