3 #include <ossia/detail/config.hpp>
5 #include <ossia/detail/string_view.hpp>
6 #include <ossia/preset/exception.hpp>
25 namespace ossia::presets
27 using preset = std::vector<std::pair<std::string, ossia::value>>;
29 using instance_functions = std::vector<
32 using preset_pair = std::pair<std::string, ossia::value>;
34 OSSIA_EXPORT preset read_json(
const std::string&,
bool skip_first_level =
true);
35 OSSIA_EXPORT std::string write_json(
const std::string& devicename,
const preset&);
37 OSSIA_EXPORT std::string to_string(
const preset&);
38 OSSIA_EXPORT preset from_string(
const std::string_view& str);
46 struct preset_save_options
65 OSSIA_EXPORT
void write_file(std::string_view
string, std::string_view filename);
67 OSSIA_EXPORT
const std::string read_file(
const std::string& filename);
76 OSSIA_EXPORT
const std::string
103 OSSIA_EXPORT
void apply_preset(
105 presets::instance_functions = {},
bool allow_nonterminal =
false,
106 bool remove_first =
true);
108 OSSIA_EXPORT presets::preset
Root of a device tree.
Definition: ossia/network/base/device.hpp:58
The node_base class.
Definition: network/base/node.hpp:48