You've already forked pico-launcher
mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-01-09 16:28:48 -08:00
20 lines
565 B
C++
20 lines
565 B
C++
#pragma once
|
|
#include "IAppSettingsService.h"
|
|
#include "JsonAppSettingsSerializer.h"
|
|
|
|
class JsonAppSettingsService : public IAppSettingsService
|
|
{
|
|
JsonAppSettingsSerializer _serializer;
|
|
AppSettings _appSettings;
|
|
const char* _filePath;
|
|
public:
|
|
explicit JsonAppSettingsService(const char* filePath);
|
|
|
|
AppSettings& GetAppSettings() override { return _appSettings; }
|
|
const AppSettings& GetAppSettings() const override { return _appSettings; }
|
|
|
|
void Save() const override
|
|
{
|
|
_serializer.Serialize(&_appSettings, _filePath);
|
|
}
|
|
}; |