|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
RAII helper that sets the thread-local replay flag for its scope, restoring the previous value on destruction. More...
#include <journal.hpp>
Public Member Functions | |
| ScopedReplayFlag () | |
| Sets the thread-local replay flag to true, saving whatever value was there before. | |
| ~ScopedReplayFlag () | |
| Restores the saved value. | |
| ScopedReplayFlag (const ScopedReplayFlag &)=delete | |
| ScopedReplayFlag & | operator= (const ScopedReplayFlag &)=delete |
| ScopedReplayFlag (ScopedReplayFlag &&)=delete | |
| ScopedReplayFlag & | operator= (ScopedReplayFlag &&)=delete |
RAII helper that sets the thread-local replay flag for its scope, restoring the previous value on destruction.
Nests correctly: a replay() call that itself triggers another replay() (not a pattern this framework uses today, but not precluded) leaves the flag true for the whole nested extent and restores the outer call's value on the inner guard's destruction – the same nesting behavior session::detail::ScopedContext already has for Context.
Definition at line 187 of file journal.hpp.
|
inline |
Sets the thread-local replay flag to true, saving whatever value was there before.
Definition at line 191 of file journal.hpp.
|
inline |
Restores the saved value.
Definition at line 193 of file journal.hpp.