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

◆ set_state()

template<typename RoutineType >
template<typename T >
void MayaFlux::Vruta::routine_promise< RoutineType >::set_state ( const std::string &  key,
T  value 
)
inline

Stores a value in the state dictionary.

Parameters
keyName of the state value
valueValue to store

This method provides a type-safe way to store values of any type in the state dictionary. The value is wrapped in std::any for type erasure.

Definition at line 183 of file Promise.hpp.

184 {
185 state[key] = std::make_any<T>(std::move(value));
186 }
glm::vec3 value
std::unordered_map< std::string, std::any > state
Dictionary for storing arbitrary state data.
Definition Promise.hpp:156

References value.