WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
WoWFolder.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include "CASCFolder.h"
5#include "GameFile.h"
6#include "GameFolder.h"
7
8namespace wow
9{
15 {
16 public:
17 WoWFolder(const std::string& path);
18
19 virtual ~WoWFolder()
20 {
21 }
22
23 void init() override;
24 void initFromListfile(const std::string& file) override;
25 void addCustomFiles(const std::string& path, bool bypassOriginalFiles) override;
26
27 GameFile* getFile(int id) override;
28
29 bool openFile(int id, HANDLE* result) override;
30 bool openFile(std::string file, HANDLE* result) override;
31
32 std::string version() override;
33 int majorVersion() override;
34 std::string locale() override;
35 bool setConfig(core::GameConfig config) override;
36 std::vector<core::GameConfig> configsFound() override;
37
38 int lastError() override;
39
40 void onChildAdded(GameFile*) override;
41 void onChildRemoved(GameFile*) override;
42 std::string fileName(int id);
43 int fileID(const std::string& fileName);
44
45 private:
47 std::map<int, GameFile*> m_idMap;
48 std::map<int, std::string> m_idNameMap;
49 std::map<std::string, int> m_nameIdMap;
50 };
51}
Manages a CASC (Content Addressable Storage Container) archive.
Definition CASCFolder.h:24
Abstract base class representing a file within the game data archive.
Definition GameFile.h:12
Describes a detected game installation (locale, version, product).
Definition GameFolder.h:16
Abstract base for game data folder backends (CASC, loose files, etc.).
Definition GameFolder.h:28
const std::string & path() const
Definition GameFolder.h:64
GameFolder implementation backed by a CASC archive.
Definition WoWFolder.h:15
GameFile * getFile(int id) override
CASCFolder m_CASCFolder
Definition WoWFolder.h:46
std::map< int, std::string > m_idNameMap
Definition WoWFolder.h:48
std::string fileName(int id)
int lastError() override
int majorVersion() override
void initFromListfile(const std::string &file) override
Definition WoWFolder.cpp:21
std::map< int, GameFile * > m_idMap
Definition WoWFolder.h:47
int fileID(const std::string &fileName)
void init() override
Definition WoWFolder.cpp:16
void onChildAdded(GameFile *) override
void onChildRemoved(GameFile *) override
std::vector< core::GameConfig > configsFound() override
std::map< std::string, int > m_nameIdMap
Definition WoWFolder.h:49
virtual ~WoWFolder()
Definition WoWFolder.h:19
bool openFile(int id, HANDLE *result) override
void addCustomFiles(const std::string &path, bool bypassOriginalFiles) override
Definition WoWFolder.cpp:64
bool setConfig(core::GameConfig config) override
std::string version() override
std::string locale() override