gusimplewhiteboard
guWhiteboard::MicrowaveStatus Class Reference

Provides a C++ wrapper around wb_microwave_status. More...

#include <MicrowaveStatus.hpp>

Inheritance diagram for guWhiteboard::MicrowaveStatus:
Collaboration diagram for guWhiteboard::MicrowaveStatus:

Public Member Functions

 MicrowaveStatus (bool t_timeLeft=true, bool t_doorOpen=true, bool t_buttonPushed=true)
 Create a new MicrowaveStatus. More...
 
 MicrowaveStatus (const MicrowaveStatus &t_other)
 Copy Constructor. More...
 
 MicrowaveStatus (const struct wb_microwave_status &t_other)
 Copy Constructor. More...
 
MicrowaveStatusoperator= (const MicrowaveStatus &t_other)
 Copy Assignment Operator. More...
 
MicrowaveStatusoperator= (const struct wb_microwave_status &t_other)
 Copy Assignment Operator. More...
 
bool operator== (const MicrowaveStatus &t_other) const
 
bool operator!= (const MicrowaveStatus &t_other) const
 
bool operator== (const wb_microwave_status &t_other) const
 
bool operator!= (const wb_microwave_status &t_other) const
 
bool & timeLeft ()
 
const bool & timeLeft () const
 
void set_timeLeft (const bool &t_newValue)
 
bool & doorOpen ()
 
const bool & doorOpen () const
 
void set_doorOpen (const bool &t_newValue)
 
bool & buttonPushed ()
 
const bool & buttonPushed () const
 
void set_buttonPushed (const bool &t_newValue)
 
 MicrowaveStatus (const std::string &t_str)
 String Constructor. More...
 
std::string description ()
 
std::string to_string ()
 
void from_string (const std::string &t_str)
 

Additional Inherited Members

- Public Attributes inherited from wb_microwave_status
bool timeLeft
 Is the timer at zero? More...
 
bool doorOpen
 Is the door open? More...
 
bool buttonPushed
 Has the button been pushed? More...
 

Detailed Description

Provides a C++ wrapper around wb_microwave_status.

Definition at line 83 of file MicrowaveStatus.hpp.

Constructor & Destructor Documentation

◆ MicrowaveStatus() [1/4]

guWhiteboard::MicrowaveStatus::MicrowaveStatus ( bool  t_timeLeft = true,
bool  t_doorOpen = true,
bool  t_buttonPushed = true 
)
inline

Create a new MicrowaveStatus.

Definition at line 101 of file MicrowaveStatus.hpp.

Referenced by operator==().

◆ MicrowaveStatus() [2/4]

guWhiteboard::MicrowaveStatus::MicrowaveStatus ( const MicrowaveStatus t_other)
inline

Copy Constructor.

Definition at line 108 of file MicrowaveStatus.hpp.

References buttonPushed(), doorOpen(), and timeLeft().

◆ MicrowaveStatus() [3/4]

guWhiteboard::MicrowaveStatus::MicrowaveStatus ( const struct wb_microwave_status t_other)
inline

◆ MicrowaveStatus() [4/4]

guWhiteboard::MicrowaveStatus::MicrowaveStatus ( const std::string &  t_str)
inline

String Constructor.

Definition at line 206 of file MicrowaveStatus.hpp.

References from_string().

Member Function Documentation

◆ buttonPushed() [1/2]

bool & guWhiteboard::MicrowaveStatus::buttonPushed ( )
inline

◆ buttonPushed() [2/2]

const bool & guWhiteboard::MicrowaveStatus::buttonPushed ( ) const
inline

Definition at line 192 of file MicrowaveStatus.hpp.

References wb_microwave_status::buttonPushed.

◆ description()

std::string guWhiteboard::MicrowaveStatus::description ( )
inline

USE_WB_MICROWAVE_STATUS_C_CONVERSION

Definition at line 211 of file MicrowaveStatus.hpp.

References buttonPushed(), doorOpen(), MICROWAVE_STATUS_DESC_BUFFER_SIZE, timeLeft(), and wb_microwave_status_description().

◆ doorOpen() [1/2]

bool & guWhiteboard::MicrowaveStatus::doorOpen ( )
inline

◆ doorOpen() [2/2]

const bool & guWhiteboard::MicrowaveStatus::doorOpen ( ) const
inline

Definition at line 177 of file MicrowaveStatus.hpp.

References wb_microwave_status::doorOpen.

◆ from_string()

void guWhiteboard::MicrowaveStatus::from_string ( const std::string &  t_str)
inline

USE_WB_MICROWAVE_STATUS_C_CONVERSION

Definition at line 249 of file MicrowaveStatus.hpp.

References MICROWAVE_STATUS_DESC_BUFFER_SIZE, set_buttonPushed(), set_doorOpen(), and set_timeLeft().

Referenced by MicrowaveStatus().

◆ operator!=() [1/2]

bool guWhiteboard::MicrowaveStatus::operator!= ( const MicrowaveStatus t_other) const
inline

Definition at line 142 of file MicrowaveStatus.hpp.

◆ operator!=() [2/2]

bool guWhiteboard::MicrowaveStatus::operator!= ( const wb_microwave_status t_other) const
inline

Definition at line 152 of file MicrowaveStatus.hpp.

◆ operator=() [1/2]

MicrowaveStatus & guWhiteboard::MicrowaveStatus::operator= ( const MicrowaveStatus t_other)
inline

Copy Assignment Operator.

Definition at line 122 of file MicrowaveStatus.hpp.

References buttonPushed(), doorOpen(), and timeLeft().

◆ operator=() [2/2]

MicrowaveStatus & guWhiteboard::MicrowaveStatus::operator= ( const struct wb_microwave_status t_other)
inline

Copy Assignment Operator.

Definition at line 130 of file MicrowaveStatus.hpp.

References wb_microwave_status::buttonPushed, wb_microwave_status::doorOpen, and wb_microwave_status::timeLeft.

◆ operator==() [1/2]

bool guWhiteboard::MicrowaveStatus::operator== ( const MicrowaveStatus t_other) const
inline

Definition at line 135 of file MicrowaveStatus.hpp.

References buttonPushed(), doorOpen(), and timeLeft().

◆ operator==() [2/2]

bool guWhiteboard::MicrowaveStatus::operator== ( const wb_microwave_status t_other) const
inline

Definition at line 147 of file MicrowaveStatus.hpp.

References MicrowaveStatus().

◆ set_buttonPushed()

void guWhiteboard::MicrowaveStatus::set_buttonPushed ( const bool &  t_newValue)
inline

Definition at line 197 of file MicrowaveStatus.hpp.

References wb_microwave_status::buttonPushed.

Referenced by from_string().

◆ set_doorOpen()

void guWhiteboard::MicrowaveStatus::set_doorOpen ( const bool &  t_newValue)
inline

Definition at line 182 of file MicrowaveStatus.hpp.

References wb_microwave_status::doorOpen.

Referenced by from_string().

◆ set_timeLeft()

void guWhiteboard::MicrowaveStatus::set_timeLeft ( const bool &  t_newValue)
inline

Definition at line 167 of file MicrowaveStatus.hpp.

References wb_microwave_status::timeLeft.

Referenced by from_string().

◆ timeLeft() [1/2]

bool & guWhiteboard::MicrowaveStatus::timeLeft ( )
inline

◆ timeLeft() [2/2]

const bool & guWhiteboard::MicrowaveStatus::timeLeft ( ) const
inline

Definition at line 162 of file MicrowaveStatus.hpp.

References wb_microwave_status::timeLeft.

◆ to_string()

std::string guWhiteboard::MicrowaveStatus::to_string ( )
inline

USE_WB_MICROWAVE_STATUS_C_CONVERSION

Definition at line 228 of file MicrowaveStatus.hpp.

References buttonPushed(), doorOpen(), MICROWAVE_STATUS_TO_STRING_BUFFER_SIZE, timeLeft(), and wb_microwave_status_to_string().


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