SectionPairRowListValue.hpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-10
  6. * Changed: 2025-12-24
  7. *
  8. * */
  9. #ifndef LS_STD_SECTION_PAIR_ROW_LIST_VALUE_HPP
  10. #define LS_STD_SECTION_PAIR_ROW_LIST_VALUE_HPP
  11. #include "SectionPairRowValue.hpp"
  12. #include <list>
  13. #include <ls-std/core/Class.hpp>
  14. #include <ls-std/io/section-pair/SectionPairTypes.hpp>
  15. #include <ls-std/os/dynamic-goal.hpp>
  16. #include <memory>
  17. /*
  18. * @doc: class(name: 'SectionPairRowListValue', package: 'io')
  19. * @doc: io.SectionPairRowListValue.description('This class represents a Section Pair row list value.')
  20. * */
  21. namespace ls::std::io
  22. {
  23. class LS_STD_DYNAMIC_GOAL SectionPairRowListValue : public ::std::enable_shared_from_this<SectionPairRowListValue>, public ls::std::core::Class, public ls::std::io::SectionPairRowValue
  24. {
  25. public:
  26. SectionPairRowListValue();
  27. ~SectionPairRowListValue() noexcept override;
  28. void add(const ls::std::io::section_pair_row_value &_value);
  29. void clear();
  30. [[nodiscard]] ls::std::io::section_pair_row_value get(size_t _index) const;
  31. [[nodiscard]] ::std::list<ls::std::io::section_pair_row_value> getList() const;
  32. [[nodiscard]] size_t getSize() const;
  33. [[nodiscard]] ls::std::io::SectionPairRowEnumType getType() override;
  34. [[nodiscard]] ls::std::core::type::byte_field marshal() override;
  35. void unmarshal(const ls::std::core::type::byte_field &_data) override;
  36. private:
  37. ::std::shared_ptr<ls::std::core::interface_type::ISerializable> serializable{};
  38. ::std::list<ls::std::io::section_pair_row_value> values{};
  39. void _createSerializable();
  40. };
  41. }
  42. #endif