SectionPairRowSingleValue.hpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-10
  6. * Changed: 2024-05-25
  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. /*
  18. * @class(name: 'SectionPairRowSingleValue', package: 'io')
  19. * */
  20. namespace ls::std::io
  21. {
  22. class LS_STD_DYNAMIC_GOAL SectionPairRowSingleValue : public ::std::enable_shared_from_this<SectionPairRowSingleValue>, public ls::std::core::Class, public ls::std::io::SectionPairRowValue
  23. {
  24. public:
  25. explicit SectionPairRowSingleValue(const ls::std::io::section_pair_row_value &_value);
  26. ~SectionPairRowSingleValue() noexcept override;
  27. [[nodiscard]] ls::std::io::section_pair_row_value get() const;
  28. [[nodiscard]] ls::std::io::SectionPairRowEnumType getType() override;
  29. [[nodiscard]] ls::std::core::type::byte_field marshal() override;
  30. void set(const ls::std::io::section_pair_row_value &_value);
  31. void unmarshal(const ls::std::core::type::byte_field &_data) override;
  32. private:
  33. ::std::shared_ptr<ls::std::core::interface_type::ISerializable> serializable{};
  34. ls::std::io::section_pair_row_value value{};
  35. void _createSerializable();
  36. void _set(const ls::std::io::section_pair_row_value &_value);
  37. };
  38. }
  39. #endif