LogLevel.hpp 874 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2020-08-20
  6. * Changed: 2020-11-20
  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. class LogLevel : public Class {
  16. public:
  17. explicit LogLevel(const ls_std::LogLevelValue& _value);
  18. LogLevel();
  19. ~LogLevel() = default;
  20. operator unsigned char() const;
  21. LogLevel& operator=(const ls_std::LogLevelValue& _value);
  22. bool operator<=(const ls_std::LogLevelValue& _value);
  23. std::string toString() const;
  24. private:
  25. std::unordered_map<uint8_t , std::string> level {};
  26. ls_std::LogLevelValue value {};
  27. void _init();
  28. };
  29. }
  30. #endif