diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-05-28 23:42:53 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-28 23:42:53 -0400 |
| commit | da35955d6c15c4abc83ae8c0a4ea8195c0c0ac85 (patch) | |
| tree | beab5513b64e93c32d50f628321654623b603129 /src/modinfowithconflictinfo.h | |
| parent | 652d3ab054cd2bd94fe88dc42aa39798fc3b2c4a (diff) | |
| parent | 0a5790b333883c7c4ef07bb44f0a411ce8ba79b5 (diff) | |
Merge pull request #1092 from Holt59/mod-data-content
Use ModDataContent feature from GamePlugin
Diffstat (limited to 'src/modinfowithconflictinfo.h')
| -rw-r--r-- | src/modinfowithconflictinfo.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/modinfowithconflictinfo.h b/src/modinfowithconflictinfo.h index abc9f223..7109b83d 100644 --- a/src/modinfowithconflictinfo.h +++ b/src/modinfowithconflictinfo.h @@ -6,6 +6,7 @@ #include "thread_utils.h" #include "modinfo.h" +#include <set> #include <QTime> class ModInfoWithConflictInfo : public ModInfo @@ -24,7 +25,16 @@ public: /** * @return a list of content types contained in a mod */ - virtual std::vector<EContent> getContents() const override; + virtual const std::set<int>& getContents() const override; + + /** + * @brief Test if the mod contains the specified content. + * + * @param content ID of the content to test. + * + * @return true if the content is there, false otherwise. + */ + virtual bool hasContent(int content) const override; /** * @brief clear all caches held for this mod @@ -66,7 +76,7 @@ protected: * * @return the contents for this mod. **/ - virtual std::vector<EContent> doGetContents() const { return {}; } + virtual std::set<int> doGetContents() const { return {}; } /** * @brief Retrieve a file tree corresponding to the underlying disk content @@ -137,7 +147,7 @@ private: MOShared::MemoizedLocked<std::shared_ptr<const MOBase::IFileTree>> m_FileTree; MOShared::MemoizedLocked<bool> m_Valid; - MOShared::MemoizedLocked<std::vector<EContent>> m_Contents; + MOShared::MemoizedLocked<std::set<int>> m_Contents; MOShared::DirectoryEntry **m_DirectoryStructure; |
