mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2025-01-09 11:09:22 +01:00
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
#include "WUPSConfigCategory.h"
|
|
#include "WUPSConfigItem.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace WUPSConfigAPIBackend {
|
|
|
|
WUPSConfigCategory::WUPSConfigCategory(const std::string_view name) : mName(name) {
|
|
}
|
|
|
|
WUPSConfigCategory::~WUPSConfigCategory() = default;
|
|
|
|
const std::string &WUPSConfigCategory::getName() const {
|
|
return mName;
|
|
}
|
|
|
|
bool WUPSConfigCategory::addItem(std::unique_ptr<WUPSConfigItem> &item) {
|
|
if (item != nullptr) {
|
|
mItems.push_back(std::move(item));
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
const std::vector<std::unique_ptr<WUPSConfigItem>> &WUPSConfigCategory::getItems() const {
|
|
return mItems;
|
|
}
|
|
|
|
const std::vector<std::unique_ptr<WUPSConfigCategory>> &WUPSConfigCategory::getCategories() const {
|
|
return mCategories;
|
|
}
|
|
|
|
bool WUPSConfigCategory::addCategory(std::unique_ptr<WUPSConfigCategory> &category) {
|
|
mCategories.push_back(std::move(category));
|
|
return true;
|
|
}
|
|
|
|
} // namespace WUPSConfigAPIBackend
|