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

◆ get()

template<typename T >
CastResult< T > MayaFlux::Yantra::ExecutionContext::get ( const std::string &  key) const
inline

Retrieve metadata value using safe casting.

Uses safe_any_cast internally, allowing numeric conversions and providing detailed error reporting.

Template Parameters
TExpected type
Parameters
keyMetadata key
Returns
CastResult containing the value or error details

Definition at line 148 of file ExecutionContext.hpp.

149 {
150 auto it = execution_metadata.find(key);
151
152 if (it == execution_metadata.end()) {
153 CastResult<T> result;
154 result.error = "ExecutionContext missing key: " + key;
155 return result;
156 }
157
158 return safe_any_cast<T>(it->second);
159 }
std::unordered_map< std::string, std::any > execution_metadata
Arbitrary metadata parameters used by operations.