SerializableSectionPairRowListValue.hpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-11
  6. * Changed: 2024-09-13
  7. *
  8. * */
  9. #ifndef LS_STD_SERIALIZABLE_SECTION_PAIR_ROW_LIST_VALUE_HPP
  10. #define LS_STD_SERIALIZABLE_SECTION_PAIR_ROW_LIST_VALUE_HPP
  11. #include "SerializableSectionPairParameter.hpp"
  12. #include <ls-std/core/Class.hpp>
  13. #include <ls-std/core/interface/ISerializable.hpp>
  14. #include <ls-std/os/dynamic-goal.hpp>
  15. #include <memory>
  16. #include <string_view>
  17. /*
  18. * @doc: class(name: 'SerializableSectionPairRowListValue', package: 'io')
  19. * @doc: io.SerializableSectionPairRowListValue.description('This class can serialize a Section Pair row list value for file persistence.')
  20. * */
  21. namespace ls::std::io
  22. {
  23. class LS_STD_DYNAMIC_GOAL SerializableSectionPairRowListValue : public ls::std::core::interface_type::ISerializable, public ls::std::core::Class
  24. {
  25. public:
  26. explicit SerializableSectionPairRowListValue(const ls::std::io::SerializableSectionPairParameter &_parameter);
  27. ~SerializableSectionPairRowListValue() noexcept override;
  28. [[nodiscard]] ::std::shared_ptr<ls::std::core::Class> getValue() const;
  29. [[nodiscard]] ls::std::core::type::byte_field marshal() override;
  30. void unmarshal(const ls::std::core::type::byte_field &_data) override;
  31. private:
  32. ls::std::io::SerializableSectionPairParameter parameter{};
  33. [[nodiscard]] static ::std::string _getLine(::std::string::size_type _position, ::std::string_view _searchText);
  34. void _updateSearchText(::std::string::size_type _position, ls::std::core::type::byte_field &_searchText) const;
  35. };
  36. }
  37. #endif