|
DP3
|
Class to hold a read or write lock on ParmDBs. More...
#include <ParmDBLocker.h>
Public Types | |
| typedef std::shared_ptr< ParmDBLocker > | ShPtr |
| Define a shared pointer for this type. More... | |
Public Member Functions | |
| ParmDBLocker (const ParmSet &parmSet, bool write=false) | |
| Create a read or write lock on all ParmDBs in the ParmSet. More... | |
| ParmDBLocker (ParmDB &parmdb, bool write=false) | |
| Create a lock on a specific ParmDB. More... | |
| ~ParmDBLocker () | |
| The destructor unlocks the ParmDBs locked by the constructor. More... | |
Class to hold a read or write lock on ParmDBs.
This class locks a single ParmDB or all ParmDBs used by a ParmSet. Because the destructor does the unlocking, this class is very well suited for automatically managing the locks. Even in case of an exception, the locks are automatically released.
| typedef std::shared_ptr<ParmDBLocker> dp3::parmdb::ParmDBLocker::ShPtr |
Define a shared pointer for this type.
|
explicit |
Create a read or write lock on all ParmDBs in the ParmSet.
|
explicit |
Create a lock on a specific ParmDB.
| dp3::parmdb::ParmDBLocker::~ParmDBLocker | ( | ) |
The destructor unlocks the ParmDBs locked by the constructor.