Line data Source code
1 : #pragma once
2 :
3 : #include <string>
4 : #include <vector>
5 :
6 : namespace Amplitron {
7 :
8 : /**
9 : * @brief Interface for preset persistence storage.
10 : * Satisfies Single Responsibility Principle (SRP) and Dependency Inversion Principle (DIP).
11 : */
12 126 : class IPresetStorage {
13 : public:
14 378 : virtual ~IPresetStorage() = default;
15 : virtual bool save(const std::string& filepath, const std::string& data) = 0;
16 : virtual std::string load(const std::string& filepath) = 0;
17 : virtual std::vector<std::string> list() = 0;
18 : virtual bool remove(const std::string& filepath) = 0;
19 : };
20 :
21 : } // namespace Amplitron
|