MayaFlux 1.0.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 215 of file ExecutionContext.hpp.

216 {
217 auto it = execution_metadata.find(key);
218
219 if (it == execution_metadata.end()) {
220 CastResult<T> result;
221 result.error = "ExecutionContext missing key: " + key;
222 return result;
223 }
224
225 return safe_any_cast<T>(it->second);
226 }
std::unordered_map< std::string, std::any > execution_metadata
Arbitrary metadata parameters used by operations.