SectionPairRowValue.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-10
  6. * Changed: 2023-05-22
  7. *
  8. * */
  9. #ifndef LS_STD_SECTION_PAIR_ROW_VALUE_HPP
  10. #define LS_STD_SECTION_PAIR_ROW_VALUE_HPP
  11. #include <ls-std/core/interface/ISerializable.hpp>
  12. #include <ls-std/io/section-pair/SectionPairRowEnumType.hpp>
  13. #include <ls-std/os/dynamic-goal.hpp>
  14. #include <string_view>
  15. namespace ls::std::io
  16. {
  17. class LS_STD_DYNAMIC_GOAL SectionPairRowValue : public ls::std::core::interface_type::ISerializable
  18. {
  19. public:
  20. explicit SectionPairRowValue(const ls::std::io::SectionPairRowEnumType &_type);
  21. ~SectionPairRowValue() noexcept override;
  22. virtual ls::std::io::SectionPairRowEnumType getType() = 0;
  23. [[nodiscard]] ls::std::core::type::byte_field marshal() override;
  24. void reserveNewLine(::std::string_view _reservedNewLine);
  25. void unmarshal(const ls::std::core::type::byte_field &_data) override;
  26. protected:
  27. [[nodiscard]] ::std::string _getReservedNewLine() const;
  28. [[nodiscard]] ls::std::io::SectionPairRowEnumType _getType() const;
  29. private:
  30. ::std::string reservedNewLine{};
  31. ls::std::io::SectionPairRowEnumType type{};
  32. };
  33. }
  34. #endif