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

◆ clear()

bool MayaFlux::Kakshya::CompositeArray::clear ( size_t  index,
std::string_view  field_name 
)

Mark a field absent without removing its stored bytes.

Parameters
indexElement index.
field_nameField to clear.
Returns
True on success; false for an invalid index or name.

Definition at line 295 of file Composite.cpp.

296{
297 if (index >= size()) {
299 "CompositeArray: element {} is out of range for {} elements", index, size());
300 return false;
301 }
302
303 const auto field_index = m_layout.find_field(field_name);
304
305 if (!field_index) {
307 "CompositeArray: field '{}' does not exist", field_name);
308 return false;
309 }
310
311 set_present(index, *field_index, false);
312 return true;
313}
#define MF_WARN(comp, ctx,...)
uint32_t index
Definition VKDevice.cpp:122
size_t size() const noexcept
Number of packed elements.
void set_present(size_t index, size_t field_index, bool present) noexcept
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
@ Runtime
General runtime operations (default fallback)
@ Kakshya
Containers[Signalsource, Stream, File], Regions, DataProcessors.

References MayaFlux::Kakshya::CompositeLayout::find_field(), index, MayaFlux::Journal::Kakshya, m_layout, MF_WARN, MayaFlux::Journal::Runtime, set_present(), and size().

Referenced by MayaFlux::Yantra::OperationHelper::reconstruct_projected_composite(), and MayaFlux::IO::DelimitedTextReader::seek().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: