PAtomicBoolean Class Reference

This class implements an atomic "test and set" boolean. More...

#include <critsec.h>

Inheritance diagram for PAtomicBoolean:

PAtomicBase List of all members.

Public Member Functions

 PAtomicBoolean (bool value=false)
 Create a PAtomicBoolean with the specified initial value.
__inline operator bool () const
__inline bool operator! () const
 Test if atomic integer has a non-zero value.
__inline PAtomicBooleanoperator= (bool value)
 Assign a value to the atomic boolean.
bool TestAndSet (bool value)
 Test Set the value of the atomic boolean.

Friends

__inline ostream & operator<< (ostream &strm, const PAtomicBoolean &b)

Detailed Description

This class implements an atomic "test and set" boolean.


Constructor & Destructor Documentation

PAtomicBoolean::PAtomicBoolean ( bool  value = false  )  [inline, explicit]

Create a PAtomicBoolean with the specified initial value.

Parameters:
value  initial value


Member Function Documentation

__inline PAtomicBoolean::operator bool (  )  const [inline]

Returns:
Returns the value of the atomic boolean

__inline bool PAtomicBoolean::operator! (  )  const [inline]

Test if atomic integer has a non-zero value.

__inline PAtomicBoolean& PAtomicBoolean::operator= ( bool  value  )  [inline]

Assign a value to the atomic boolean.

__inline bool PAtomicBoolean::TestAndSet ( bool  value  ) 

Test Set the value of the atomic boolean.

Returns:
the previous value.
Parameters:
value  value to set


Friends And Related Function Documentation

__inline ostream& operator<< ( ostream &  strm,
const PAtomicBoolean b 
) [friend]


The documentation for this class was generated from the following file:
Generated on Fri Feb 15 20:58:32 2013 for PTLib by  doxygen 1.4.7