Debian Codegraph @

yo/coroutines/demo/fsa_opcoawait/letter/letter.h

raw symbols SCIP
1 #ifndef INCLUDED_LETTER_
2 #define INCLUDED_LETTER_
3
4 #include "../../promisebase/promisebase.h"
5 #include "../awaitable/awaitable.h"
6
7 class Letter
8 {
9 struct State: public PromiseBase<Letter, 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 Letter(Handle handle);
19 ~Letter();
20
21 Handle handle() const;
22
23 char const *name() const;
24 };
25
26 inline Letter::Handle Letter::handle() const
27 {
28 return d_handle;
29 }
30
31 inline char const *Letter::name() const
32 {
33 return "Letter";
34 }
35
36 extern Letter g_letter;
37
38 #endif