SectionPairSectionIdUnmarshalValidator.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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-17
  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. #include <string>
  16. namespace ls::std::io
  17. {
  18. class LS_STD_DYNAMIC_GOAL SectionPairSectionIdUnmarshalValidator : public ls::std::core::Class, public ls::std::core::interface_type::IValidator
  19. {
  20. public:
  21. explicit SectionPairSectionIdUnmarshalValidator(ls::std::core::type::byte_field _data, ::std::string _newLine);
  22. ~SectionPairSectionIdUnmarshalValidator() override;
  23. [[nodiscard]] bool isValid() override;
  24. private:
  25. ls::std::core::type::byte_field data{};
  26. ::std::string newLine{};
  27. [[nodiscard]] static bool _isValidSection(const ls::std::core::type::byte_field &_bracketsNotation);
  28. [[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);
  29. };
  30. }
  31. #endif