diff options
| author | thecharlesblake | 2017-10-24 01:23:00 +0100 |
|---|---|---|
| committer | thecharlesblake | 2017-10-26 14:51:33 +0100 |
| commit | c5e5d9d6bbd7d7d2a6c6463505e7b7031e846ebf (patch) | |
| tree | 09bfac6f5499620317602cd8e8ab3c2933677a50 /src/main/io_utils.h | |
| parent | Add deal file parsing and verifying (diff) | |
| download | metasol-c5e5d9d6bbd7d7d2a6c6463505e7b7031e846ebf.tar.gz metasol-c5e5d9d6bbd7d7d2a6c6463505e7b7031e846ebf.zip | |
Draft of OO game logic
Diffstat (limited to 'src/main/io_utils.h')
| -rw-r--r-- | src/main/io_utils.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/io_utils.h b/src/main/io_utils.h new file mode 100644 index 0000000..659a0c4 --- /dev/null +++ b/src/main/io_utils.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 io_utils { +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 |
