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

◆ check_instances()

template<typename Source, typename Access>
bool MayaFlux::Portal::Forma::Detail::DocumentWalk< Source, Access >::check_instances ( )
inlineprivate

Definition at line 527 of file Instantiate.hpp.

528 {
530 for (size_t k = 0; k < entry.instances.size(); ++k) {
531 const Source& instance = entry.instances[k];
533 if (entry.direct[k]) {
535 return false;
536 } else {
537 const auto id = claim_id(instance);
538 if (!id)
539 return false;
542 [this](std::string_view value) { return m_templates.contains(std::string(value)); },
543 m_error);
544 if (!reference)
545 return false;
546
547 info = InstanceInfo { .id = *id, .template_id = std::string(*reference), .layer = {}, .actions = {}, .form = std::nullopt };
549 return false;
550 }
551 entry.info.push_back(std::move(info));
552 }
554 return false;
555 }
556 return true;
557 }
bool read_actions(const Source &instance, InstanceInfo &info)
bool check_relations(const SurfaceInstances &entry)
std::vector< SurfaceInstances > m_surfaces
std::optional< std::string > claim_id(const Source &source)
bool read_element(const Source &element, InstanceInfo &info)
An element declares what C++ declares for one placed form: its name, the initial state,...
std::unordered_map< std::string, Source > m_templates
bool read_layer_attributes(const Source &instance, LayerAttributes &out)
std::optional< std::string_view > check_reference(const Source &source, std::string_view attribute, Exists &&exists, std::string &error)
Check that an element's attribute names a value that exists.

References MayaFlux::Reflect::check_reference(), check_relations(), claim_id(), MayaFlux::Portal::Forma::Detail::DocumentWalk< Source, Access >::InstanceInfo::layer, m_error, m_surfaces, m_templates, read_actions(), read_element(), read_layer_attributes(), and MayaFlux::Portal::Forma::reserved_template_attribute.

Referenced by read_structure().

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