11 #include "RNPlatform/Inc/MemoryTracking.h"
12 #ifndef _PATCHINDEXMANAGER_H_
13 #define _PATCHINDEXMANAGER_H_
16 #include "RNLobby/Inc/ScanPath.h"
18 namespace RNReplicaNet
21 class DynamicMessageHelper;
33 bool operator() (
const std::string& a,
const std::string& b)
const;
41 VersionInfo() : mUniqueID(0) , mProductVersion(0) , mIsPatch(
false) , mNewThisIteration(
false) , mDataFileSize(0)
48 unsigned int mUniqueID;
49 unsigned int mProductVersion;
51 bool mNewThisIteration;
52 unsigned int mDataFileSize;
58 void Dump(
void)
const;
67 mHasBeenHandled =
false;
69 unsigned int mNumMaxVersions;
71 std::list<VersionInfo> mVersions;
76 bool ReadIndex(
const char *filename);
77 bool WriteIndex(
const char *filename,
const bool minimalInfo =
false);
78 void Dump(
void)
const;
80 void AddEntryInfo(std::string filename,
const EntryInfo &entryInfo);
81 EntryInfo *GetEntryInfo(std::string filename);
83 unsigned int GetUniqueID(
void);
85 void RemoveUnhandled(
void);
86 void ClearNewThisIteration(
void);
88 void SetProductVersion(
unsigned int productVersion)
90 mProductVersion = productVersion;
93 unsigned int GetProductVersion(
void)
95 return mProductVersion;
98 unsigned int GetNumEntries(
void)
100 return (
int)mIndex.size();
103 void BeginIterate(
void);
105 EntryInfo *Iterate(std::string &index);
107 static unsigned int GetVersion(
void);
117 std::string mTimeStamp;
120 void ClearModified(
void);
121 bool ReadModified(
const char *filename);
122 bool WriteModified(
const char *filename);
123 bool GetIsModified(
const char *filename);
126 unsigned int mProductVersion;
127 unsigned int mLastUniqueID;
129 std::map<std::string,EntryInfo,ltLowerStr> mIndex;
130 std::map<std::string,EntryInfo,ltLowerStr>::iterator mSt;
132 std::map<std::string,ModifiedInfo,ltLowerStr> mModified;
Definition: PatchIndexManager.h:62
Handles loading and saving of patch index files with various access methods.
Definition: PatchIndexManager.h:27
Definition: ScanPath.h:32
Definition: PatchIndexManager.h:110
Definition: PatchIndexManager.h:39
Definition: PatchIndexManager.h:31
Definition: MessageHelper.h:211