LeviLamina
Loading...
Searching...
No Matches
BackgroundTaskBase.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4#include "mc/common/Globals.h"
5#include "mc/deps/core/threading/InternalTaskGroup.h"
6
7// auto generated inclusion list
8#include "mc/deps/core/memory/MemoryCategory.h"
9#include "mc/deps/core/threading/TaskRunResult.h"
10
11// auto generated forward declare list
12// clang-format off
15struct TaskStartInfo;
16// clang-format on
17
18class BackgroundTaskBase {
19public:
20 // BackgroundTaskBase inner types declare
21 // clang-format off
23 class PendingComparer;
24 class PriorityComparer;
25 // clang-format on
26
27 // BackgroundTaskBase inner types define
29 public:
30 // member variables
31 // NOLINTBEGIN
32 ::ll::TypedStorage<8, 8, ::BackgroundTaskBase*> mPrev;
33 // NOLINTEND
34 };
35
37
39
40public:
41 // member variables
42 // NOLINTBEGIN
43 ::ll::TypedStorage<1, 1, bool const> mIsAsync;
44 ::ll::TypedStorage<8, 8, ::IBackgroundTaskOwner*> mGroup;
45 ::ll::TypedStorage<8, 8, ::BackgroundTaskBase*> mPrevTask;
46 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::BackgroundTaskBase>> mNextTask;
47 ::ll::TypedStorage<4, 4, int> mPriority;
48 ::ll::TypedStorage<4, 4, ::std::thread::id> mAffinity;
49 ::ll::TypedStorage<4, 4, int const> mBackDownPriorityAmount;
50 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mStartAfterTime;
51 ::ll::TypedStorage<8, 32, ::std::string> mTaskName;
52 ::ll::TypedStorage<1, 1, ::Memory::MemoryCategory> mMemoryCategory;
53 // NOLINTEND
54
55public:
56 [[nodiscard]] bool isOrphaned() const { return mGroup == &gInternalTaskGroup(); }
57
58public:
59 // prevent constructor by default
61
62public:
63 // virtual functions
64 // NOLINTBEGIN
65 virtual ~BackgroundTaskBase();
66
67 virtual void cancel() = 0;
68
69 virtual bool isReady() const = 0;
70
71 virtual ::TaskRunResult run(::ITaskExecutionContext const* executionContext, bool isAsyncContext) = 0;
72 // NOLINTEND
73
74public:
75 // member functions
76 // NOLINTBEGIN
77 MCAPI
78 BackgroundTaskBase(::gsl::not_null<::IBackgroundTaskOwner*> group, ::TaskStartInfo const& startInfo, bool isAsync);
79 // NOLINTEND
80
81public:
82 // static variables
83 // NOLINTBEGIN
84 MCAPI static ::BackgroundTaskBase*& gCurrentTask();
85 // NOLINTEND
86
87public:
88 // constructor thunks
89 // NOLINTBEGIN
90 MCAPI void* $ctor(::gsl::not_null<::IBackgroundTaskOwner*> group, ::TaskStartInfo const& startInfo, bool isAsync);
91 // NOLINTEND
92
93public:
94 // destructor thunk
95 // NOLINTBEGIN
96 MCAPI void $dtor();
97 // NOLINTEND
98
99public:
100 // vftables
101 // NOLINTBEGIN
102 MCNAPI static void** $vftable();
103 // NOLINTEND
104};
Definition BackgroundTaskBase.h:28
Definition BackgroundTaskBase.h:36
Definition BackgroundTaskBase.h:38
Definition BackgroundTaskBase.h:18
static MCAPI void ** $vftable()
Definition IBackgroundTaskOwner.h:17
Definition ITaskExecutionContext.h:5
Definition TaskStartInfo.h:5