#include <traffic_light.hpp>
|
enum class | Category : std::uint8_t { circle
, cross
, arrow
} |
|
enum | Value : std::uint16_t {
circle = static_cast<std::uint8_t>(Category::circle)
, circle
, cross = static_cast<std::uint8_t>(Category::cross )
, cross
,
left = (0b0000'1000 << 8) | static_cast<std::uint8_t>(Category::arrow )
, down = (0b0000'0100 << 8) | static_cast<std::uint8_t>(Category::arrow )
, up = (0b0000'0010 << 8) | static_cast<std::uint8_t>(Category::arrow )
, right = (0b0000'0001 << 8) | static_cast<std::uint8_t>(Category::arrow )
,
lower_left = (0b0000'1100 << 8) | static_cast<std::uint8_t>(Category::arrow )
, upper_left = (0b0000'1010 << 8) | static_cast<std::uint8_t>(Category::arrow )
, lower_right = (0b0000'0101 << 8) | static_cast<std::uint8_t>(Category::arrow )
, upper_right = (0b0000'0011 << 8) | static_cast<std::uint8_t>(Category::arrow )
} |
|
|
static auto | make (const std::string &name) -> Shape |
|
◆ Category
enum traffic_simulator::TrafficLight::Shape::Category : std::uint8_t |
|
strong |
Enumerator |
---|
circle | |
cross | |
arrow | |
◆ Value
enum traffic_simulator::TrafficLight::Shape::Value : std::uint16_t |
Enumerator |
---|
circle | |
circle | |
cross | |
cross | |
left | |
down | |
up | |
right | |
lower_left | |
upper_left | |
lower_right | |
upper_right | |
◆ Shape() [1/2]
◆ Shape() [2/2]
◆ category()
constexpr auto traffic_simulator::TrafficLight::Shape::category |
( |
| ) |
const |
|
inlineconstexpr |
◆ is() [1/2]
constexpr auto traffic_simulator::TrafficLight::Shape::is |
( |
const Category |
given | ) |
const |
|
inlineconstexpr |
◆ is() [2/2]
constexpr auto traffic_simulator::TrafficLight::Shape::is |
( |
const Value |
given | ) |
const |
|
inlineconstexpr |
◆ make()
auto traffic_simulator::TrafficLight::Shape::make |
( |
const std::string & |
name | ) |
-> Shape |
|
static |
◆ operator Value()
constexpr traffic_simulator::TrafficLight::Shape::operator Value |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ operator<<
auto operator<< |
( |
std::ostream & |
os, |
|
|
const Shape & |
shape |
|
) |
| -> std::ostream & |
|
friend |
◆ operator>>
◆ table
const std::unordered_map<std::string, Shape::Value> traffic_simulator::TrafficLight::Shape::table |
|
inlinestatic |
Initial value:{
}
@ up
Definition: traffic_light.hpp:151
@ upper_right
Definition: traffic_light.hpp:156
@ left
Definition: traffic_light.hpp:149
@ cross
Definition: traffic_light.hpp:148
@ lower_right
Definition: traffic_light.hpp:155
@ upper_left
Definition: traffic_light.hpp:154
@ lower_left
Definition: traffic_light.hpp:153
@ down
Definition: traffic_light.hpp:150
@ circle
Definition: traffic_light.hpp:147
@ right
Definition: traffic_light.hpp:152
◆ value
The documentation for this struct was generated from the following files: