Babel  1
The voip software that only works on your local network
Loading...
Searching...
No Matches
Controls::UserControls Class Reference

Manages user input and control states. More...

#include <UserControls.hpp>

Collaboration diagram for Controls::UserControls:
Collaboration graph

Public Member Functions

 UserControls ()
 
 ~UserControls ()
 
void setEcho (const bool echo)
 Sets the echo state.
 
void setHelp (const bool help)
 Sets the help state.
 
void setPlaying (const bool playing)
 Sets the playing state.
 
void setLooping (const bool looping)
 Sets the looping state.
 
void setRecording (const bool recording)
 Sets the recording state.
 
void setUserChoice (const std::string &userChoice)
 Processes the user choice.
 
const bool isEcho () const
 Checks if echo is enabled.
 
const bool isHelp () const
 Checks if help is enabled.
 
const bool isPlaying () const
 Checks if playing is enabled.
 
const bool isLooping () const
 Checks if looping is enabled.
 
const bool isRecording () const
 Checks if recording is enabled.
 
const bool hangUpTheCall () const
 Checks if the call should be hung up.
 
void toggleEcho ()
 Toggles the echo state.
 
void toggleHelp ()
 Toggles the help state.
 
void togglePlaying ()
 Toggles the playing state.
 
void toggleLooping ()
 Toggles the looping state.
 
void toggleRecording ()
 Toggles the recording state.
 
const bool getEcho () const
 Gets the echo state.
 
const bool getHelp () const
 Gets the help state.
 
const bool getPlaying () const
 Gets the playing state.
 
const bool getLooping () const
 Gets the looping state.
 
const bool getRecording () const
 Gets the recording state.
 
void spamUserChoice ()
 Continuously prompts the user for input and processes it.
 
const std::string getInfo (const unsigned int indent=0) const
 Dumps the current state of the variables for debugging purposes.
 
void showPrompt () const
 Displays the prompt to the user.
 

Detailed Description

Manages user input and control states.

Definition at line 26 of file UserControls.hpp.

Constructor & Destructor Documentation

◆ UserControls()

Controls::UserControls::UserControls ( )

Definition at line 18 of file UserControls.cpp.

◆ ~UserControls()

Controls::UserControls::~UserControls ( )

Definition at line 23 of file UserControls.cpp.

Member Function Documentation

◆ getEcho()

const bool Controls::UserControls::getEcho ( ) const

Gets the echo state.

Returns
The echo state.

Definition at line 249 of file UserControls.cpp.

◆ getHelp()

const bool Controls::UserControls::getHelp ( ) const

Gets the help state.

Returns
The help state.

Definition at line 259 of file UserControls.cpp.

◆ getInfo()

const std::string Controls::UserControls::getInfo ( const unsigned int indent = 0) const

Dumps the current state of the variables for debugging purposes.

Parameters
indentThe level to which the class should be indented in the dump.
Returns
The formatted output.

Definition at line 382 of file UserControls.cpp.

◆ getLooping()

const bool Controls::UserControls::getLooping ( ) const

Gets the looping state.

Returns
The looping state.

Definition at line 279 of file UserControls.cpp.

◆ getPlaying()

const bool Controls::UserControls::getPlaying ( ) const

Gets the playing state.

Returns
The playing state.

Definition at line 269 of file UserControls.cpp.

◆ getRecording()

const bool Controls::UserControls::getRecording ( ) const

Gets the recording state.

Returns
The recording state.

Definition at line 289 of file UserControls.cpp.

◆ hangUpTheCall()

const bool Controls::UserControls::hangUpTheCall ( ) const

Checks if the call should be hung up.

Returns
True if the call should be hung up, false otherwise.

Definition at line 199 of file UserControls.cpp.

◆ isEcho()

const bool Controls::UserControls::isEcho ( ) const

Checks if echo is enabled.

Returns
True if echo is enabled, false otherwise.

Definition at line 149 of file UserControls.cpp.

◆ isHelp()

const bool Controls::UserControls::isHelp ( ) const

Checks if help is enabled.

Returns
True if help is enabled, false otherwise.

Definition at line 159 of file UserControls.cpp.

◆ isLooping()

const bool Controls::UserControls::isLooping ( ) const

Checks if looping is enabled.

Returns
True if looping is enabled, false otherwise.

Definition at line 179 of file UserControls.cpp.

◆ isPlaying()

const bool Controls::UserControls::isPlaying ( ) const

Checks if playing is enabled.

Returns
True if playing is enabled, false otherwise.

Definition at line 169 of file UserControls.cpp.

◆ isRecording()

const bool Controls::UserControls::isRecording ( ) const

Checks if recording is enabled.

Returns
True if recording is enabled, false otherwise.

Definition at line 189 of file UserControls.cpp.

◆ setEcho()

void Controls::UserControls::setEcho ( const bool echo)

Sets the echo state.

Parameters
echoThe new echo state.

Definition at line 32 of file UserControls.cpp.

◆ setHelp()

void Controls::UserControls::setHelp ( const bool help)

Sets the help state.

Parameters
helpThe new help state.

Definition at line 42 of file UserControls.cpp.

◆ setLooping()

void Controls::UserControls::setLooping ( const bool looping)

Sets the looping state.

Parameters
loopingThe new looping state.

Definition at line 62 of file UserControls.cpp.

◆ setPlaying()

void Controls::UserControls::setPlaying ( const bool playing)

Sets the playing state.

Parameters
playingThe new playing state.

Definition at line 52 of file UserControls.cpp.

◆ setRecording()

void Controls::UserControls::setRecording ( const bool recording)

Sets the recording state.

Parameters
recordingThe new recording state.

Definition at line 72 of file UserControls.cpp.

◆ setUserChoice()

void Controls::UserControls::setUserChoice ( const std::string & userChoice)

Processes the user choice.

Sets the user choice and performs the corresponding action.

Parameters
userChoiceThe user choice.

Definition at line 82 of file UserControls.cpp.

◆ showPrompt()

void Controls::UserControls::showPrompt ( ) const

Displays the prompt to the user.

Shows the prompt to the user.

Definition at line 332 of file UserControls.cpp.

◆ spamUserChoice()

void Controls::UserControls::spamUserChoice ( )

Continuously prompts the user for input and processes it.

Continuously prompts the user for input and processes the choice.

Definition at line 354 of file UserControls.cpp.

◆ toggleEcho()

void Controls::UserControls::toggleEcho ( )

Toggles the echo state.

Definition at line 207 of file UserControls.cpp.

◆ toggleHelp()

void Controls::UserControls::toggleHelp ( )

Toggles the help state.

Definition at line 215 of file UserControls.cpp.

◆ toggleLooping()

void Controls::UserControls::toggleLooping ( )

Toggles the looping state.

Definition at line 231 of file UserControls.cpp.

◆ togglePlaying()

void Controls::UserControls::togglePlaying ( )

Toggles the playing state.

Definition at line 223 of file UserControls.cpp.

◆ toggleRecording()

void Controls::UserControls::toggleRecording ( )

Toggles the recording state.

Definition at line 239 of file UserControls.cpp.


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