Subfile.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. // Created by Иван_Архипов on 01.11.2017.
  3. //
  4. #ifndef LOTRO_DAT_PATCHER_SUBFILE_H
  5. #define LOTRO_DAT_PATCHER_SUBFILE_H
  6. #include <string>
  7. extern "C++"
  8. {
  9. namespace LOTRO_DAT
  10. {
  11. class DatFile;
  12. class BinaryData;
  13. class Database;
  14. enum FILE_TYPE : int;
  15. class Subfile
  16. {
  17. public:
  18. Subfile();
  19. Subfile::Subfile(DatFile *dat, long long fragments_count, long long unknown1, long long file_id, long long file_offset,
  20. long long file_size, long long timestamp, long long version, long long block_size);
  21. virtual FILE_TYPE FileType() const;
  22. virtual std::string Extension() const;
  23. virtual bool PrepareAsBinary(BinaryData &data);
  24. virtual bool PrepareAsText(std::string &text, std::string &args, std::string &args_order);
  25. virtual BinaryData MakeFromBinary(const BinaryData &data);
  26. virtual BinaryData MakeFromText(const std::string &text, const std::string &args, const std::string &args_order);
  27. long long fragments_count() const;
  28. long long unknown1() const;
  29. long long file_id() const;
  30. long long file_offset() const;
  31. long long file_size() const;
  32. long long timestamp() const;
  33. long long version() const;
  34. long long block_size() const;
  35. protected:
  36. long long fragments_count_;
  37. long long unknown1_;
  38. long long file_id_;
  39. long long file_offset_;
  40. long long file_size_;
  41. long long timestamp_;
  42. long long version_;
  43. long long block_size_;
  44. DatFile *dat_;
  45. };
  46. }
  47. };
  48. #endif //LOTRO_DAT_PATCHER_SUBFILE_H