mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-12-02 09:24:16 +01:00
33 lines
964 B
C++
33 lines
964 B
C++
#pragma once
|
|
#include "config/WUPSConfig.h"
|
|
#include "plugin/PluginData.h"
|
|
#include <memory>
|
|
|
|
struct GeneralConfigInformation {
|
|
std::string name;
|
|
std::string author;
|
|
std::string version;
|
|
std::shared_ptr<PluginData> pluginData;
|
|
};
|
|
|
|
class ConfigDisplayItem {
|
|
public:
|
|
ConfigDisplayItem(GeneralConfigInformation &info, std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> config, bool isActive) : mConfig(std::move(config)), mInfo(std::move(info)), mIsActivePlugin(isActive) {
|
|
assert(mConfig);
|
|
}
|
|
[[nodiscard]] const GeneralConfigInformation &getConfigInformation() const {
|
|
return mInfo;
|
|
}
|
|
[[nodiscard]] const WUPSConfigAPIBackend::WUPSConfig &getConfig() const {
|
|
return *mConfig;
|
|
}
|
|
|
|
[[nodiscard]] bool isActivePlugin () const {
|
|
return mIsActivePlugin;
|
|
|
|
}
|
|
private:
|
|
std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> mConfig;
|
|
GeneralConfigInformation mInfo;
|
|
bool mIsActivePlugin;
|
|
}; |