MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_string()

std::optional< std::string > MayaFlux::Core::InputValue::OSCMessage::get_string ( size_t  index = 0) const
noexcept

Extract a string argument by index.

Parameters
indexArgument index (0-based).
Returns
String value, or std::nullopt if out of range or wrong type.

Definition at line 150 of file InputBinding.cpp.

151{
152 if (index >= arguments.size())
153 return std::nullopt;
154 return std::visit([](const auto& v) -> std::optional<std::string> {
155 using T = std::decay_t<decltype(v)>;
156 if constexpr (std::is_same_v<T, std::string>)
157 return v;
158 return std::nullopt;
159 },
161}
uint32_t index
Definition VKDevice.cpp:142
std::vector< OSCArg > arguments
Typed arguments.

References index.