Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
PTL::TemplateAutoLock< MutexT > Class Template Reference

#include <AutoLock.hh>

+ Inheritance diagram for PTL::TemplateAutoLock< MutexT >:

Public Types

typedef std::unique_lock< MutexT > unique_lock_t
 
typedef TemplateAutoLock< MutexT > this_type
 
typedef unique_lock_t::mutex_type mutex_type
 

Public Member Functions

 TemplateAutoLock (mutex_type &_mutex)
 
template<typename Rep , typename Period >
 TemplateAutoLock (mutex_type &_mutex, const std::chrono::duration< Rep, Period > &_timeout_duration)
 
template<typename Clock , typename Duration >
 TemplateAutoLock (mutex_type &_mutex, const std::chrono::time_point< Clock, Duration > &_timeout_time)
 
 TemplateAutoLock (mutex_type &_mutex, std::defer_lock_t _lock) noexcept
 
 TemplateAutoLock (mutex_type &_mutex, std::try_to_lock_t _lock)
 
 TemplateAutoLock (mutex_type &_mutex, std::adopt_lock_t _lock)
 
 TemplateAutoLock (mutex_type *_mutex)
 
 TemplateAutoLock (mutex_type *_mutex, std::defer_lock_t _lock) noexcept
 
 TemplateAutoLock (mutex_type *_mutex, std::try_to_lock_t _lock)
 
 TemplateAutoLock (mutex_type *_mutex, std::adopt_lock_t _lock)
 

Detailed Description

template<typename MutexT>
class PTL::TemplateAutoLock< MutexT >

Definition at line 259 of file AutoLock.hh.

Member Typedef Documentation

◆ mutex_type

template<typename MutexT >
typedef unique_lock_t::mutex_type PTL::TemplateAutoLock< MutexT >::mutex_type

Definition at line 267 of file AutoLock.hh.

◆ this_type

template<typename MutexT >
typedef TemplateAutoLock<MutexT> PTL::TemplateAutoLock< MutexT >::this_type

Definition at line 266 of file AutoLock.hh.

◆ unique_lock_t

template<typename MutexT >
typedef std::unique_lock<MutexT> PTL::TemplateAutoLock< MutexT >::unique_lock_t

Definition at line 265 of file AutoLock.hh.

Constructor & Destructor Documentation

◆ TemplateAutoLock() [1/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type _mutex)
inlineexplicit

Definition at line 278 of file AutoLock.hh.

279 : unique_lock_t(_mutex, std::defer_lock)
280 {
281 // call termination-safe locking. if serial, this call has no effect
282 _lock_deferred();
283 }
std::unique_lock< MutexT > unique_lock_t
Definition: AutoLock.hh:265

◆ TemplateAutoLock() [2/10]

template<typename MutexT >
template<typename Rep , typename Period >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type _mutex,
const std::chrono::duration< Rep, Period > &  _timeout_duration 
)
inline

Definition at line 290 of file AutoLock.hh.

292 : unique_lock_t(_mutex, std::defer_lock)
293 {
294 // call termination-safe locking. if serial, this call has no effect
295 _lock_deferred(_timeout_duration);
296 }

◆ TemplateAutoLock() [3/10]

template<typename MutexT >
template<typename Clock , typename Duration >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type _mutex,
const std::chrono::time_point< Clock, Duration > &  _timeout_time 
)
inline

Definition at line 303 of file AutoLock.hh.

305 : unique_lock_t(_mutex, std::defer_lock)
306 {
307 // call termination-safe locking. if serial, this call has no effect
308 _lock_deferred(_timeout_time);
309 }

◆ TemplateAutoLock() [4/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type _mutex,
std::defer_lock_t  _lock 
)
inlinenoexcept

Definition at line 312 of file AutoLock.hh.

313 : unique_lock_t(_mutex, _lock)
314 {}

◆ TemplateAutoLock() [5/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type _mutex,
std::try_to_lock_t  _lock 
)
inline

Definition at line 319 of file AutoLock.hh.

320 : unique_lock_t(_mutex, _lock)
321 {}

◆ TemplateAutoLock() [6/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type _mutex,
std::adopt_lock_t  _lock 
)
inline

Definition at line 324 of file AutoLock.hh.

325 : unique_lock_t(_mutex, _lock)
326 {}

◆ TemplateAutoLock() [7/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type _mutex)
inline

Definition at line 332 of file AutoLock.hh.

333 : unique_lock_t(*_mutex, std::defer_lock)
334 {
335 // call termination-safe locking. if serial, this call has no effect
336 _lock_deferred();
337 }

◆ TemplateAutoLock() [8/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type _mutex,
std::defer_lock_t  _lock 
)
inlinenoexcept

Definition at line 339 of file AutoLock.hh.

340 : unique_lock_t(*_mutex, _lock)
341 {}

◆ TemplateAutoLock() [9/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type _mutex,
std::try_to_lock_t  _lock 
)
inline

Definition at line 343 of file AutoLock.hh.

344 : unique_lock_t(*_mutex, _lock)
345 {}

◆ TemplateAutoLock() [10/10]

template<typename MutexT >
PTL::TemplateAutoLock< MutexT >::TemplateAutoLock ( mutex_type _mutex,
std::adopt_lock_t  _lock 
)
inline

Definition at line 347 of file AutoLock.hh.

348 : unique_lock_t(*_mutex, _lock)
349 {}

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