LogLevel.hpp 882 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-08-20
  6. * Changed: 2021-04-23
  7. *
  8. * */
  9. #ifndef LS_STD_LOG_LEVEL_HPP
  10. #define LS_STD_LOG_LEVEL_HPP
  11. #include <unordered_map>
  12. #include <ls_std/base/Class.hpp>
  13. #include "LogLevelValue.hpp"
  14. namespace ls_std
  15. {
  16. class LogLevel : public Class
  17. {
  18. public:
  19. explicit LogLevel(const ls_std::LogLevelValue &_value);
  20. LogLevel();
  21. ~LogLevel() override = default;
  22. operator unsigned char() const;
  23. LogLevel &operator=(const ls_std::LogLevelValue &_value);
  24. bool operator<=(const ls_std::LogLevelValue &_value);
  25. std::string toString() const;
  26. private:
  27. std::unordered_map<uint8_t, std::string> level{};
  28. ls_std::LogLevelValue value{};
  29. void _init();
  30. };
  31. }
  32. #endif