SectionPairDocumentValidator.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-21
  6. * Changed: 2024-09-13
  7. *
  8. * */
  9. #ifndef LS_STD_SECTION_PAIR_DOCUMENT_VALIDATOR_HPP
  10. #define LS_STD_SECTION_PAIR_DOCUMENT_VALIDATOR_HPP
  11. #include <ls-std/core/Class.hpp>
  12. #include <ls-std/core/interface/IValidator.hpp>
  13. #include <ls-std/os/dynamic-goal.hpp>
  14. #include <string>
  15. /*
  16. * @doc: class(name: 'SectionPairDocumentValidator', package: 'io')
  17. * @doc: io.SectionPairDocumentValidator.description('This validator checks whether a content is a valid Section Pair document.')
  18. * */
  19. namespace ls::std::io
  20. {
  21. class LS_STD_DYNAMIC_GOAL SectionPairDocumentValidator : public ls::std::core::Class, public ls::std::core::interface_type::IValidator
  22. {
  23. public:
  24. explicit SectionPairDocumentValidator(::std::string _document);
  25. ~SectionPairDocumentValidator() noexcept override;
  26. [[nodiscard]] bool isValid() override;
  27. private:
  28. ::std::string document{};
  29. [[nodiscard]] static ::std::string _getValidationRegex();
  30. };
  31. }
  32. #endif