PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
PAtomicBoolean Class Reference

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

`#include <critsec.h>`

Inheritance diagram for PAtomicBoolean:
[legend]
Collaboration diagram for PAtomicBoolean:
[legend]

## Public Member Functions
| PAtomicBoolean (bool value=false)
| Create a PAtomicBoolean with the specified initial value. More...
__inline | operator bool () const
__inline PAtomicBoolean & | operator= (bool value)
| Assign a value to the atomic boolean. More...
__inline bool | operator! () const
| Test if atomic integer has a zero value. More...
bool | TestAndSet (bool value)
| Test Set the value of the atomic boolean. More...

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

## Additional Inherited Members
Private Types inherited from PAtomicBase
typedef int | IntegerType
Private Member Functions inherited from PAtomicBase
| ~PAtomicBase ()
| Destroy the atomic integer. More...
| PAtomicBase (IntegerType value)

## 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

References PAtomicBase::m_value.

__inline bool PAtomicBoolean::operator! | ( |  | ) | const
| inline

Test if atomic integer has a zero value.

References PAtomicBase::m_value.

__inline PAtomicBoolean& PAtomicBoolean::operator= | ( | bool | value | ) |
| inline

Assign a value to the atomic boolean.

References PAtomicBase::m_value.

__inline bool PAtomicBoolean::TestAndSet | ( | bool | value | ) |

Test Set the value of the atomic boolean.

the previous value.

Parameters

  value | value to set

References PAtomicBase::m_value.

## 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:

- critsec.h