Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
factory_program_table.hpp
Go to the documentation of this file.
1#pragma once
2
15
17#include <pulp/state/store.hpp>
18
19#include <cstddef>
20#include <filesystem>
21#include <span>
22#include <string>
23#include <vector>
24
25namespace pulp::format {
26
34std::filesystem::path factory_presets_dir_for_module(const std::filesystem::path& module);
35
38std::filesystem::path loaded_module_factory_presets_dir();
39
41 public:
48 void build(state::StateStore& store, const std::string& manufacturer,
49 const std::string& plugin_name, const std::filesystem::path& dir = {});
50
52 std::size_t size() const noexcept {
53 return programs_.size();
54 }
55
57 const std::string& name_at(std::size_t index) const noexcept;
58
62 std::span<const state::ParamSetting> values_at(std::size_t index) const noexcept;
63
64 private:
65 struct Program {
66 std::string name;
67 std::vector<state::ParamSetting> values;
68 };
69 std::vector<Program> programs_;
70};
71
72} // namespace pulp::format
Definition factory_program_table.hpp:40
std::span< const state::ParamSetting > values_at(std::size_t index) const noexcept
The parameter values program index sets, or an empty span when out of range.
const std::string & name_at(std::size_t index) const noexcept
UTF-8 name of program index, or empty when out of range.
void build(state::StateStore &store, const std::string &manufacturer, const std::string &plugin_name, const std::filesystem::path &dir={})
Scan dir (or the loaded module's bundle folder when dir is empty) and cache every readable preset's p...
std::size_t size() const noexcept
Number of programs the host can select.
Definition factory_program_table.hpp:52
Centralized parameter storage with lock-free value access.
Definition store.hpp:164
What the product grants a device: the quota table indexed by capability tier and live thermal state.
Definition aax_editor.hpp:31
std::filesystem::path factory_presets_dir_for_module(const std::filesystem::path &module)
Map a plug-in module's path to the folder holding its factory presets.
std::filesystem::path loaded_module_factory_presets_dir()
factory_presets_dir_for_module applied to the image this code is linked into.
Built-in preset management — save/load/delete/rename/import.