LeviLamina
Loading...
Searching...
No Matches
AsyncCommandExecutor.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/ErrorInfo.h"
8#include "mc/platform/Result.h"
9#include "mc/platform/threading/Mutex.h"
10
11// auto generated forward declare list
12// clang-format off
13class TaskGroup;
14// clang-format on
15
17public:
18 // AsyncCommandExecutor inner types declare
19 // clang-format off
20 struct OperationData;
21 // clang-format on
22
23 // AsyncCommandExecutor inner types define
24 enum class State : int {
25 Idle = 0,
26 InProgress = 1,
27 };
28
30 public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<8, 80, ::std::optional<::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>>>
34 mResult;
35 // NOLINTEND
36 };
37
38 using ExternalOperationCallback = ::std::function<void(::std::shared_ptr<::AsyncCommandExecutor::OperationData>)>;
39
40 using Operation = ::std::function<::Bedrock::Result<void>()>;
41
42 using Result = ::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>;
43
44 using ResultOperationCallback =
45 ::std::function<void(::nonstd::expected<void, ::Bedrock::ErrorInfo<::std::error_code>>&)>;
46
47public:
48 // member variables
49 // NOLINTBEGIN
50 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mStateLock;
51 ::ll::TypedStorage<4, 4, ::AsyncCommandExecutor::State> mCurrentState;
52 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mAsyncTaskGroup;
53 // NOLINTEND
54
55public:
56 // virtual functions
57 // NOLINTBEGIN
58 virtual ~AsyncCommandExecutor() /*override*/ = default;
59 // NOLINTEND
60};
Definition AsyncCommandExecutor.h:16
Definition EnableNonOwnerReferences.h:7
Definition TaskGroup.h:57
Definition AsyncCommandExecutor.h:29
Definition ErrorInfo.h:9