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

◆ check_form()

template<typename Source, typename Access>
bool MayaFlux::Portal::Forma::Detail::DocumentWalk< Source, Access >::check_form ( const Source & form)
inlineprivate

A form either calls a registered function or gives vertices to draw, as C++ either passes a function's Form to Tend or submits vertices to a slice.

Definition at line 639 of file Instantiate.hpp.

640 {
643 if (call && topology)
644 return fail(form, "<form> may call a function or give a topology, not both");
645 if (!call) {
646 if (!topology)
647 return fail(form, "<form> needs a call or a topology attribute");
648 return true;
649 }
650 if (!m_calls)
651 return fail(form, "<form> needs a call table, and none was given");
652 if (!m_calls->contains(*call))
653 return fail(form, "no registered call " + std::string(*call));
654 bool has_child = false;
655 Access::for_each_child(form, [&](const Source&) {
656 has_child = true;
657 return false;
658 });
659 if (has_child)
660 return fail(form, "<form> that calls a function takes no children");
661 return true;
662 }
bool fail(const Source &at, std::string message)

References fail(), m_calls, MayaFlux::Portal::Forma::reserved_call_attribute, and MayaFlux::Portal::Forma::vertex_topology_attribute.

Referenced by read_element().

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