mirror of
https://github.com/wiiu-env/WiiUPluginSystem.git
synced 2024-11-20 01:29:29 +01:00
42 lines
782 B
C
42 lines
782 B
C
|
#pragma once
|
||
|
|
||
|
#ifdef __cplusplus
|
||
|
|
||
|
#include "wups/config.h"
|
||
|
#include <coreinit/debug.h>
|
||
|
|
||
|
class WUPSConfigItem {
|
||
|
protected:
|
||
|
explicit WUPSConfigItem(WUPSConfigItemHandle itemHandle) : mHandle(itemHandle) {
|
||
|
}
|
||
|
|
||
|
public:
|
||
|
virtual ~WUPSConfigItem();
|
||
|
|
||
|
WUPSConfigItem(const WUPSConfigItem &) = delete;
|
||
|
|
||
|
WUPSConfigItem(WUPSConfigItem &&src) noexcept : mHandle(src.mHandle) {
|
||
|
src.mHandle = {};
|
||
|
}
|
||
|
|
||
|
WUPSConfigItem &operator=(WUPSConfigItem &&src) noexcept {
|
||
|
if (this != &src) {
|
||
|
src.mHandle = {};
|
||
|
}
|
||
|
return *this;
|
||
|
}
|
||
|
|
||
|
[[nodiscard]] const WUPSConfigItemHandle &getHandle() const {
|
||
|
return mHandle;
|
||
|
}
|
||
|
|
||
|
void release() {
|
||
|
mHandle = {};
|
||
|
}
|
||
|
|
||
|
private:
|
||
|
WUPSConfigItemHandle mHandle = {};
|
||
|
};
|
||
|
|
||
|
#endif
|