Refactor higher level code into TorrentRead class

This also addresses the issue with paths of more than 1 item
so all torrents should now work and adds some error reporting
through exceptions
This commit is contained in:
King_DuckZ 2025-04-07 01:01:52 +01:00
commit 50f33300be
10 changed files with 350 additions and 47 deletions

View file

@ -23,11 +23,18 @@
#include <vector>
#include <array>
#include <cstdint>
#include <stdexcept>
namespace duck {
typedef std::string_view TorrentStringType;
typedef signed long long int TorrentIntType;
class ParseError : public std::runtime_error {
public:
ParseError (const std::string& desc);
~ParseError() noexcept = default;
};
struct TorrentValue : public boost::spirit::x3::variant<
TorrentIntType,
TorrentStringType,