1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#pragma once #include <memory> #include <stdexcept> #include <string> #include <vector> #include "../../compatibility.h" #include "structures.h" namespace whiteout { namespace interfaces { class CascFileSystem; class VirtualPathFileSystem; } // namespace interfaces namespace common { class BinaryReader; } namespace m2 { using common::BinaryReader; /// @bind methods, js_name=M2Parser class Parser { public: Parser(); ~Parser(); Model parse(interfaces::VirtualPathFileSystem& fs, const std::string& filePath); Model parse(interfaces::CascFileSystem& cascFs, std::span<const uint8_t> buffer); bool hasIssues() const; const std::vector<std::string>& getIssues() const; private: class Impl; std::unique_ptr<Impl> pImpl; }; } // namespace m2 } // namespace whiteout