2#include <ossia/network/base/address_scope.hpp>
3#include <ossia/network/base/node.hpp>
26find_node(node_base& dev, std::string_view parameter_base);
36OSSIA_EXPORT std::vector<ossia::net::node_base*>
37find_nodes(node_base& dev, std::string_view pattern);
46OSSIA_EXPORT node_base& create_node(node_base& dev, std::string_view parameter_base);
56OSSIA_EXPORT std::vector<ossia::net::node_base*>
57create_nodes(node_base& dev, std::string_view pattern);
64OSSIA_EXPORT node_base&
65find_or_create_node(node_base& dev, std::string_view parameter_base);
67parameter_base* find_or_create_parameter(
68 node_base& node, std::string_view address, std::string_view type);
79OSSIA_EXPORT std::vector<parameter_base*> find_parameter_or_create_node(
80 node_base& node, std::string_view address, std::string_view type);
85OSSIA_EXPORT node_base*
86find_or_create_node(node_base& dev, std::string_view parameter_base,
bool create);
89void sanitize_name(std::string& name,
const node_base::children_t& brethren);
102template <
typename Address>
105 auto& node = ossia::net::create_node(root, std::move(name));
106 auto addr =
new Address(node);
107 node.set_parameter(std::unique_ptr<Address>(addr));
111template <
typename Address>
114 auto& node = ossia::net::find_or_create_node(root, std::move(name));
115 if(
auto p =
dynamic_cast<Address*
>(node.get_parameter()))
121 auto addr =
new Address{node};
122 node.set_parameter(std::unique_ptr<Address>(addr));
129void expand_ranges(std::string& str);
132std::pair<std::vector<std::string>,
bool> expand_address(std::string address);
140std::vector<ossia::net::node_base*>
147 std::vector<ossia::net::node_base*>&out,
155void iterate_all_children(
159struct OSSIA_EXPORT fuzzysearch_result
166 operator==(
const fuzzysearch_result& lhs,
const fuzzysearch_result& rhs)
noexcept
168 return lhs.score == rhs.score && lhs.oscname == rhs.oscname && lhs.node == rhs.node;
172struct fuzzysearch_options
174 bool case_sensitive{
true};
179 const std::vector<ossia::net::node_base*>& node,
180 const std::vector<std::string>& patterns, std::vector<fuzzysearch_result>& results,
181 fuzzysearch_options = {});
The node_base class.
Definition node.hpp:48
The parameter_base class.
Definition ossia/network/base/parameter.hpp:48
OSSIA_EXPORT void push_value(const ossia::destination &addr, const ossia::value_with_unit &)
Send a value to a given destination.
Definition ossia/network/base/parameter.cpp:151
Definition value_with_unit.hpp:13