SectionPairRowSingleValue.hpp 1.7 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-13
  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. * @doc: class(name: 'SectionPairRowSingleValue', package: 'io')
  19. * @doc: io.SectionPairRowSingleValue.description('This class represents a Section Pair row single value.')
  20. * */
  21. namespace ls::std::io
  22. {
  23. class LS_STD_DYNAMIC_GOAL SectionPairRowSingleValue : public ::std::enable_shared_from_this<SectionPairRowSingleValue>, public ls::std::core::Class, public ls::std::io::SectionPairRowValue
  24. {
  25. public:
  26. explicit SectionPairRowSingleValue(const ls::std::io::section_pair_row_value &_value);
  27. ~SectionPairRowSingleValue() noexcept override;
  28. [[nodiscard]] ls::std::io::section_pair_row_value get() const;
  29. [[nodiscard]] ls::std::io::SectionPairRowEnumType getType() override;
  30. [[nodiscard]] ls::std::core::type::byte_field marshal() override;
  31. void set(const ls::std::io::section_pair_row_value &_value);
  32. void unmarshal(const ls::std::core::type::byte_field &_data) override;
  33. private:
  34. ::std::shared_ptr<ls::std::core::interface_type::ISerializable> serializable{};
  35. ls::std::io::section_pair_row_value value{};
  36. void _createSerializable();
  37. void _set(const ls::std::io::section_pair_row_value &_value);
  38. };
  39. }
  40. #endif