DP3
Public Types | Public Member Functions | List of all members
dp3::parmdb::ParmDBLocker Class Reference

Class to hold a read or write lock on ParmDBs. More...

#include <ParmDBLocker.h>

Public Types

typedef std::shared_ptr< ParmDBLockerShPtr
 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...
 

Detailed Description

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.

Member Typedef Documentation

◆ ShPtr

Define a shared pointer for this type.

Constructor & Destructor Documentation

◆ ParmDBLocker() [1/2]

dp3::parmdb::ParmDBLocker::ParmDBLocker ( const ParmSet parmSet,
bool  write = false 
)
explicit

Create a read or write lock on all ParmDBs in the ParmSet.

◆ ParmDBLocker() [2/2]

dp3::parmdb::ParmDBLocker::ParmDBLocker ( ParmDB parmdb,
bool  write = false 
)
explicit

Create a lock on a specific ParmDB.

◆ ~ParmDBLocker()

dp3::parmdb::ParmDBLocker::~ParmDBLocker ( )

The destructor unlocks the ParmDBs locked by the constructor.


The documentation for this class was generated from the following file: