diff options
| author | Thomas Tanner <trtanner@btinternet.com> | 2015-10-15 13:34:01 +0100 |
|---|---|---|
| committer | Thomas Tanner <trtanner@btinternet.com> | 2015-10-15 13:34:01 +0100 |
| commit | 9d88ca13b9b6a193dfb17a1ee3ea5e5cbed8a7e9 (patch) | |
| tree | 8ec975d9efa7b4376573a1f3a05e0063e711e364 /src/modinfowithconflictinfo.h | |
| parent | ec07d3d4d9ec2245f0b23edf6746f4ae1e5dfce4 (diff) | |
Added functionality to use the web page link in a fomod to supply an optional web page.
Also refactored modinfo into multiple files (as the actual types are opaque anyway) and cleaned up the headers a bit
I also changed 'visit on nexus' from the menu not to open the downloads tab because it was a little confusing
Diffstat (limited to 'src/modinfowithconflictinfo.h')
| -rw-r--r-- | src/modinfowithconflictinfo.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/modinfowithconflictinfo.h b/src/modinfowithconflictinfo.h new file mode 100644 index 00000000..be31f20f --- /dev/null +++ b/src/modinfowithconflictinfo.h @@ -0,0 +1,64 @@ +#ifndef MODINFOWITHCONFLICTINFO_H +#define MODINFOWITHCONFLICTINFO_H + +#include "modinfo.h" + +#include <QTime> + +class ModInfoWithConflictInfo : public ModInfo +{ + +public: + + ModInfoWithConflictInfo(MOShared::DirectoryEntry **directoryStructure); + + std::vector<ModInfo::EFlag> getFlags() const; + + /** + * @brief clear all caches held for this mod + */ + virtual void clearCaches(); + + virtual std::set<unsigned int> getModOverwrite() { return m_OverwriteList; } + + virtual std::set<unsigned int> getModOverwritten() { return m_OverwrittenList; } + + virtual void doConflictCheck() const; + +private: + + enum EConflictType { + CONFLICT_NONE, + CONFLICT_OVERWRITE, + CONFLICT_OVERWRITTEN, + CONFLICT_MIXED, + CONFLICT_REDUNDANT + }; + +private: + + /** + * @return true if there is a conflict for files in this mod + */ + EConflictType isConflicted() const; + + /** + * @return true if this mod is completely replaced by others + */ + bool isRedundant() const; + +private: + + MOShared::DirectoryEntry **m_DirectoryStructure; + + mutable EConflictType m_CurrentConflictState; + mutable QTime m_LastConflictCheck; + + mutable std::set<unsigned int> m_OverwriteList; // indices of mods overritten by this mod + mutable std::set<unsigned int> m_OverwrittenList; // indices of mods overwriting this mod + +}; + + + +#endif // MODINFOWITHCONFLICTINFO_H |
