| 311 | } |
| 312 | |
| 313 | std::string OSCMessageElement::ToString() const |
| 314 | { |
| 315 | return std::visit( |
| 316 | [](auto &&arg) -> std::string { |
| 317 | using T = std::decay_t<decltype(arg)>; |
| 318 | if constexpr (std::is_same_v<T, StringVariable>) { |
| 319 | return arg; |
| 320 | } else if constexpr (std::is_same_v<T, OSCBlob> || |
| 321 | std::is_same_v<T, OSCTrue> || |
| 322 | std::is_same_v<T, OSCFalse> || |
| 323 | std::is_same_v<T, OSCInfinity> || |
| 324 | std::is_same_v<T, OSCNull>) { |
| 325 | return arg.GetStringRepresentation(); |
| 326 | } else { |
| 327 | return std::to_string(arg.GetValue()); |
| 328 | } |
| 329 | }, |
| 330 | _value); |
| 331 | } |
| 332 | |
| 333 | void OSCMessage::Save(obs_data_t *obj) const |
| 334 | { |
no test coverage detected