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

◆ get_blob()

std::optional< std::vector< uint8_t > > MayaFlux::Core::InputValue::OSCMessage::get_blob ( size_t  index = 0) const
noexcept

Extract a blob argument by index.

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

Definition at line 158 of file InputBinding.cpp.

159{
160 if (index >= arguments.size())
161 return std::nullopt;
162 return std::visit([](const auto& v) -> std::optional<std::vector<uint8_t>> {
163 using T = std::decay_t<decltype(v)>;
164 if constexpr (std::is_same_v<T, std::vector<uint8_t>>)
165 return v;
166 return std::nullopt;
167 },
168 arguments[index]);
169}
std::vector< OSCArg > arguments
Typed arguments.