Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::QtSync::Lock Class Reference

Class locking the mutex. More...

#include <QtSync.h>

Public Member Functions

 Lock (QtSync *sync, bool tryLock=false, int timeout=-1)
 Locks the QMutex object in the QSync object.
 
 ~Lock ()
 Destructor unlocking when locked.
 
 operator bool () const
 Gets the lock status.
 
bool lock (bool tryLock=false, int timeout=-1)
 Used when try locking the sync/mutex.
 
void unlock ()
 Unlocks the mutex.
 

Detailed Description

Class locking the mutex.

Constructor & Destructor Documentation

◆ Lock()

sf::QtSync::Lock::Lock ( QtSync sync,
bool  tryLock = false,
int  timeout = -1 
)
inlineexplicit

Locks the QMutex object in the QSync object.

◆ ~Lock()

sf::QtSync::Lock::~Lock ( )
inline

Destructor unlocking when locked.

Member Function Documentation

◆ lock()

bool sf::QtSync::Lock::lock ( bool  tryLock = false,
int  timeout = -1 
)

Used when try locking the sync/mutex.

Parameters
tryLockTrue an attempt is made to lock.
timeoutMilliseconds to try locking.
Returns
TRue when successful to lock, otherwise False.

◆ operator bool()

sf::QtSync::Lock::operator bool ( ) const
inlineexplicit

Gets the lock status.

Returns
True when locked and False when unlocked.

◆ unlock()

void sf::QtSync::Lock::unlock ( )
inline

Unlocks the mutex.


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