SectionPairRowListValue.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-10
  6. * Changed: 2023-02-22
  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. namespace ls::std::io
  17. {
  18. class LS_STD_DYNAMIC_GOAL SectionPairRowListValue : public ::std::enable_shared_from_this<SectionPairRowListValue>, public ls::std::core::Class, public ls::std::io::SectionPairRowValue
  19. {
  20. public:
  21. SectionPairRowListValue();
  22. ~SectionPairRowListValue() noexcept override;
  23. void add(const ls::std::io::section_pair_row_value &_value);
  24. void clear();
  25. [[nodiscard]] ls::std::io::section_pair_row_value get(size_t _index);
  26. [[nodiscard]] ::std::list<ls::std::io::section_pair_row_value> getList();
  27. [[nodiscard]] size_t getSize();
  28. [[nodiscard]] ls::std::io::SectionPairRowEnumType getType() override;
  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. ::std::shared_ptr<ls::std::core::interface_type::ISerializable> serializable{};
  33. ::std::list<ls::std::io::section_pair_row_value> values{};
  34. void _createSerializable();
  35. };
  36. }
  37. #endif