|
maliput
|
Describes a discrete value rule.
DiscreteValues are defined by a string value. Semantics of this rule are based on all possible values that this Rule::TypeId could have (as specified by RuleRegistry::FindRuleByType()), not only the subset of values that a specific instance of this rule can be in.
#include <include/maliput/api/rules/discrete_value_rule.h>
Classes | |
| struct | DiscreteValue |
| Defines a discrete value for a DiscreteValueRule. More... | |
Public Member Functions | |
| MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN (DiscreteValueRule) | |
| DiscreteValueRule (const Rule::Id &id, const Rule::TypeId &type_id, const LaneSRoute &zone, const std::vector< DiscreteValue > &values) | |
| Constructs a DiscreteValueRule. More... | |
| const std::vector< DiscreteValue > & | states () const |
Public Member Functions inherited from Rule | |
| MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN (Rule) | |
| Rule (const Id &id, const TypeId &type_id, const LaneSRoute &zone) | |
| Constructs a Rule. More... | |
| virtual | ~Rule ()=default |
| const Id & | id () const |
| const TypeId & | type_id () const |
| const LaneSRoute & | zone () const |
Additional Inherited Members | |
Public Types inherited from Rule | |
| using | Id = TypeSpecificIdentifier< class Rule > |
| Alias for the Rule's unique ID across all Rule types. More... | |
| using | TypeId = TypeSpecificIdentifier< class Type > |
| Alias for the Rule's type. More... | |
| using | RelatedRules = std::map< std::string, std::vector< Id > > |
| Alias of a map holding groups of related rules. More... | |
| using | RelatedUniqueIds = std::map< std::string, std::vector< UniqueId > > |
| Alias of a map holding groups of related unique ids. More... | |
Protected Member Functions inherited from Rule | |
| void | ValidateRelatedRules (const RelatedRules &related_rules) const |
| void | ValidateRelatedUniqueIds (const RelatedUniqueIds &related_unique_ids) const |
| void | ValidateSeverity (int severity) const |
| DiscreteValueRule | ( | const Rule::Id & | id, |
| const Rule::TypeId & | type_id, | ||
| const LaneSRoute & | zone, | ||
| const std::vector< DiscreteValue > & | values | ||
| ) |
Constructs a DiscreteValueRule.
| id | The Rule ID. |
| type_id | The Rule Type ID. |
| zone | LaneSRoute to which this rule applies. |
| values | A vector of possible discrete values that this Rule could be in. The actual value that's enforced at any given time is determined by a DiscreteValueRuleStateProvider. It must have at least one value; each value must be unique. |
| maliput::common::rulebook_error | When values is empty. |
| maliput::common::rulebook_error | When there are duplicated values in values. |
| MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN | ( | DiscreteValueRule | ) |
| const std::vector<DiscreteValue>& states | ( | ) | const |