LeviLamina
Loading...
Searching...
No Matches
DateManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
7#include "mc/platform/Result.h"
8
9// auto generated forward declare list
10// clang-format off
12// clang-format on
13
14class DateManager : public ::Bedrock::EnableNonOwnerReferences {
15public:
16 // DateManager inner types define
17 enum class TimeZoneType : int {
18 Utc = 0,
19 Local = 1,
20 };
21
22public:
23 // member variables
24 // NOLINTBEGIN
31 // NOLINTEND
32
33public:
34 // prevent constructor by default
35 DateManager& operator=(DateManager const&);
36 DateManager(DateManager const&);
37 DateManager();
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 virtual ~DateManager() /*override*/ = default;
43
44 virtual int64 _getUnixTime();
45 // NOLINTEND
46
47public:
48 // member functions
49 // NOLINTBEGIN
50 MCNAPI_C void _sendScheduledCallbacks();
51
52 MCNAPI_C ::tm getDateTime(::DateManager::TimeZoneType returnType) const;
53
54 MCNAPI_C bool isBetweenDates(::std::string const& start, ::std::string const& end) const;
55
56 MCNAPI_C bool isInPast(::std::string const& strTime) const;
57
58 MCNAPI_C void registerScheduledCallback(::ScheduledCallback callback) const;
59
60 MCNAPI_C ::std::string toString(::DateManager::TimeZoneType outputType, ::std::string const& format) const;
61 // NOLINTEND
62
63public:
64 // static functions
65 // NOLINTBEGIN
66 MCNAPI static int
67 _parseTimeZone(char const* str, uint64 len, ::DateManager::TimeZoneType* type, int* hours, int* minutes);
68
69 MCNAPI static ::std::string getCurrentTimestampFileName();
70
71 MCNAPI static int64 getRealTime();
72
73 MCNAPI static ::Bedrock::Result<int64> parseImfFixdate(::std::string const& dateHeader);
74
75 MCNAPI static bool toDateTime(
76 ::std::string const& strTime,
77 ::tm* result,
78 ::DateManager::TimeZoneType* resultType,
79 int* resultTimeZoneMinutes
80 );
81
82 MCNAPI_C static int64 toEpochTime(::std::string const& strTime);
83
84 MCNAPI static int64 toEpochTime(::tm const* dateTime, ::DateManager::TimeZoneType inputType);
85
86 MCNAPI static ::std::string
87 toString(::tm const& time, ::std::string const& format, ::std::optional<::std::locale> const& locale);
88
89 MCNAPI_C static ::std::string toString_Date(::tm const& time);
90
91 MCNAPI static ::std::string toString_DateTime(::tm const& time, ::DateManager::TimeZoneType outputType);
92
93 MCNAPI_C static ::std::string toString_DateTime(int64 const& time, ::DateManager::TimeZoneType outputType);
94 // NOLINTEND
95
96public:
97 // constructor thunks
98 // NOLINTBEGIN
99 MCNAPI_C void* $ctor();
100 // NOLINTEND
101
102public:
103 // virtual function thunks
104 // NOLINTBEGIN
105#ifdef LL_PLAT_C
106 MCNAPI int64 $_getUnixTime();
107#endif
108
109
110 // NOLINTEND
111
112public:
113 // vftables
114 // NOLINTBEGIN
115 MCNAPI static void** $vftable();
116 // NOLINTEND
117};
Definition EnableNonOwnerReferences.h:7
static MCAPI int64 toEpochTime(::tm const *dateTime, ::DateManager::TimeZoneType inputType)
static MCAPI void ** $vftable()
static MCAPI ::Bedrock::Result< int64 > parseImfFixdate(::std::string const &dateHeader)
static MCAPI int _parseTimeZone(char const *str, uint64 len, ::DateManager::TimeZoneType *type, int *hours, int *minutes)
static MCAPI ::std::string getCurrentTimestampFileName()
static MCAPI ::std::string toString(::tm const &time, ::std::string const &format, ::std::optional<::std::locale > const &locale)
static MCAPI ::std::string toString_DateTime(::tm const &time, ::DateManager::TimeZoneType outputType)
static MCAPI bool toDateTime(::std::string const &strTime, ::tm *result, ::DateManager::TimeZoneType *resultType, int *resultTimeZoneMinutes)
static MCAPI int64 getRealTime()
Definition ScheduledCallback.h:5
Definition Alias.h:14