maliput
DiscreteValueRuleStateProvider Class Referenceabstract

Detailed Description

Abstract interface for the state provider of DiscreteValueRules.

#include <include/maliput/api/rules/discrete_value_rule_state_provider.h>

Inheritance diagram for DiscreteValueRuleStateProvider:
[legend]

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< StateResultGetState (const Rule::Id &id) const
 Gets the state of the DiscreteValueRule identified by id. More...
 
std::optional< StateResultGetState (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
 

Member Typedef Documentation

◆ StateResult

The state of a DiscreteValueRule, returned by DiscreteValueRuleStateProvider::GetState(const Rule::Id&).

Constructor & Destructor Documentation

◆ ~DiscreteValueRuleStateProvider()

virtual ~DiscreteValueRuleStateProvider ( )
virtualdefault

◆ DiscreteValueRuleStateProvider()

DiscreteValueRuleStateProvider ( )
protecteddefault

Member Function Documentation

◆ GetState() [1/2]

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.

◆ GetState() [2/2]

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.


The documentation for this class was generated from the following file: