BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslmt::TestUtil_Guard Class Reference

#include <bslmt_testutil.h>

Public Types

typedef UnspecifiedBool::BoolType BoolType
 

Public Member Functions

 TestUtil_Guard ()
 
 ~TestUtil_Guard ()
 Unlock the recursive mutex that was locked by the constructor.
 
void operator= (bool rhs)
 Set the boolean state of this object to the specified rhs.
 
 operator BoolType () const
 Return the boolean state of this TestUtil_Guard object.
 

Detailed Description

This class defines an object that provides exclusive access to the critical sections defined by this component's macros. Multiple Guard objects can exist at once, but only in the same thread – if an attempt is made to construct a Guard while any Guards exist in other threads, the constructor will block until all Guard objects in other threads are destroyed. The behavior is undefined if a Guard object is anywhere but on the stack.

See bslmt_testutil

Member Typedef Documentation

◆ BoolType

Constructor & Destructor Documentation

◆ TestUtil_Guard()

bslmt::TestUtil_Guard::TestUtil_Guard ( )
inline

Create a guard that locks the mutex in the singleton and saves the address of the singleton mutex.

◆ ~TestUtil_Guard()

bslmt::TestUtil_Guard::~TestUtil_Guard ( )
inline

Member Function Documentation

◆ operator BoolType()

bslmt::TestUtil_Guard::operator TestUtil_Guard::BoolType ( ) const
inline

◆ operator=()

void bslmt::TestUtil_Guard::operator= ( bool  rhs)
inline

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