scenario_simulator_v2 C++ API
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
traffic_simulator::TrafficLight::Bulb Struct Reference

#include <traffic_light.hpp>

Public Types

using Value = std::tuple< Color, Status, Shape >
 
using Hash = std::uint32_t
 

Public Member Functions

constexpr Bulb (const Value value)
 
constexpr Bulb (const Color color={}, const Status status={}, const Shape shape={})
 
 Bulb (const std::string &name)
 
auto make (const std::string &s) -> Value
 
constexpr auto is (const Color color) const
 
constexpr auto is (const Status status) const
 
constexpr auto is (const Shape shape) const
 
constexpr auto is (const Shape::Category category) const
 
constexpr auto hash () const -> Hash
 
 operator simulation_api_schema::TrafficLight () const
 
 operator traffic_simulator_msgs::msg::TrafficLightBulbV1 () const
 

Public Attributes

const Value value
 

Friends

constexpr friend auto operator< (const Bulb &lhs, const Bulb &rhs) -> bool
 
auto operator<< (std::ostream &os, const Bulb &bulb) -> std::ostream &
 

Member Typedef Documentation

◆ Hash

using traffic_simulator::TrafficLight::Bulb::Hash = std::uint32_t

◆ Value

using traffic_simulator::TrafficLight::Bulb::Value = std::tuple<Color, Status, Shape>

Constructor & Destructor Documentation

◆ Bulb() [1/3]

constexpr traffic_simulator::TrafficLight::Bulb::Bulb ( const Value  value)
inlineconstexpr

◆ Bulb() [2/3]

constexpr traffic_simulator::TrafficLight::Bulb::Bulb ( const Color  color = {},
const Status  status = {},
const Shape  shape = {} 
)
inlineconstexpr

◆ Bulb() [3/3]

traffic_simulator::TrafficLight::Bulb::Bulb ( const std::string &  name)
inline

Member Function Documentation

◆ hash()

constexpr auto traffic_simulator::TrafficLight::Bulb::hash ( ) const -> Hash
inlineconstexpr

◆ is() [1/4]

constexpr auto traffic_simulator::TrafficLight::Bulb::is ( const Color  color) const
inlineconstexpr

◆ is() [2/4]

constexpr auto traffic_simulator::TrafficLight::Bulb::is ( const Shape  shape) const
inlineconstexpr

◆ is() [3/4]

constexpr auto traffic_simulator::TrafficLight::Bulb::is ( const Shape::Category  category) const
inlineconstexpr

◆ is() [4/4]

constexpr auto traffic_simulator::TrafficLight::Bulb::is ( const Status  status) const
inlineconstexpr

◆ make()

auto traffic_simulator::TrafficLight::Bulb::make ( const std::string &  s) -> Value

◆ operator simulation_api_schema::TrafficLight()

traffic_simulator::TrafficLight::Bulb::operator simulation_api_schema::TrafficLight ( ) const
inlineexplicit

◆ operator traffic_simulator_msgs::msg::TrafficLightBulbV1()

traffic_simulator::TrafficLight::Bulb::operator traffic_simulator_msgs::msg::TrafficLightBulbV1 ( ) const
inlineexplicit

Friends And Related Function Documentation

◆ operator<

constexpr friend auto operator< ( const Bulb lhs,
const Bulb rhs 
) -> bool
friend

◆ operator<<

auto operator<< ( std::ostream &  os,
const Bulb bulb 
) -> std::ostream &
friend

Member Data Documentation

◆ value

const Value traffic_simulator::TrafficLight::Bulb::value

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