Nebula
Loading...
Searching...
No Matches
Threading::SafeFlag Class Reference

#include <safeflag.h>

Detailed Description

A thread-safe flag variable.

Public Member Functions

 SafeFlag ()
 constructor
 
void Set ()
 set the flag
 
void Clear ()
 clear the flag
 
bool Test () const
 test if the flag is set
 
bool TestAndClearIfSet ()
 test if flag is set, if yes, clear flag
 

Private Attributes

int volatile flag
 

Constructor & Destructor Documentation

◆ SafeFlag()

Threading::SafeFlag::SafeFlag ( )
inline

constructor

Member Function Documentation

◆ Clear()

void Threading::SafeFlag::Clear ( )
inline

clear the flag

◆ Set()

void Threading::SafeFlag::Set ( )
inline

set the flag

◆ Test()

bool Threading::SafeFlag::Test ( ) const
inline

test if the flag is set

◆ TestAndClearIfSet()

bool Threading::SafeFlag::TestAndClearIfSet ( )
inline

test if flag is set, if yes, clear flag

Member Data Documentation

◆ flag

int volatile Threading::SafeFlag::flag
private

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