WPILibC++ 2023.4.3-108-ge5452e3
wpi::SignalObject< T > Class Template Referencefinal

RAII wrapper for signaling handles. More...

#include <wpi/Synchronization.h>

Public Member Functions

 SignalObject (T handle=0, bool manualReset=false, bool initialState=false)
 Constructor. More...
 
 ~SignalObject ()
 
 SignalObject (const SignalObject &)=delete
 
SignalObjectoperator= (const SignalObject &)=delete
 
 SignalObject (SignalObject &&rhs)
 
SignalObjectoperator= (SignalObject &&rhs)
 
 operator T () const
 Gets the handle. More...
 
GetHandle () const
 Gets the handle (e.g. More...
 
void Set ()
 Sets the handle to signaled state. More...
 
void Reset ()
 Sets the handle to non-signaled state. More...
 

Detailed Description

template<typename T>
class wpi::SignalObject< T >

RAII wrapper for signaling handles.

Sets up signaling for an arbitrary handle. This enables any handle to operate like an event handle.

Constructor & Destructor Documentation

◆ SignalObject() [1/3]

template<typename T >
wpi::SignalObject< T >::SignalObject ( handle = 0,
bool  manualReset = false,
bool  initialState = false 
)
inlineexplicit

Constructor.

Parameters
handlehandle
manualResettrue for manual reset, false for automatic reset
initialStatetrue to make the handle initially in signaled state

◆ ~SignalObject()

template<typename T >
wpi::SignalObject< T >::~SignalObject ( )
inline

◆ SignalObject() [2/3]

template<typename T >
wpi::SignalObject< T >::SignalObject ( const SignalObject< T > &  )
delete

◆ SignalObject() [3/3]

template<typename T >
wpi::SignalObject< T >::SignalObject ( SignalObject< T > &&  rhs)
inline

Member Function Documentation

◆ GetHandle()

template<typename T >
T wpi::SignalObject< T >::GetHandle ( ) const
inline

Gets the handle (e.g.

for WaitForObject).

Returns
handle

◆ operator T()

template<typename T >
wpi::SignalObject< T >::operator T ( ) const
inline

Gets the handle.

Returns
handle

◆ operator=() [1/2]

template<typename T >
SignalObject & wpi::SignalObject< T >::operator= ( const SignalObject< T > &  )
delete

◆ operator=() [2/2]

template<typename T >
SignalObject & wpi::SignalObject< T >::operator= ( SignalObject< T > &&  rhs)
inline

◆ Reset()

template<typename T >
void wpi::SignalObject< T >::Reset ( )
inline

Sets the handle to non-signaled state.

◆ Set()

template<typename T >
void wpi::SignalObject< T >::Set ( )
inline

Sets the handle to signaled state.


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