DatFile.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. // Created by Иван_Архипов on 31.10.2017.
  3. //
  4. #ifndef LOTRO_DAT_PATCHER_DATFILE_H
  5. #define LOTRO_DAT_PATCHER_DATFILE_H
  6. #ifdef LOTRO_DAT_EXPORTS
  7. #define LOTRO_DAT_API __declspec(dllexport)
  8. #else
  9. #define LOTRO_DAT_API __declspec(dllimport)
  10. #endif
  11. #include <bits/unique_ptr.h>
  12. #include "DatSubsystems/DatBackupManager.h"
  13. #include "DatSubsystems/DatExporter.h"
  14. #include "DatSubsystems/DatFileSystem.h"
  15. #include "DatSubsystems/DatIO.h"
  16. #include "DatSubsystems/DatLocaleManager.h"
  17. #include "DatSubsystems/DatPatcher.h"
  18. // Dat file names definitions
  19. extern "C++"
  20. {
  21. namespace LOTRO_DAT {
  22. enum FILE_TYPE : int {
  23. TEXT,
  24. JPG,
  25. DDS,
  26. WAV,
  27. OGG,
  28. FONT,
  29. UNKNOWN
  30. };
  31. class DatFile {
  32. friend class DatIO;
  33. friend class DatFileSystem;
  34. friend class DatLocaleManager;
  35. friend class DatPatcher;
  36. friend class DatExporter;
  37. friend class DatBackupManager;
  38. public:
  39. DatFile();
  40. DatFile(const DatFile &other) = delete;
  41. DatFile(DatFile &&other) = default;
  42. DatFile &operator=(const DatFile &other) = delete;
  43. DatFile &operator=(DatFile &&other) = default;
  44. DatLocaleManager &getLocaleManager();
  45. DatExporter &getExporter();
  46. DatPatcher &getPatcher();
  47. DatBackupManager &getBackupManager();
  48. DatIO &getIO();
  49. DatFileSystem &getFileSystem();
  50. private:
  51. std::unique_ptr<DatIO> io_;
  52. std::unique_ptr<DatFileSystem> fileSystem_;
  53. std::unique_ptr<DatLocaleManager> localeManager_;
  54. std::unique_ptr<DatPatcher> patcher_;
  55. std::unique_ptr<DatExporter> exporter_;
  56. std::unique_ptr<DatBackupManager> backupManager_;
  57. };
  58. }
  59. }
  60. #endif //LOTRO_DAT_PATCHER_DATFILE_H