maliput_sparse
Validator Class Reference

Detailed Description

After parsing a road network, the Validator can be used to check for errors before creating a maliput::api::RoadNetwork via the maliput_sparse::loader::RoadNetworkLoader.

The Validator can be configured to check for different types of errors and provide an interface to retrieve the errors found. The errors are stored in a vector of Error structs. The Error struct contains a message, the type of error, and the severity. It's on the user to decide how to handle the errors.

#include <include/maliput_sparse/parser/validator.h>

Classes

struct  Error
 Error struct that contains the error message, type, and severity. More...
 

Public Types

enum  Type { kLogicalLaneAdjacency, kGeometricalLaneAdjacency }
 The type of validation. More...
 
using Types = std::unordered_set< Validator::Type >
 

Public Member Functions

 Validator (const Parser *parser, const Types &types, const ValidatorConfig &config)
 Constructor for Validator. More...
 
std::vector< Erroroperator() () const
 Returns the errors found during validation. More...
 

Member Typedef Documentation

◆ Types

using Types = std::unordered_set<Validator::Type>

Member Enumeration Documentation

◆ Type

enum Type
strong

The type of validation.

Enumerator
kLogicalLaneAdjacency 
kGeometricalLaneAdjacency 

Constructor & Destructor Documentation

◆ Validator()

Validator ( const Parser parser,
const Types types,
const ValidatorConfig config 
)

Constructor for Validator.

During construction, the Validator will perform the validation checks.

Parameters
parserThe maliput_sparse::parser::Parser instance to validate.
typesThe types of validation to perform.
configThe maliput_sparse::parser::ValidatorConfig to use.

Member Function Documentation

◆ operator()()

std::vector< Validator::Error > operator() ( ) const

Returns the errors found during validation.


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