summary refs log tree commit diff stats
path: root/sap.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-01-18 16:49:54 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2018-01-18 16:49:54 -0500
commitda3bc860f66d34f233028e819beee32dd1c43dd8 (patch)
tree8cc7f5ad0a8dad69ea5c3ae0405f803d3ba80051 /sap.h
parent46db0368fbee4cfba97178837e62f4469c4fa884 (diff)
downloadsap-da3bc860f66d34f233028e819beee32dd1c43dd8.tar.gz
sap-da3bc860f66d34f233028e819beee32dd1c43dd8.tar.bz2
sap-da3bc860f66d34f233028e819beee32dd1c43dd8.zip
Modernized project
This rewrite brings the codebase of this project more in line with the format of the other bots, including things like C++ randomization, better abstraction, use of exceptions, etc. Notably, any FFMPEG objects that get allocated are wrapped in simple objects so that they get properly destroyed if an exception is thrown. Some more error detection and cleanliness stuff can probably be done but my wrists really hurt.

Also updated librawr, and thus also removed the yaml-cpp submodule.
Diffstat (limited to 'sap.h')
-rw-r--r--sap.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/sap.h b/sap.h new file mode 100644 index 0000000..5288e57 --- /dev/null +++ b/sap.h
@@ -0,0 +1,34 @@
1#ifndef SAP_H_11D8D668
2#define SAP_H_11D8D668
3
4#include <random>
5#include <string>
6#include <memory>
7#include <Magick++.h>
8#include <twitter.h>
9#include <rawr.h>
10#include "designer.h"
11#include "director.h"
12
13class sap {
14public:
15
16 sap(
17 std::string configFile,
18 std::mt19937& rng);
19
20 void run() const;
21
22private:
23
24 void sendTweet(Magick::Image image) const;
25
26 std::mt19937& rng_;
27 std::unique_ptr<twitter::client> client_;
28 rawr kgramstats_;
29 std::unique_ptr<designer> layout_;
30 std::unique_ptr<director> director_;
31
32};
33
34#endif /* end of include guard: SAP_H_11D8D668 */