WPILibC++ 2025.2.1
Loading...
Searching...
No Matches
hal::SimBoolean Class Reference

C++ wrapper around a HAL simulator boolean value handle. More...

#include <hal/SimDevice.h>

Inheritance diagram for hal::SimBoolean:
hal::SimValue

Public Member Functions

 SimBoolean ()=default
 Default constructor that results in an "empty" object that is false in a boolean context.
 
 SimBoolean (HAL_SimValueHandle val)
 Wraps a simulated value handle as returned by HAL_CreateSimValueBoolean().
 
bool Get () const
 Gets the simulated value.
 
void Set (bool value)
 Sets the simulated value.
 
- Public Member Functions inherited from hal::SimValue
 SimValue ()=default
 Default constructor that results in an "empty" object that is false in a boolean context.
 
 SimValue (HAL_SimValueHandle val)
 Wraps a simulated value handle as returned by HAL_CreateSimValue().
 
 operator bool () const
 Determine if handle is empty.
 
 operator HAL_SimValueHandle () const
 Get the internal device handle.
 
HAL_Value GetValue () const
 Gets the simulated value.
 
void SetValue (const HAL_Value &value)
 Sets the simulated value.
 

Additional Inherited Members

- Protected Attributes inherited from hal::SimValue
HAL_SimValueHandle m_handle = HAL_kInvalidHandle
 

Detailed Description

C++ wrapper around a HAL simulator boolean value handle.

Constructor & Destructor Documentation

◆ SimBoolean() [1/2]

hal::SimBoolean::SimBoolean ( )
default

Default constructor that results in an "empty" object that is false in a boolean context.

◆ SimBoolean() [2/2]

hal::SimBoolean::SimBoolean ( HAL_SimValueHandle val)
inline

Wraps a simulated value handle as returned by HAL_CreateSimValueBoolean().

Parameters
valsimulated value handle

Member Function Documentation

◆ Get()

bool hal::SimBoolean::Get ( ) const
inline

Gets the simulated value.

Returns
The current value

◆ Set()

void hal::SimBoolean::Set ( bool value)
inline

Sets the simulated value.

Parameters
valuethe value to set

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