Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
color.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <map>
4
#include <string>
5
10
namespace
common_lib::competition_logic
{
11
enum class
Color
{
BLUE
= 0,
YELLOW
,
ORANGE
,
LARGE_ORANGE
,
UNKNOWN
};
12
bool
operator==
(
const
Color
& color,
const
int
& value);
13
bool
operator==
(
const
int
& value,
const
Color
& color);
14
extern
const
std::map<std::string, Color, std::less<>>
STRING_COLOR_MAP
;
15
extern
const
std::map<Color, std::string>
COLOR_STRING_MAP
;
16
std::string
get_color_string
(
int
color);
17
std::string
get_color_string
(
Color
color);
18
Color
get_color_enum
(
const
std::string& color);
19
}
// namespace common_lib::competition_logic
common_lib::competition_logic
Enum for colors.
Definition
color.hpp:10
common_lib::competition_logic::Color
Color
Definition
color.hpp:11
common_lib::competition_logic::Color::BLUE
@ BLUE
common_lib::competition_logic::Color::ORANGE
@ ORANGE
common_lib::competition_logic::Color::UNKNOWN
@ UNKNOWN
common_lib::competition_logic::Color::LARGE_ORANGE
@ LARGE_ORANGE
common_lib::competition_logic::Color::YELLOW
@ YELLOW
common_lib::competition_logic::operator==
bool operator==(const Color &color, const int &value)
Definition
color.cpp:24
common_lib::competition_logic::get_color_enum
Color get_color_enum(const std::string &color)
Definition
color.cpp:22
common_lib::competition_logic::get_color_string
std::string get_color_string(int color)
Definition
color.cpp:16
common_lib::competition_logic::COLOR_STRING_MAP
const std::map< Color, std::string > COLOR_STRING_MAP
common_lib::competition_logic::STRING_COLOR_MAP
const std::map< std::string, Color, std::less<> > STRING_COLOR_MAP
src
common_lib
include
common_lib
competition_logic
color.hpp
Generated by
1.9.8