SectionPairRow.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. namespace ls::std::io
  16. {
  17. class SectionPairRow : public ls::std::core::Class
  18. {
  19. public:
  20. explicit SectionPairRow(const ls::std::io::section_pair_identifier &_key);
  21. ~SectionPairRow() override;
  22. [[nodiscard]] ls::std::io::section_pair_identifier getKey();
  23. [[nodiscard]] ls::std::io::section_pair_row_value getValue();
  24. [[nodiscard]] bool isKeyValue();
  25. [[nodiscard]] bool isList();
  26. void setValue(const ls::std::io::section_pair_row_value &_value);
  27. private:
  28. ls::std::io::section_pair_identifier key{};
  29. ls::std::io::SectionPairRowEnumType type{};
  30. ::std::list<ls::std::io::section_pair_row_value> values{};
  31. void _setType(const ls::std::io::SectionPairRowEnumType &_type);
  32. void _setValue(const ls::std::io::section_pair_row_value &_value);
  33. };
  34. }
  35. #endif