|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
The values of one attribute across a tree, each claimed by one element. More...
#include <AttributeChecks.hpp>
Public Member Functions | |
| const std::string & | attribute () const noexcept |
| AttributeIndex (std::string attribute) | |
| bool | claim (const Source &source, std::string &error) |
| Claim the attribute's value for an element. | |
| bool | contains (std::string_view value) const |
| std::optional< uint64_t > | location_of (std::string_view value) const |
| The location of the element that holds a value, or nullopt. | |
Private Attributes | |
| std::string | m_attribute |
| std::map< std::string, uint64_t, std::less<> > | m_claimed |
The values of one attribute across a tree, each claimed by one element.
Claiming a value records the element that holds it, and a second claim of the same value is refused with the location of the first. It serves any source with a RecordAccess, so the same check holds for an XML document, a script or any other element tree.
Usage:
| Source | Element type with a RecordAccess specialization. |
Definition at line 38 of file AttributeChecks.hpp.