aboutsummaryrefslogtreecommitdiff
path: root/src/main/deal_parser.h
diff options
context:
space:
mode:
authorCharlie Blake2017-10-28 13:28:49 +0100
committerGitHub2017-10-28 13:28:49 +0100
commit7b05ae6f24856a207f9d9ab3218f1b5e75343d74 (patch)
tree4c7b3d779f29f5cef8a5eb1803441f1aa20ac0bd /src/main/deal_parser.h
parentMerge pull request #13 from thecharlesblake/docs (diff)
parentAdd RapidJSON to travis (diff)
downloadmetasol-7b05ae6f24856a207f9d9ab3218f1b5e75343d74.tar.gz
metasol-7b05ae6f24856a207f9d9ab3218f1b5e75343d74.zip

Merge pull request #14 from thecharlesblake/simple-black-hole

Simple black hole

Diffstat (limited to 'src/main/deal_parser.h')
-rw-r--r--src/main/deal_parser.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/deal_parser.h b/src/main/deal_parser.h
new file mode 100644
index 0000000..99523f6
--- /dev/null
+++ b/src/main/deal_parser.h
@@ -0,0 +1,27 @@
+//
+// Created by thecharlesblake on 10/21/17.
+//
+
+#ifndef SOLVITAIRE_DEAL_PARSER_H
+#define SOLVITAIRE_DEAL_PARSER_H
+
+#include <vector>
+
+#include <boost/optional.hpp>
+#include <rapidjson/document.h>
+#include <rapidjson/schema.h>
+
+#include "card.h"
+
+class deal_parser {
+public:
+ static void parse(rapidjson::Document&, const std::string);
+private:
+ static const boost::optional<std::string> read_file(const std::string);
+ static void gen_schema_doc(rapidjson::Document&);
+ static bool to_json(rapidjson::Document&, const char*);
+ static bool to_json(rapidjson::Document&, const std::string);
+ static const std::string schema_err_str(const rapidjson::SchemaValidator&);
+};
+
+#endif //SOLVITAIRE_DEAL_PARSER_H