SectionPairSectionIdUnmarshalValidator.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-14
  6. * Changed: 2023-02-15
  7. *
  8. * */
  9. #ifndef LS_STD_SECTION_PAIR_SECTION_ID_UNMARSHAL_VALIDATOR_HPP
  10. #define LS_STD_SECTION_PAIR_SECTION_ID_UNMARSHAL_VALIDATOR_HPP
  11. #include <ls-std/core/Class.hpp>
  12. #include <ls-std/core/interface/IValidator.hpp>
  13. #include <ls-std/core/type/Types.hpp>
  14. #include <ls-std/os/dynamic-goal.hpp>
  15. namespace ls::std::io
  16. {
  17. class LS_STD_DYNAMIC_GOAL SectionPairSectionIdUnmarshalValidator : public ls::std::core::Class, public ls::std::core::interface_type::IValidator
  18. {
  19. public:
  20. explicit SectionPairSectionIdUnmarshalValidator(ls::std::core::type::byte_field _data);
  21. ~SectionPairSectionIdUnmarshalValidator() override;
  22. [[nodiscard]] bool isValid() override;
  23. private:
  24. ls::std::core::type::byte_field data{};
  25. [[nodiscard]] static bool _isValidSection(const ls::std::core::type::byte_field &_bracketsNotation);
  26. [[nodiscard]] static ls::std::core::type::byte_field _trimStartAndEnd(const ls::std::core::type::byte_field &_trimmedWord, const ls::std::core::type::byte_field &_beginningTrimWord, const ls::std::core::type::byte_field &_endingTrimWord);
  27. };
  28. }
  29. #endif