maliput_sparse
|
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< Error > | operator() () const |
Returns the errors found during validation. More... | |
using Types = std::unordered_set<Validator::Type> |
|
strong |
Validator | ( | const Parser * | parser, |
const Types & | types, | ||
const ValidatorConfig & | config | ||
) |
Constructor for Validator.
During construction, the Validator will perform the validation checks.
parser | The maliput_sparse::parser::Parser instance to validate. |
types | The types of validation to perform. |
config | The maliput_sparse::parser::ValidatorConfig to use. |
std::vector< Validator::Error > operator() | ( | ) | const |
Returns the errors found during validation.