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

◆ element_at()

std::optional< XmlElementView > MayaFlux::IO::XmlDocument::element_at ( uint64_t row) const
nodiscardnoexcept

Borrow an element by its row index.

Definition at line 49 of file XmlDocument.cpp.

50{
51 const auto& rows = m_forest->rows();
52 if (row >= rows.size())
53 return std::nullopt;
54 const auto source = rows.at(static_cast<size_t>(row));
55 if (!source || source->text("kind") != std::string_view("element"))
56 return std::nullopt;
57 return XmlElementView(rows, m_forest->index(), static_cast<size_t>(row));
58}
std::shared_ptr< const Kakshya::CompositeForest > m_forest
Source source()
Begin a Source chain.
Definition Plot.hpp:127

References m_forest.