10 namespace validation {
14 template <
typename Val
idatorT>
17 template <
typename Val
idatorT>
22 template <
typename Val
idatorT>
36 template <
typename Val
idatorT>
39 template <
typename Val
idatorT>
42 template <
typename Val
idatorT>
65 static_assert(!
utils::strequal(T::name(),
""),
"You did not overload the name() function!");
75 static_assert(!
utils::strequal(T::name(),
""),
"You did not overload the name() function!");
85 static_assert(!
utils::strequal(T::name(),
""),
"You did not overload the name() function!");
std::map< std::string, CreationFcn< TrafficRuleValidator > > trafficRuleValidatorRegistry_
RegisterRoutingGraphValidator()
std::map< std::string, CreationFcn< RoutingGraphValidator > > routingGraphValidatorRegistry_
ValidatorsWithName< MapValidator > createMapValidators(const Regexes ®exes)
std::map< std::string, CreationFcn< MapValidator > > mapValidatorRegistry_
constexpr bool strequal(char const *lhs, char const *rhs)
ValidatorsWithName< RoutingGraphValidator > createRoutingGraphValidators(const Regexes ®exes)
Registration object for a map validator. Needs to be instanciated as static object once to register a...
Registration object for traffic rule validators.
ValidatorFactory()=default
void registerMapValidator(const std::string &name, const CreationFcn< MapValidator > &creator)
Registration object for routing graph validators.
std::function< ValidatorT *()> CreationFcn
std::pair< std::string, std::unique_ptr< ValidatorT > > ValidatorWithName
RegisterTrafficRuleValidator()
ValidatorsWithName< TrafficRuleValidator > createTrafficRuleValidators(const Regexes ®exes)
std::vector< std::regex > Regexes
void registerTrafficRuleValidator(const std::string &name, const CreationFcn< TrafficRuleValidator > &creator)
std::vector< std::string > availableValidators(const Regexes ®exes={})
returns all available parsers as vector
void registerRoutingGraphValidator(const std::string &name, const CreationFcn< RoutingGraphValidator > &creator)
std::vector< ValidatorWithName< ValidatorT > > ValidatorsWithName
static ValidatorFactory & instance()