#pragma once #include "libparse_global.h" #include #include namespace lib_parse { /** * @brief 检查机制异常 */ class LIBPARSE_EXPORT CheckException { private: QString msg_store; public: CheckException(const QString& msg); virtual ~CheckException() = default; virtual QString message() const; }; /** * @brief 校验机制提供类型 */ class CheckProvider { public: virtual QString name() const = 0; virtual void validCheck(std::shared_ptr root) const = 0; }; /** * @brief 解析器对外接口 */ class LIBPARSE_EXPORT Analyzer { private: QList> check_providers; public: Analyzer(const QList>& providers); std::shared_ptr validCheckWith(std::shared_ptr root) const; }; }