KvPair.hpp 975 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-12-25
  6. * Changed: 2023-02-06
  7. *
  8. * */
  9. #ifndef LS_STD_KV_PAIR_HPP
  10. #define LS_STD_KV_PAIR_HPP
  11. #include <ls-std/core/Class.hpp>
  12. #include <ls-std/core/types/KvTypes.hpp>
  13. #include <ls-std/os/dynamic-goal.hpp>
  14. namespace ls::std::io
  15. {
  16. class LS_STD_DYNAMIC_GOAL KvPair : public ls::std::core::Class
  17. {
  18. public:
  19. explicit KvPair(const ls::std::core::type::kv_key &_key, ls::std::core::type::kv_value _value);
  20. ~KvPair() override;
  21. [[nodiscard]] ls::std::core::type::kv_key getKey();
  22. [[nodiscard]] ls::std::core::type::kv_value getValue();
  23. void setValue(const ls::std::core::type::kv_value &_value);
  24. private:
  25. ls::std::core::type::kv_key key{};
  26. ls::std::core::type::kv_value value{};
  27. void _assignKey(const ls::std::core::type::kv_key &_key);
  28. };
  29. }
  30. #endif