增加List处理功能
This commit is contained in:
@@ -2,19 +2,37 @@
|
||||
|
||||
#include "libNPK.h"
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace NPK
|
||||
{
|
||||
class NPKFileList : public IFileList
|
||||
{
|
||||
public:
|
||||
|
||||
public:
|
||||
virtual bool loadListFromFile(const wchar_t* wszListFile, const char* prefix,
|
||||
bool bNpkBase, bool bNpkName, bool bFileOffset, bool bFileSize, bool bFileCRC,
|
||||
bool bEnableDuplicate) override;
|
||||
virtual bool dumpToLocalFile(const wchar_t* wszListFile,
|
||||
bool bNpkBase, bool bNpkName, bool bFileOffset, bool bFileSize, bool bFileCRC);
|
||||
virtual bool mergeOtherListInto(const IFileList* sourceFileList, bool bEnableDuplicate) override;
|
||||
virtual bool applyToLocalNPKFiles(const wchar_t* wszNPKBase) override;
|
||||
|
||||
virtual int32_t getFileCounts(void) const override;
|
||||
virtual bool getFileItem(int32_t index, FileItemFullInfo* fullInfo) const override;
|
||||
virtual void addFileNode(const FileItemFullInfo& fullInfo) override;
|
||||
virtual void mergeOtherListInto(const IFileList* sourceFileList) override;
|
||||
virtual bool getFileItem(const char* szKeyName, FileItemFullInfo* fileItemFullInfo) const override;
|
||||
|
||||
public:
|
||||
bool addFileNode(const FileItemFullInfo& fullInfo, bool bEnableDuplicate);
|
||||
|
||||
private:
|
||||
void clear();
|
||||
std::wstring getNPKPathNameFromKeyName(const wchar_t* wszNPKBase, const char* keyName);
|
||||
|
||||
private:
|
||||
std::vector<FileItemFullInfo> m_fileList;
|
||||
std::unordered_map<std::string, std::vector<FileItemFullInfo>::size_type> m_hashList;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user