SectionPairRow.hpp 1.0 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-09
  7. *
  8. * */
  9. #ifndef LS_STD_SECTION_PAIR_ROW_HPP
  10. #define LS_STD_SECTION_PAIR_ROW_HPP
  11. #include "SectionPairRowEnumType.hpp"
  12. #include <list>
  13. #include <ls-std/core/Class.hpp>
  14. #include <string>
  15. namespace ls::std::io
  16. {
  17. class SectionPairRow : public ls::std::core::Class
  18. {
  19. public:
  20. explicit SectionPairRow(const ::std::string &_key);
  21. ~SectionPairRow() override;
  22. [[nodiscard]] ::std::string getKey();
  23. [[nodiscard]] ::std::string getValue();
  24. [[nodiscard]] bool isKeyValue();
  25. [[nodiscard]] bool isList();
  26. void setValue(const ::std::string &_value);
  27. private:
  28. ::std::string key{};
  29. ls::std::io::SectionPairRowEnumType type{};
  30. ::std::list<::std::string> values{};
  31. void _setType(const ls::std::io::SectionPairRowEnumType& _type);
  32. void _setValue(const ::std::string &_value);
  33. };
  34. }
  35. #endif