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

◆ set_value_impl()

void MayaFlux::Kakshya::PlotContainer::set_value_impl ( const std::vector< uint64_t > &  coords,
const void *  in,
const std::type_info &  type 
)
overrideprotectedvirtual

Type-erased single-element write.

Implementations copy from in into their storage at coords if type matches their native type, otherwise no-op. in points to a caller-owned buffer of exactly sizeof(native type) bytes.

Implements MayaFlux::Kakshya::NDDataContainer.

Definition at line 540 of file PlotContainer.cpp.

544{
545 if (type != typeid(double) || coords.size() < 2 || coords[0] >= m_data.size())
546 return;
547
548 const auto idx = static_cast<size_t>(coords[0]);
549
550 Memory::SeqlockWriteGuard g(m_series_locks[idx]);
551 auto* vec = std::get_if<std::vector<double>>(&m_data[idx]);
552 if (!vec || coords[1] >= vec->size())
553 return;
554
555 (*vec)[coords[1]] = *static_cast<const double*>(in);
556}
std::vector< DataVariant > m_data
Memory::SeqlockArray m_series_locks

References m_data, and m_series_locks.