LCOV - code coverage report
Current view: top level - src/presets - i_preset_manager.h (source / functions) Coverage Total Hit
Test: merged.info Lines: 100.0 % 2 2
Test Date: 2026-06-07 15:51:50 Functions: 50.0 % 2 1

            Line data    Source code
       1              : #pragma once
       2              : 
       3              : #include <string>
       4              : #include <vector>
       5              : 
       6              : namespace Amplitron {
       7              : 
       8              : class IAudioEngine;
       9              : class IMidiManager;
      10              : struct PresetData;
      11              : struct MidiMapping;
      12              : 
      13              : /**
      14              :  * @brief Abstract interface for the Preset Manager.
      15              :  * Satisfies the Dependency Inversion Principle (DIP).
      16              :  */
      17          126 : class IPresetManager {
      18              :    public:
      19          378 :     virtual ~IPresetManager() = default;
      20              : 
      21              :     virtual bool save_preset_data(const std::string& filepath, const PresetData& preset) = 0;
      22              :     virtual bool save_preset(const std::string& filepath, const std::string& preset_name,
      23              :                              const std::string& description, IAudioEngine& engine,
      24              :                              const std::vector<MidiMapping>& midi_mappings = {}) = 0;
      25              :     virtual bool load_preset(const std::string& filepath, IAudioEngine& engine,
      26              :                              IMidiManager* midi_manager = nullptr) = 0;
      27              :     virtual std::vector<std::string> list_presets() = 0;
      28              :     virtual bool delete_preset(const std::string& filepath) = 0;
      29              :     virtual std::string get_last_error() const = 0;
      30              :     virtual std::string get_presets_directory() const = 0;
      31              : };
      32              : 
      33              : }  // namespace Amplitron
        

Generated by: LCOV version 2.0-1