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

◆ has()

bool MayaFlux::Kakshya::Composite::has ( std::string_view  field_name) const
noexcept

Whether a named field exists and is present in this element.

Parameters
field_nameField to inspect.

Definition at line 315 of file Composite.cpp.

316{
317 const auto field_index = m_layout->find_field(field_name);
318 if (!field_index)
319 return false;
320
321 const auto& rows = std::get<std::vector<uint8_t>>(*m_rows);
322 const size_t byte_index = m_index * m_layout->stride_bytes() + *field_index / 8;
323
324 return (rows[byte_index] & static_cast<uint8_t>(1U << (*field_index % 8))) != 0;
325}
uint32_t rows
size_t stride_bytes() const noexcept
Bytes per packed element after finalization.
Definition Composite.hpp:86
std::optional< size_t > find_field(std::string_view name) const noexcept
Find a field index by name, or std::nullopt if absent.
Definition Composite.cpp:54
const CompositeLayout * m_layout

References rows.

Referenced by MayaFlux::IO::DelimitedTextWriter::write_element().

+ Here is the caller graph for this function: