|
|
@@ -19,15 +19,13 @@ public:
|
|
|
}
|
|
|
|
|
|
namespace jvalidate {
|
|
|
-template <template <Adapter, RegexEngine> class ValidationVisitor,
|
|
|
- RegexEngine RE = detail::StdRegexEngine>
|
|
|
-class ExtendedValidator {
|
|
|
+template <RegexEngine RE = detail::StdRegexEngine> class ValidatorT {
|
|
|
private:
|
|
|
schema::Node const & schema_;
|
|
|
std::unordered_map<std::string, RE> regex_cache_;
|
|
|
|
|
|
public:
|
|
|
- ExtendedValidator(schema::Node const & schema) : schema_(schema) {}
|
|
|
+ ValidatorT(schema::Node const & schema) : schema_(schema) {}
|
|
|
|
|
|
template <Adapter A>
|
|
|
Status validate(A const & json, ValidationResult const * result = nullptr) const {
|
|
|
@@ -35,8 +33,8 @@ public:
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-class Validator : public ExtendedValidator<ValidationVisitor> {
|
|
|
+class Validator : public ValidatorT<> {
|
|
|
public:
|
|
|
- using Validator::ExtendedValidator::ExtendedValidator;
|
|
|
+ using Validator::ValidatorT::ValidatorT;
|
|
|
};
|
|
|
}
|