SectionPairRowSingleValue.hpp 1.5 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-22
  7. *
  8. * */
  9. #ifndef LS_STD_SECTION_PAIR_ROW_SINGLE_VALUE_HPP
  10. #define LS_STD_SECTION_PAIR_ROW_SINGLE_VALUE_HPP
  11. #include "SectionPairRowValue.hpp"
  12. #include <ls-std/core/Class.hpp>
  13. #include <ls-std/core/interface/ISerializable.hpp>
  14. #include <ls-std/io/section-pair/SectionPairTypes.hpp>
  15. #include <ls-std/os/dynamic-goal.hpp>
  16. #include <memory>
  17. namespace ls::std::io
  18. {
  19. class LS_STD_DYNAMIC_GOAL SectionPairRowSingleValue : public ::std::enable_shared_from_this<SectionPairRowSingleValue>, public ls::std::core::Class, public ls::std::io::SectionPairRowValue
  20. {
  21. public:
  22. explicit SectionPairRowSingleValue(const ls::std::io::section_pair_row_value &_value);
  23. ~SectionPairRowSingleValue() noexcept override;
  24. [[nodiscard]] ls::std::io::section_pair_row_value get();
  25. [[nodiscard]] ls::std::io::SectionPairRowEnumType getType() override;
  26. [[nodiscard]] ls::std::core::type::byte_field marshal() override;
  27. void set(const ls::std::io::section_pair_row_value &_value);
  28. void unmarshal(const ls::std::core::type::byte_field &_data) override;
  29. private:
  30. ::std::shared_ptr<ls::std::core::interface_type::ISerializable> serializable{};
  31. ls::std::io::section_pair_row_value value{};
  32. void _createSerializable();
  33. void _set(const ls::std::io::section_pair_row_value &_value);
  34. };
  35. }
  36. #endif