#pragma once #include #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 struct ExtensionConstraintVisitor { virtual Status visit(Cons const &) const = 0; }; } #undef VISITOR_PURE_VIRTUAL