roboligo
Toggle main menu visibility
Loading...
Searching...
No Matches
roboligo_common
include
roboligo_common
classification
Mode.hpp
Go to the documentation of this file.
1
// Copyright 2026 Juan S. Cely G.
2
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
7
// https://www.apache.org/licenses/LICENSE-2.0
8
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef ROBOLIGO_COMMON_CLASSIFICATION__MODE_HPP_
16
#define ROBOLIGO_COMMON_CLASSIFICATION__MODE_HPP_
17
18
#include <string>
19
20
namespace
roboligo
21
{
30
class
Mode
31
{
32
public
:
38
Mode
(std::string name, std::string value)
39
:
name_
(name),
value_
(value) {}
40
44
virtual
~Mode
() =
default
;
45
50
std::string
get_name
(
void
);
51
56
std::string
get_value
(
void
);
57
62
void
set_name
(std::string new_name);
63
68
void
set_value
(std::string new_value);
69
74
bool
is_ative
(
void
);
75
80
void
set_active
(
bool
status);
81
82
protected
:
83
std::string
name_
{
"base_mode"
};
84
std::string
value_
{
"MODE"
};
85
bool
active_
{
false
};
86
};
87
88
}
// namespace roboligo
89
#endif
// ROBOLIGO_COMMON_CLASSIFICATION__MODE_HPP_
roboligo::Mode::value_
std::string value_
Mode value representation.
Definition
Mode.hpp:84
roboligo::Mode::active_
bool active_
Active status flag.
Definition
Mode.hpp:85
roboligo::Mode::~Mode
virtual ~Mode()=default
Virtual destructor for proper cleanup of derived classes.
roboligo::Mode::set_active
void set_active(bool status)
Sets the active status of the mode.
Definition
Mode.cpp:49
roboligo::Mode::get_value
std::string get_value(void)
Gets the mode value.
Definition
Mode.cpp:26
roboligo::Mode::set_name
void set_name(std::string new_name)
Sets the mode name.
Definition
Mode.cpp:32
roboligo::Mode::set_value
void set_value(std::string new_value)
Sets the mode value.
Definition
Mode.cpp:38
roboligo::Mode::name_
std::string name_
Mode name identifier.
Definition
Mode.hpp:83
roboligo::Mode::Mode
Mode(std::string name, std::string value)
Constructs a Mode object with the specified name and value.
Definition
Mode.hpp:38
roboligo::Mode::is_ative
bool is_ative(void)
Checks if the mode is active.
Definition
Mode.cpp:44
roboligo::Mode::get_name
std::string get_name(void)
Gets the mode name.
Definition
Mode.cpp:20
roboligo
Definition
ClassificationBase.hpp:28
Generated by
1.17.0