Implementation helper for get_state.
- Parameters
-
| key | Name of the state value to retrieve |
- Returns
- Pointer to the stored value, or nullptr if not found or type mismatch
Definition at line 187 of file Event.hpp.
188 {
190 if (!raw_ptr)
191 return nullptr;
192
193 try {
194 return std::any_cast<T>(static_cast<std::any*>(raw_ptr));
195 } catch (const std::bad_any_cast&) {
196 return nullptr;
197 }
198 }
virtual void * get_state_impl_raw(const std::string &key)