DateParameterMapper.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-03-31
  6. * Changed: 2024-09-11
  7. *
  8. * */
  9. #ifndef LS_STD_DATE_PARAMETER_MAPPER_HPP
  10. #define LS_STD_DATE_PARAMETER_MAPPER_HPP
  11. #include "DateParameter.hpp"
  12. #include <ls-std/os/dynamic-goal.hpp>
  13. #include <ls-std/time/type/DateParameterTypes.hpp>
  14. #ifdef _WIN32
  15. #include <windows.h>
  16. #endif
  17. /*
  18. * @doc: class(name: 'DateParameterMapper', package: 'time')
  19. * @doc: time.DateParameterMapper.description('This class maps date information to either an internal POSIX clock or an internal Windows clock, which can then be processed for setting the system time.')
  20. * */
  21. namespace ls::std::time
  22. {
  23. class LS_STD_DYNAMIC_GOAL DateParameterMapper
  24. {
  25. public:
  26. DateParameterMapper();
  27. ~DateParameterMapper();
  28. #if defined(unix) || defined(__APPLE__)
  29. [[nodiscard]] static ls::std::time::type::UnixTimestamp toUnixTimestamp(const ls::std::time::DateParameter &_dateParameter);
  30. #endif
  31. #ifdef _WIN32
  32. [[nodiscard]] static SYSTEMTIME toWindowsSystemTime(const ls::std::time::DateParameter &_dateParameter);
  33. #endif
  34. };
  35. }
  36. #endif