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

◆ claim_id()

template<typename Source, typename Access>
std::optional< std::string > MayaFlux::Portal::Forma::Detail::DocumentWalk< Source, Access >::claim_id ( const Source & source)
inlineprivate

Definition at line 307 of file Instantiate.hpp.

308 {
309 if (!m_ids.claim(source, m_error))
310 return std::nullopt;
312 if (const auto held = m_names.location_of(id)) {
313 fail(source, "id " + id + " is already used by an element at row " + std::to_string(*held));
314 return std::nullopt;
315 }
316 return id;
317 }
Reflect::AttributeIndex< Source, Access > m_names
bool fail(const Source &at, std::string message)
Reflect::AttributeIndex< Source, Access > m_ids

References fail(), m_error, m_ids, m_names, and MayaFlux::Portal::Forma::reserved_id_attribute.

Referenced by check_instances(), read_surface(), and read_template().

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