#ifndef MODINFOWITHCONFLICTINFO_H #define MODINFOWITHCONFLICTINFO_H #include "modinfo.h" #include class ModInfoWithConflictInfo : public ModInfo { public: ModInfoWithConflictInfo(PluginContainer *pluginContainer, MOShared::DirectoryEntry **directoryStructure); std::vector getFlags() const; /** * @brief clear all caches held for this mod */ virtual void clearCaches(); virtual std::set getModOverwrite() { return m_OverwriteList; } virtual std::set getModOverwritten() { return m_OverwrittenList; } virtual std::set getModArchiveOverwrite() { return m_ArchiveOverwriteList; } virtual std::set getModArchiveOverwritten() { return m_ArchiveOverwrittenList; } virtual std::set getModArchiveLooseOverwrite() { return m_ArchiveLooseOverwriteList; } virtual std::set getModArchiveLooseOverwritten() { return m_ArchiveLooseOverwrittenList; } virtual void doConflictCheck() const; private: enum EConflictType { CONFLICT_NONE, CONFLICT_OVERWRITE, CONFLICT_OVERWRITTEN, CONFLICT_MIXED, CONFLICT_REDUNDANT, CONFLICT_CROSS }; private: /** * @return true if there is a conflict for files in this mod */ EConflictType isConflicted() const; /** * @return true if there are archive conflicts for files in this mod */ EConflictType isArchiveConflicted() const; /** * @return true if there are archive conflicts with loose files in this mod */ EConflictType isLooseArchiveConflicted() const; /** * @return true if this mod is completely replaced by others */ bool isRedundant() const; private: MOShared::DirectoryEntry **m_DirectoryStructure; mutable EConflictType m_CurrentConflictState; mutable EConflictType m_ArchiveConflictState; mutable EConflictType m_ArchiveConflictLooseState; mutable bool m_HasLooseOverwrite; mutable QTime m_LastConflictCheck; mutable std::set m_OverwriteList; // indices of mods overritten by this mod mutable std::set m_OverwrittenList; // indices of mods overwriting this mod mutable std::set m_ArchiveOverwriteList; // indices of mods with archive files overritten by this mod mutable std::set m_ArchiveOverwrittenList; // indices of mods with archive files overwriting this mod mutable std::set m_ArchiveLooseOverwriteList; // indices of mods with archives being overwritten by this mod's loose files mutable std::set m_ArchiveLooseOverwrittenList; // indices of mods with loose files overwriting this mod's archive files }; #endif // MODINFOWITHCONFLICTINFO_H