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:
parent
3e2cfb3b37
commit
50f33300be
10 changed files with 350 additions and 47 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue