SectionPairRowListValue.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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-16
  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. namespace ls::std::io
  16. {
  17. class SectionPairRowListValue : public ::std::enable_shared_from_this<SectionPairRowListValue>, public ls::std::core::Class, public ls::std::io::SectionPairRowValue
  18. {
  19. public:
  20. SectionPairRowListValue();
  21. ~SectionPairRowListValue() override;
  22. void add(const ls::std::io::section_pair_row_value &_value);
  23. void clear();
  24. [[nodiscard]] ls::std::io::section_pair_row_value get(size_t _index);
  25. [[nodiscard]] ::std::list<ls::std::io::section_pair_row_value> getList();
  26. [[nodiscard]] size_t getSize();
  27. [[nodiscard]] ls::std::io::SectionPairRowEnumType getType() override;
  28. [[nodiscard]] ls::std::core::type::byte_field marshal() override;
  29. void unmarshal(const ls::std::core::type::byte_field &_data) override;
  30. private:
  31. ::std::shared_ptr<ls::std::core::interface_type::ISerializable> serializable{};
  32. ::std::list<ls::std::io::section_pair_row_value> values{};
  33. void _createSerializable();
  34. };
  35. }
  36. #endif