SystemTime.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Co-Author: Claude Sonnet 4.6 (LLM)
  4. * Company: Lynar Studios
  5. * E-Mail: webmaster@lynarstudios.com
  6. * Created: 2023-03-07
  7. * Changed: 2026-06-23
  8. *
  9. * */
  10. #ifndef LS_STD_SYSTEM_TIME_HPP
  11. #define LS_STD_SYSTEM_TIME_HPP
  12. #include "SystemTimeParameter.hpp"
  13. #include <cstdint>
  14. #include <ls-std/core/Class.hpp>
  15. #include <ls-std/os/dynamic-goal.hpp>
  16. #include <ls-std/time/common/DateParameter.hpp>
  17. #include <ls-std/time/type/DateParameterTypes.hpp>
  18. #include <memory>
  19. #include <string>
  20. /*
  21. * @doc: class(name: 'SystemTime', package: 'time')
  22. * @doc: time.SystemTime.description('This class represents the system time and can be set. This would require root privileges.')
  23. * */
  24. namespace ls::standard::time
  25. {
  26. class LS_STD_DYNAMIC_GOAL SystemTime : public ls::standard::core::Class
  27. {
  28. public:
  29. explicit SystemTime(const ::std::shared_ptr<ls::standard::time::SystemTimeParameter> &_parameter);
  30. SystemTime();
  31. ~SystemTime() noexcept override;
  32. [[nodiscard]] bool set(const ls::standard::time::DateParameter &_dateParameter) const;
  33. private:
  34. ::std::shared_ptr<ls::standard::time::SystemTimeParameter> parameter{};
  35. [[nodiscard]] static ::std::string _fetchClassName();
  36. void _generateParameter();
  37. };
  38. }
  39. #endif