123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- //
- // Created by Иван_Архипов on 01.11.2017.
- //
- #ifndef LOTRO_DAT_PATCHER_SUBFILE_H
- #define LOTRO_DAT_PATCHER_SUBFILE_H
- #include <string>
- #include <vector>
- #include "yaml-cpp/yaml.h"
- extern "C++"
- {
- namespace LOTRO_DAT
- {
- class DatFile;
- class BinaryData;
- class Database;
- class SubfileData;
- enum FILE_TYPE : int;
- class SubFile
- {
- friend class DatFile;
- friend class SubDirectory;
- public:
- SubFile() = delete;
- explicit SubFile(const SubFile &other) = delete;
- SubFile &operator =(const SubFile &other);
- SubFile(DatFile &dat, const BinaryData &header);
- SubFile(DatFile &dat, long long dictionary_offset, long long fragments_count, long long unknown1,
- long long file_id, long long file_offset, long long file_size, long long timestamp, long long version,
- long long block_size);
- virtual ~SubFile() = default;
- virtual FILE_TYPE FileType() const;
- virtual std::string Extension() const;
- virtual SubfileData PrepareForExport(const BinaryData &file_data);
- virtual BinaryData MakeForImport(const BinaryData &old_data, const SubfileData &data);
- BinaryData MakeHeaderData() const;
- long long dictionary_offset() const;
- long long unknown1() const;
- long long file_id() const;
- long long file_offset() const;
- long long file_size() const;
- long long timestamp() const;
- long long version() const;
- long long block_size() const;
- long long unknown2() const;
- bool operator ==(const SubFile &b) const;
- bool operator !=(const SubFile &b) const;
- long long category;
- protected:
- DatFile &dat_;
- long long dictionary_offset_;
- long long unknown1_;
- long long file_id_;
- long long file_offset_;
- long long file_size_;
- long long timestamp_;
- long long version_;
- long long block_size_;
- long long unknown2_;
- };
- }
- };
- #endif //LOTRO_DAT_PATCHER_SUBFILE_H
|