A RAII object to temporary leave the synced context like in wesnoth.synchronize_choice. More...
#include <synced_context.hpp>
Public Member Functions | |
leave_synced_context () | |
~leave_synced_context () | |
Private Attributes | |
randomness::rng * | old_rng_ |
A RAII object to temporary leave the synced context like in wesnoth.synchronize_choice.
Can only be used from inside a synced context.
Definition at line 239 of file synced_context.hpp.
leave_synced_context::leave_synced_context | ( | ) |
Definition at line 485 of file synced_context.cpp.
References randomness::rng::default_instance(), randomness::generator, synced_context::get_synced_state(), synced_context::LOCAL_CHOICE, synced_context::set_synced_state(), and synced_context::SYNCED.
leave_synced_context::~leave_synced_context | ( | ) |
Definition at line 496 of file synced_context.cpp.
References randomness::generator, synced_context::get_synced_state(), synced_context::LOCAL_CHOICE, old_rng_, synced_context::set_synced_state(), and synced_context::SYNCED.
|
private |
Definition at line 246 of file synced_context.hpp.
Referenced by ~leave_synced_context().