SessionSaveLock Class Reference

Prevent saving of the session for a time. More...

#include <SessionResource.h>

List of all members.

Public Member Functions

 SessionSaveLock ()
 ~SessionSaveLock ()


Detailed Description

Prevent saving of the session for a time.

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.


Constructor & Destructor Documentation

SessionSaveLock::SessionSaveLock (  ) 

Lock session saves.

Definition at line 41 of file SessionResource.h.

SessionSaveLock::~SessionSaveLock (  ) 

Unlock session saves.

Definition at line 49 of file SessionResource.h.


Software Development Kit - Opticks 4.9.0 Build 16218