| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/core/profilestorage.h`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "iprofilestorage.h"cxx . . $ `<file>/src/core/iprofilestorage.h`/ |
| 7 | #include <filesystem> |
| 8 | #include <memory> |
| 9 | #include <optional> |
| 10 | #include <string> |
| 11 | #include <vector> |
| 12 | |
| 13 | class IProfileParsercxx . . $ IProfileParser#; |
| 14 | class IProfileFileParsercxx . . $ IProfileFileParser#; |
| 15 | class IProfileIconCachecxx . . $ IProfileIconCache#; |
| 16 | |
| 17 | class ProfileStoragecxx . . $ ProfileStorage# : public IProfileStoragecxx . . $ IProfileStorage# |
| 18 | { |
| 19 | public: |
| 20 | ProfileStoragecxx . . $ ProfileStorage#ProfileStorage(1b3e9892d7830096).(stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# &&path, |
| 21 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfileParsercxx . . $ IProfileParser#> &&profileParser, |
| 22 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfileFileParsercxx . . $ IProfileFileParser#> &&profileFileParser, |
| 23 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfileIconCachecxx . . $ IProfileIconCache#> &&iconCache) noexcept; |
| 24 | |
| 25 | void initcxx . . $ ProfileStorage#init(6c259bdacab5687).(IProfilecxx . . $ IProfile# const &defaultProfile) override; |
| 26 | |
| 27 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfilecxx . . $ IProfile#>> |
| 28 | profilescxx . . $ ProfileStorage#profiles(61ed034afd0cae0).(IProfilecxx . . $ IProfile# const &baseProfile) override; |
| 29 | bool loadcxx . . $ ProfileStorage#load(65662de94ba945c4).(IProfilecxx . . $ IProfile# &profile) override; |
| 30 | bool savecxx . . $ ProfileStorage#save(65662de94ba945c4).(IProfilecxx . . $ IProfile# &profile) override; |
| 31 | bool loadFromcxx . . $ ProfileStorage#loadFrom(e6dc3a67757fd1b5).(IProfilecxx . . $ IProfile# &profile, |
| 32 | stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# const &path) const override; |
| 33 | bool exportTocxx . . $ ProfileStorage#exportTo(58603e3286cb501).(IProfilecxx . . $ IProfile# const &profile, |
| 34 | stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# const &path) const override; |
| 35 | bool updatecxx . . $ ProfileStorage#update(55d4602e6608d94e).(IProfilecxx . . $ IProfile# const &profile, IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# &newInfo) override; |
| 36 | void removecxx . . $ ProfileStorage#remove(874cae2a8ac0280d).(IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# &info) override; |
| 37 | |
| 38 | private: |
| 39 | void initProfilesDirectorycxx . . $ ProfileStorage#initProfilesDirectory(83f5f38750778ac8).() const; |
| 40 | bool profilesDirectoryExistcxx . . $ ProfileStorage#profilesDirectoryExist(50ce9a9e25b4a850).() const; |
| 41 | |
| 42 | bool loadProfileFromStoragecxx . . $ ProfileStorage#loadProfileFromStorage(156655c70f793ec).(stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# const &path, |
| 43 | IProfilecxx . . $ IProfile# &profile) const; |
| 44 | bool loadProfileFromcxx . . $ ProfileStorage#loadProfileFrom(156655c70f793ec).(stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# const &path, |
| 45 | IProfilecxx . . $ IProfile# &profile) const; |
| 46 | |
| 47 | stdcxx . . $ std/::filesystemcxx . . $ std/filesystem/::pathcxx . . $ std/filesystem/__cxx11/path# const path_cxx . . $ ProfileStorage#path_.; |
| 48 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfileParsercxx . . $ IProfileParser#> profileParser_cxx . . $ ProfileStorage#profileParser_.; |
| 49 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfileFileParsercxx . . $ IProfileFileParser#> profileFileParser_cxx . . $ ProfileStorage#profileFileParser_.; |
| 50 | stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IProfileIconCachecxx . . $ IProfileIconCache#> iconCache_cxx . . $ ProfileStorage#iconCache_.; |
| 51 | stdcxx . . $ std/::stringcxx . . $ std/string# fileExtension_cxx . . $ ProfileStorage#fileExtension_.; |
| 52 | stdcxx . . $ std/::stringcxx . . $ std/string# profileDataFileName_cxx . . $ ProfileStorage#profileDataFileName_.; |
| 53 | }; |