MayaFlux 0.5.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 203 of file ExecutionContext.hpp.

204 {
205 auto it = execution_metadata.find(key);
206
207 if (it == execution_metadata.end()) {
208 CastResult<T> result;
209 result.error = "ExecutionContext missing key: " + key;
210 return result;
211 }
212
213 return safe_any_cast<T>(it->second);
214 }
std::unordered_map< std::string, std::any > execution_metadata
Arbitrary metadata parameters used by operations.