/*
* 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_LIST_VALUE_HPP
#define LS_STD_SECTION_PAIR_ROW_LIST_VALUE_HPP

#include "SectionPairRowValue.hpp"
#include <list>
#include <ls-std/core/Class.hpp>
#include <ls-std/io/section-pair/SectionPairTypes.hpp>
#include <ls-std/os/dynamic-goal.hpp>

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

namespace ls::standard::io
{
  class LS_STD_DYNAMIC_GOAL SectionPairRowListValue : public ::std::enable_shared_from_this<SectionPairRowListValue>, public ls::standard::core::Class, public ls::standard::io::SectionPairRowValue
  {
    public:

      SectionPairRowListValue();
      ~SectionPairRowListValue() noexcept override;

      void add(const ls::standard::io::section_pair_row_value &_value);
      void clear();
      [[nodiscard]] ls::standard::io::section_pair_row_value get(size_t _index) const;
      [[nodiscard]] ::std::list<ls::standard::io::section_pair_row_value> getList() const;
      [[nodiscard]] size_t getSize() const;
      [[nodiscard]] ls::standard::io::SectionPairRowEnumType getType() override;
      [[nodiscard]] ls::standard::core::type::byte_field marshal() override;
      void unmarshal(const ls::standard::core::type::byte_field &_data) override;

    private:

      ::std::shared_ptr<ls::standard::core::interface_type::ISerializable> serializable{};
      ::std::list<ls::standard::io::section_pair_row_value> values{};

      void _createSerializable();
  };
}

#endif
