/*
* Author:          Patrick-Christopher Mattulat
* Co-Author:       Claude Sonnet 4.6 (LLM)
* Company:         Lynar Studios
* E-Mail:          webmaster@lynarstudios.com
* Created:         2023-02-10
* Changed:         2026-06-23
*
* */

#ifndef LS_STD_SECTION_PAIR_ROW_VALUE_HPP
#define LS_STD_SECTION_PAIR_ROW_VALUE_HPP

#include <ls-std/core/interface/ISerializable.hpp>
#include <ls-std/io/section-pair/SectionPairRowEnumType.hpp>
#include <ls-std/os/dynamic-goal.hpp>
#include <string_view>

/*
 * @doc: class(name: 'SectionPairRowValue', package: 'io')
 * @doc: io.SectionPairRowValue.description('This class represents a Section Pair row value.')
 * */

namespace ls::standard::io
{
  class LS_STD_DYNAMIC_GOAL SectionPairRowValue : public ls::standard::core::interface_type::ISerializable
  {
    public:

      explicit SectionPairRowValue(const ls::standard::io::SectionPairRowEnumType &_type);
      ~SectionPairRowValue() noexcept override;

      virtual ls::standard::io::SectionPairRowEnumType getType() = 0;
      [[nodiscard]] ls::standard::core::type::byte_field marshal() override;
      void reserveNewLine(::std::string_view _reservedNewLine);
      void unmarshal(const ls::standard::core::type::byte_field &_data) override;

    protected:

      [[nodiscard]] ::std::string _getReservedNewLine() const;
      [[nodiscard]] ls::standard::io::SectionPairRowEnumType _getType() const;

    private:

      ::std::string reservedNewLine{};
      ls::standard::io::SectionPairRowEnumType type{};
  };
}

#endif
