diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-11-04 11:46:24 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-11-04 11:46:24 -0500 |
commit | 8375f92802d3aa7667bfc6f22f6d2a72361c9808 (patch) | |
tree | bb706d3493d1ed7043387a3cb9e6a4d1897acba4 /wizard.h | |
parent | 460b99583bcf6da4462f13ad75856283849904e7 (diff) | |
download | wizard-8375f92802d3aa7667bfc6f22f6d2a72361c9808.tar.gz wizard-8375f92802d3aa7667bfc6f22f6d2a72361c9808.tar.bz2 wizard-8375f92802d3aa7667bfc6f22f6d2a72361c9808.zip |
Websockets server!
Diffstat (limited to 'wizard.h')
-rw-r--r-- | wizard.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/wizard.h b/wizard.h index a02197b..8269852 100644 --- a/wizard.h +++ b/wizard.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <Magick++.h> | 4 | #include <Magick++.h> |
5 | 5 | ||
6 | #include <functional> | ||
6 | #include <random> | 7 | #include <random> |
7 | #include <string> | 8 | #include <string> |
8 | 9 | ||
@@ -11,9 +12,13 @@ | |||
11 | 12 | ||
12 | class wizard { | 13 | class wizard { |
13 | public: | 14 | public: |
15 | using status_callback_type = std::function<void(const std::string& status)>; | ||
16 | |||
14 | wizard(const cardset& cards, const imagestore& images, std::string text, | 17 | wizard(const cardset& cards, const imagestore& images, std::string text, |
15 | std::mt19937& rng); | 18 | std::mt19937& rng); |
16 | 19 | ||
20 | void set_status_callback(status_callback_type callback); | ||
21 | |||
17 | Magick::Image run(); | 22 | Magick::Image run(); |
18 | 23 | ||
19 | private: | 24 | private: |
@@ -22,6 +27,8 @@ class wizard { | |||
22 | std::string text_; | 27 | std::string text_; |
23 | 28 | ||
24 | std::mt19937 rng_; | 29 | std::mt19937 rng_; |
30 | |||
31 | status_callback_type status_callback_; | ||
25 | }; | 32 | }; |
26 | 33 | ||
27 | #endif /* end of include guard: WIZARD_H_1014B13E */ | 34 | #endif /* end of include guard: WIZARD_H_1014B13E */ |