diff options
| author | Mikaƫl Capelle <capelle.mikael@gmail.com> | 2024-06-09 12:18:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-09 12:18:17 +0200 |
| commit | 88c386d74d7d94ec16d4d84ed674eb51e31647ac (patch) | |
| tree | adf0b2537f12d11d8df77f68a84926d15b063554 /src/gamefeaturesproxy.h | |
| parent | c43535f5bcf1043c3b9c00c77967267cf1acf60f (diff) | |
Refactoring of game features for better management. (#2043)
Diffstat (limited to 'src/gamefeaturesproxy.h')
| -rw-r--r-- | src/gamefeaturesproxy.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/gamefeaturesproxy.h b/src/gamefeaturesproxy.h new file mode 100644 index 00000000..9ffd6b04 --- /dev/null +++ b/src/gamefeaturesproxy.h @@ -0,0 +1,34 @@ +#ifndef GAMEFEATURESPROXY_H +#define GAMEFEATURESPROXY_H + +#include "igamefeatures.h" + +class GameFeatures; +class OrganizerProxy; + +class GameFeaturesProxy : public MOBase::IGameFeatures +{ +public: + GameFeaturesProxy(OrganizerProxy* coreProxy, GameFeatures& gameFeatures); + + bool registerFeature(QStringList const& games, + std::shared_ptr<MOBase::GameFeature> feature, int priority, + bool replace) override; + bool registerFeature(MOBase::IPluginGame* game, + std::shared_ptr<MOBase::GameFeature> feature, int priority, + bool replace) override; + bool registerFeature(std::shared_ptr<MOBase::GameFeature> feature, int priority, + bool replace) override; + bool unregisterFeature(std::shared_ptr<MOBase::GameFeature> feature) override; + +protected: + std::shared_ptr<MOBase::GameFeature> + gameFeatureImpl(std::type_info const& info) const override; + int unregisterFeaturesImpl(std::type_info const& info) override; + +private: + GameFeatures& m_Features; + OrganizerProxy& m_CoreProxy; +}; + +#endif |
