maliput
|
Abstract interface for the state provider of DiscreteValueRules.
#include <include/maliput/api/rules/discrete_value_rule_state_provider.h>
Public Types | |
using | StateResult = StateProviderResult< DiscreteValueRule::DiscreteValue > |
The state of a DiscreteValueRule, returned by DiscreteValueRuleStateProvider::GetState(const Rule::Id&). More... | |
Public Member Functions | |
virtual | ~DiscreteValueRuleStateProvider ()=default |
std::optional< StateResult > | GetState (const Rule::Id &id) const |
Gets the state of the DiscreteValueRule identified by id . More... | |
std::optional< StateResult > | GetState (const RoadPosition &road_position, const Rule::TypeId &rule_type, double tolerance) const |
Gets the state of the DiscreteValueRule that matches provided road_position and rule_type values according to certain tolerance . More... | |
Protected Member Functions | |
DiscreteValueRuleStateProvider ()=default | |
The state of a DiscreteValueRule, returned by DiscreteValueRuleStateProvider::GetState(const Rule::Id&).
|
virtualdefault |
|
protecteddefault |
std::optional<StateResult> GetState | ( | const RoadPosition & | road_position, |
const Rule::TypeId & | rule_type, | ||
double | tolerance | ||
) | const |
Gets the state of the DiscreteValueRule that matches provided road_position
and rule_type
values according to certain tolerance
.
Returns a StateResult struct bearing the state of the rule. If no rule is obtained out of the road_position
and rule_type
combination, std::nullopt is returned.
std::optional<StateResult> GetState | ( | const Rule::Id & | id | ) | const |
Gets the state of the DiscreteValueRule identified by id
.
Returns a StateResult struct bearing the state of the rule with the specified id
. If id
is unrecognized, std::nullopt is returned.