2#include <ossia/detail/small_vector.hpp>
4#include <ossia/network/base/parameter.hpp>
5#include <ossia/network/base/parameter_data.hpp>
7#include <oscpack/osc/OscOutboundPacketStream.h>
13inline oscpack::OutboundPacketStream&
14operator<<(oscpack::OutboundPacketStream& p,
const std::vector<std::string_view>& values)
16 for(
auto val : values)
24inline oscpack::OutboundPacketStream&
27 p << address.get_node().osc_address();
32inline oscpack::OutboundPacketStream&
33operator<<(oscpack::OutboundPacketStream& p,
const std::vector<std::string>& values)
35 for(
const auto& val : values)
37 p << std::string_view(val);
43template <
typename ValueWriter>
44class osc_message_generator
47 osc_message_generator(oscpack::OutboundPacketStream& stream)
52 const oscpack::OutboundPacketStream& operator()(std::string_view name,
const char* v)
55 void write(
const char* arg) { p << std::string_view(arg); }
57 template <
typename Arg>
58 void write(
const Arg& arg)
63 void write(
const std::vector<ossia::value>& v)
68 template <
typename... Args>
69 const oscpack::OutboundPacketStream&
70 operator()(std::string_view name,
const Args&... args)
72 p << oscpack::BeginMessageN(name);
74 p << oscpack::EndMessage();
78 const oscpack::OutboundPacketStream& stream()
const {
return p; }
80 oscpack::OutboundPacketStream& p;
The parameter_base class.
Definition ossia/network/base/parameter.hpp:48
The value class.
Definition value.hpp:173
Definition dataspace.hpp:24