Debian Codegraph @

yo/coroutines/demo/fsa_opcoawait/digit/digit.h

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