| 1234567891011121314151617181920212223 |
- #pragma once
- #include <jvalidate/forward.h>
- #define VISITOR_PURE_VIRTUAL(TYPE) virtual Status visit(TYPE const &) const = 0;
- namespace jvalidate::constraint {
- /**
- * @brief The base interface for visitors to be implemented off of.
- * Provides a visit function for every provided concrete type of Constraint,
- * as well as the ExtensionConstraint interface.
- */
- struct ConstraintVisitor {
- virtual ~ConstraintVisitor() = default;
- CONSTRAINT_IMPLEMENTATION_LIST(VISITOR_PURE_VIRTUAL);
- };
- template <typename Cons> struct ExtensionConstraintVisitor {
- virtual Status visit(Cons const &) const = 0;
- };
- }
- #undef VISITOR_PURE_VIRTUAL
|