roboligo
Loading...
Searching...
No Matches
roboligo::Mode Class Reference

Represents a configurable mode with name, value, and active status. More...

#include <Mode.hpp>

Collaboration diagram for roboligo::Mode:

Public Member Functions

std::string get_name (void)
 Gets the mode name.
std::string get_value (void)
 Gets the mode value.
bool is_ative (void)
 Checks if the mode is active.
 Mode (std::string name, std::string value)
 Constructs a Mode object with the specified name and value.
void set_active (bool status)
 Sets the active status of the mode.
void set_name (std::string new_name)
 Sets the mode name.
void set_value (std::string new_value)
 Sets the mode value.
virtual ~Mode ()=default
 Virtual destructor for proper cleanup of derived classes.

Protected Attributes

bool active_ {false}
 Active status flag.
std::string name_ {"base_mode"}
 Mode name identifier.
std::string value_ {"MODE"}
 Mode value representation.

Detailed Description

Represents a configurable mode with name, value, and active status.

This class encapsulates mode information including a name identifier, a value representation, and an active status flag. It provides methods to get and set these properties.

Constructor & Destructor Documentation

◆ Mode()

roboligo::Mode::Mode ( std::string name,
std::string value )
inline

Constructs a Mode object with the specified name and value.

Parameters
nameThe mode name identifier
valueThe mode value representation

◆ ~Mode()

virtual roboligo::Mode::~Mode ( )
virtualdefault

Virtual destructor for proper cleanup of derived classes.

Member Function Documentation

◆ get_name()

std::string roboligo::Mode::get_name ( void )

Gets the mode name.

Returns
The name of the mode

◆ get_value()

std::string roboligo::Mode::get_value ( void )

Gets the mode value.

Returns
The value associated with the mode

◆ is_ative()

bool roboligo::Mode::is_ative ( void )

Checks if the mode is active.

Returns
True if the mode is active, false otherwise

◆ set_active()

void roboligo::Mode::set_active ( bool status)

Sets the active status of the mode.

Parameters
statusThe new active status

◆ set_name()

void roboligo::Mode::set_name ( std::string new_name)

Sets the mode name.

Parameters
new_nameThe new mode name

◆ set_value()

void roboligo::Mode::set_value ( std::string new_value)

Sets the mode value.

Parameters
new_valueThe new mode value

Member Data Documentation

◆ active_

bool roboligo::Mode::active_ {false}
protected

Active status flag.

◆ name_

std::string roboligo::Mode::name_ {"base_mode"}
protected

Mode name identifier.

◆ value_

std::string roboligo::Mode::value_ {"MODE"}
protected

Mode value representation.


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