#include <SessionResource.h>
Public Member Functions | |
| SessionSaveLock () | |
| ~SessionSaveLock () | |
This prevents saving of the session (auto-save and user initiated save) while the SessionSaveLock exists. This is used to temporarily stop the session from saving when it would be unwise to save the session. Reference counting is used for locks. If two locks are in place, destruction of the first SessionSaveLock will not unlock session saving, but will decrement the lock count.
This is typically created at the beginning of a long, processor or memory intensive procedure. Care should be used when locking session save as it overrides the user's auto-save preference. An example of use follows.
void processData() { SessionSaveLock saveLock; // run the algorithm here }
Definition at line 35 of file SessionResource.h.
| SessionSaveLock::SessionSaveLock | ( | ) |
| SessionSaveLock::~SessionSaveLock | ( | ) |