| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <map> |
| 7 |
#include <string> |
| 8 |
#include <string_view> |
| 9 |
#include <vector> |
| 10 |
|
| 11 |
#include "Common/CommonTypes.h" |
| 12 |
|
| 13 |
struct GraphicsModConfig; |
| 14 |
|
| 15 |
class GraphicsModGroupConfig |
| 16 |
{ |
| 17 |
public: |
| 18 |
explicit GraphicsModGroupConfig(std::string game_id); |
| 19 |
~GraphicsModGroupConfig(); |
| 20 |
|
| 21 |
GraphicsModGroupConfig(const GraphicsModGroupConfig&); |
| 22 |
GraphicsModGroupConfig(GraphicsModGroupConfig&&) noexcept; |
| 23 |
|
| 24 |
GraphicsModGroupConfig& operator=(const GraphicsModGroupConfig&); |
| 25 |
GraphicsModGroupConfig& operator=(GraphicsModGroupConfig&&) noexcept; |
| 26 |
|
| 27 |
void Load(); |
| 28 |
void Save() const; |
| 29 |
|
| 30 |
void SetChangeCount(u32 change_count); |
| 31 |
u32 GetChangeCount() const; |
| 32 |
|
| 33 |
const std::vector<GraphicsModConfig>& GetMods() const; |
| 34 |
std::vector<GraphicsModConfig>& GetMods(); |
| 35 |
|
| 36 |
GraphicsModConfig* GetMod(std::string_view absolute_path) const; |
| 37 |
|
| 38 |
const std::string& GetGameID() const; |
| 39 |
|
| 40 |
private: |
| 41 |
std::string GetPath() const; |
| 42 |
std::string m_game_id; |
| 43 |
std::vector<GraphicsModConfig> m_graphics_mods; |
| 44 |
std::map<std::string, GraphicsModConfig*, std::less<>> m_path_to_graphics_mod; |
| 45 |
u32 m_change_count = 0; |
| 46 |
}; |