Debian Codegraph @

yo/coroutines/demo/fsa_awaiter/digit/digit.h

raw
1 #ifndef INCLUDED_DIGIT_
2 #define INCLUDED_DIGIT_
3
4 #include "../../promisebase/promisebase.h"
5
6 class Digit
7 {
8 struct State: public PromiseBase<Digit, State>
9 {};
10
11 std::coroutine_handle<State> d_handle;
12
13 public:
14 using promise_type = State;
15 using Handle = std::coroutine_handle<State>;
16
17 explicit Digit(Handle handle);
18 ~Digit();
19
20 Handle handle() const;
21 };
22
23 inline Digit::Handle Digit::handle() const
24 {
25 return d_handle;
26 }
27
28
29 extern Digit g_digit;
30
31 #endif