Beatmup
Beatmup::LockableObject::LockGuard Class Reference

#include <lockable_object.h>

Public Member Functions

 LockGuard (LockableObject &obj)
 
 LockGuard (LockableObject *obj)
 
 ~LockGuard ()
 

Private Attributes

LockableObjectobj
 

Detailed Description

Definition at line 32 of file lockable_object.h.

Constructor & Destructor Documentation

◆ LockGuard() [1/2]

Beatmup::LockableObject::LockGuard::LockGuard ( LockableObject obj)
inline

Definition at line 36 of file lockable_object.h.

36  : obj(obj)
37  { obj.lock(); }

◆ LockGuard() [2/2]

Beatmup::LockableObject::LockGuard::LockGuard ( LockableObject obj)
inline

Definition at line 39 of file lockable_object.h.

39  : LockGuard(*obj)
40  {}

◆ ~LockGuard()

Beatmup::LockableObject::LockGuard::~LockGuard ( )
inline

Definition at line 42 of file lockable_object.h.

43  { obj.unlock(); }

Member Data Documentation

◆ obj

LockableObject& Beatmup::LockableObject::LockGuard::obj
private

Definition at line 34 of file lockable_object.h.


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