Returns true if the value was successfully retrieved
| 341 | |
| 342 | // Returns true if the value was successfully retrieved |
| 343 | bool CScriptDictionary::Get(const dictKey_t &key, void *value, int typeId) const |
| 344 | { |
| 345 | dictMap_t::const_iterator it; |
| 346 | it = dict.find(key); |
| 347 | if( it != dict.end() ) |
| 348 | return it->second.Get(engine, value, typeId); |
| 349 | |
| 350 | // AngelScript has already initialized the value with a default value, |
| 351 | // so we don't have to do anything if we don't find the element, or if |
| 352 | // the element is incompatible with the requested type. |
| 353 | |
| 354 | return false; |
| 355 | } |
| 356 | |
| 357 | // Returns the type id of the stored value |
| 358 | int CScriptDictionary::GetTypeId(const dictKey_t &key) const |
no test coverage detected