SectionPairRowListValue.hpp 1.7 KB

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