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
33#ifdef LL_PLAT_S
34public:
35 // prevent constructor by default
36 DateManager& operator=(DateManager const&);
37 DateManager(DateManager const&);
38 DateManager();
39
40#else // LL_PLAT_C
41public:
42 // prevent constructor by default
43 DateManager& operator=(DateManager const&);
44 DateManager(DateManager const&);
45
46#endif
47public:
48 // virtual functions
49 // NOLINTBEGIN
50 virtual ~DateManager() /*override*/ = default;
51
52 virtual int64 _getUnixTime();
53 // NOLINTEND
54
55public:
56 // member functions
57 // NOLINTBEGIN
58#ifdef LL_PLAT_C
59 MCNAPI DateManager();
60
61 MCNAPI void _sendScheduledCallbacks();
62
63 MCNAPI void registerScheduledCallback(::ScheduledCallback callback) const;
64
65 MCNAPI ::std::string toString(::DateManager::TimeZoneType outputType, ::std::string const& format) const;
66#endif
67 // NOLINTEND
68
69public:
70 // static functions
71 // NOLINTBEGIN
72 MCNAPI static int _parseTime(char const* str, uint64 const len, uint* hours, uint* minutes, uint* seconds);
73
74 MCNAPI static int
75 _parseTimeZone(char const* str, uint64 const len, ::DateManager::TimeZoneType* type, int* hours, int* minutes);
76
77 MCNAPI static ::std::string getCurrentTimestampFileName();
78
79 MCNAPI static int64 getRealTime();
80
81 MCNAPI static ::Bedrock::Result<int64> parseImfFixdate(::std::string const& dateHeader);
82
83 MCNAPI static ::Bedrock::Result<::std::chrono::seconds> parseNetTimeSpan(::std::string_view str);
84
85#ifdef LL_PLAT_C
86 MCNAPI static bool toDateTime(
87 ::std::string const& strTime,
88 ::tm* result,
89 ::DateManager::TimeZoneType* resultType,
90 int* resultTimeZoneMinutes
91 );
92#endif
93
94 MCNAPI static bool toEpochTime(
95 ::std::string const& strTime,
96 int64* result,
97 ::DateManager::TimeZoneType* resultType,
98 int* resultTimeZoneMinutes
99 );
100
101 MCNAPI static int64 toEpochTime(::tm const* dateTime, ::DateManager::TimeZoneType inputType);
102
103 MCNAPI static ::std::string
104 toString(::tm const& time, ::std::string const& format, ::std::optional<::std::locale> const& locale);
105
106#ifdef LL_PLAT_C
107 MCNAPI static ::std::string toString_Date(::tm const& time);
108#endif
109
110 MCNAPI static ::std::string toString_DateTime(::tm const& time, ::DateManager::TimeZoneType outputType);
111
112 MCNAPI static ::std::string toString_NetTimeSpan(::std::chrono::seconds value);
113 // NOLINTEND
114
115public:
116 // constructor thunks
117 // NOLINTBEGIN
118#ifdef LL_PLAT_C
119 MCNAPI void* $ctor();
120#endif
121 // NOLINTEND
122
123public:
124 // virtual function thunks
125 // NOLINTBEGIN
126#ifdef LL_PLAT_C
127 MCNAPI int64 $_getUnixTime();
128#endif
129
130
131 // NOLINTEND
132
133public:
134 // vftables
135 // NOLINTBEGIN
136 MCNAPI static void** $vftable();
137 // NOLINTEND
138};
Definition EnableNonOwnerReferences.h:7
static MCAPI int64 toEpochTime(::tm const *dateTime, ::DateManager::TimeZoneType inputType)
static MCAPI ::std::string toString_NetTimeSpan(::std::chrono::seconds value)
static MCAPI void ** $vftable()
static MCAPI ::Bedrock::Result< int64 > parseImfFixdate(::std::string const &dateHeader)
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 ::Bedrock::Result<::std::chrono::seconds > parseNetTimeSpan(::std::string_view str)
static MCAPI int _parseTime(char const *str, uint64 const len, uint *hours, uint *minutes, uint *seconds)
static MCAPI ::std::string toString_DateTime(::tm const &time, ::DateManager::TimeZoneType outputType)
static MCAPI int64 getRealTime()
static MCAPI bool toEpochTime(::std::string const &strTime, int64 *result, ::DateManager::TimeZoneType *resultType, int *resultTimeZoneMinutes)
static MCAPI int _parseTimeZone(char const *str, uint64 const len, ::DateManager::TimeZoneType *type, int *hours, int *minutes)
Definition ScheduledCallback.h:5
Definition Alias.h:14