SectionPairRow.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-08
  6. * Changed: 2023-02-10
  7. *
  8. * */
  9. #ifndef LS_STD_SECTION_PAIR_ROW_HPP
  10. #define LS_STD_SECTION_PAIR_ROW_HPP
  11. #include "SectionPairRowEnumType.hpp"
  12. #include "SectionPairTypes.hpp"
  13. #include <list>
  14. #include <ls-std/core/Class.hpp>
  15. #include <ls-std/os/dynamic-goal.hpp>
  16. namespace ls::std::io
  17. {
  18. class LS_STD_DYNAMIC_GOAL SectionPairRow : public ls::std::core::Class
  19. {
  20. public:
  21. explicit SectionPairRow(const ls::std::io::section_pair_identifier &_key);
  22. ~SectionPairRow() override;
  23. [[nodiscard]] ls::std::io::section_pair_identifier getKey();
  24. [[nodiscard]] ls::std::io::section_pair_row_value getValue();
  25. [[nodiscard]] bool isKeyValue();
  26. [[nodiscard]] bool isList();
  27. void setValue(const ls::std::io::section_pair_row_value &_value);
  28. private:
  29. ls::std::io::section_pair_identifier key{};
  30. ls::std::io::SectionPairRowEnumType type{};
  31. ::std::list<ls::std::io::section_pair_row_value> values{};
  32. void _setType(const ls::std::io::SectionPairRowEnumType &_type);
  33. void _setValue(const ls::std::io::section_pair_row_value &_value);
  34. };
  35. }
  36. #endif