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