ConditionVariableDependency Class Reference

#include <conditionvariable_dep.h>

Detailed Description

This class represents a dependency on a condition variable with unique ownership semantics.

Public Member Functions

 ConditionVariableDependency ()=default
 
 ConditionVariableDependency (const ConditionVariableDependency &)=delete
 
void operator= (const ConditionVariableDependency &)=delete
 
 ConditionVariableDependency (ConditionVariableDependency &&src)=default
 
ConditionVariableDependencyoperator= (ConditionVariableDependency &&src)
 
 ConditionVariableDependency (ConditionVariableRef &cond)
 
ConditionVariableDependencyoperator= (ConditionVariableRef &newCond)
 
 ~ConditionVariableDependency ()
 
void Reset ()
 

Private Attributes

ConditionVariableRef _cond
 

Constructor & Destructor Documentation

◆ ConditionVariableDependency() [1/4]

Default constructor. Creates an 'null dependency' that is not associated with any condition variable.

◆ ConditionVariableDependency() [2/4]

Deleted copy constructor.

◆ ConditionVariableDependency() [3/4]

Move constructor. Transfers ownership of dependency src to the created instance. Afterwards, src represents a 'null dependency' that is no longer associated with a condition variable.

◆ ConditionVariableDependency() [4/4]

ConditionVariableDependency ( ConditionVariableRef &  cond)
explicit

Constructs a new dependency of the given condition variable.

◆ ~ConditionVariableDependency()

Releases this dependency.

Member Function Documentation

◆ operator=() [1/3]

void operator= ( const ConditionVariableDependency )
delete

Deleted copy assignment.

◆ operator=() [2/3]

Move assignment. Transfers ownership of the depending condition variable to this instance. Transfers ownership of dependency src to this instance. If this instance already holds a dependency, it is released by calling Set() on it. Afterwards, src no longer holds a dependency.

◆ operator=() [3/3]

ConditionVariableDependency& operator= ( ConditionVariableRef &  newCond)

Assigns this instance as a dependency of the given condition variable. If this instance already holds a dependency, it is released before that.

◆ Reset()

void Reset ( )

Releases this dependency. Afterwards, the instance represents a 'null dependency' that is no longer associated with a condition variable.

Member Data Documentation

◆ _cond

ConditionVariableRef _cond
private