MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / ToString

Method ToString

plugins/base/utils/osc-helpers.cpp:313–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

311}
312
313std::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
333void OSCMessage::Save(obs_data_t *obj) const
334{

Callers 15

LogActionMethod · 0.45
GetShortDescMethod · 0.45
GetShortDescMethod · 0.45
LogActionMethod · 0.45
GetShortDescMethod · 0.45
LogActionMethod · 0.45
GetShortDescMethod · 0.45
PerformActionMethod · 0.45
LogActionMethod · 0.45
GetShortDescMethod · 0.45
LogActionMethod · 0.45
GetShortDescMethod · 0.45

Calls 3

to_stringFunction · 0.85
GetValueMethod · 0.80

Tested by

no test coverage detected