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

◆ read_hit_attribute()

template<typename Source, typename Access, typename T>
bool MayaFlux::Portal::Forma::Detail::read_hit_attribute ( const Source & node,
std::string_view name,
T & value,
std::string & error )

Definition at line 67 of file ElementHit.hpp.

68 {
69 const auto text = Access::attribute(node, name);
70 if (!text)
71 return hit_fail<Source, Access>(node, "needs a " + std::string(name) + " attribute", error);
73 if (!Reflect::TextCodec<T>::decode(*text, value, reason)) {
74 return hit_fail<Source, Access>(node,
75 "has an invalid " + std::string(name) + " of " + std::string(*text), error);
76 }
77 return true;
78 }
bool hit_fail(const Source &at, const std::string &message, std::string &error)
Conversion of authored text to one value type.
Definition TextCodec.hpp:81

References hit_fail(), and MayaFlux::Reflect::Invalid.

Referenced by MayaFlux::Portal::Forma::read_hit_child(), and read_region().

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