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

◆ get_attribute()

template<typename T >
std::optional< T > MayaFlux::Kakshya::RegionGroup::get_attribute ( const std::string &  key) const
inline

Get a group-level attribute.

Template Parameters
TValue type.
Parameters
keyAttribute key.
Returns
Optional value if present and convertible.

Definition at line 277 of file RegionGroup.hpp.

278 {
279 auto it = attributes.find(key);
280 if (it == attributes.end()) {
281 return std::nullopt;
282 }
283
284 return safe_any_cast<T>(it->second);
285 }
std::unordered_map< std::string, std::any > attributes
Flexible key-value store for group-specific attributes.