SectionPairRowListValue.hpp 1.6 KB

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