MCPcopy Create free account
hub / github.com/anjo76/angelscript / Get

Method Get

sdk/add_on/scriptdictionary/scriptdictionary.cpp:343–355  ·  view source on GitHub ↗

Returns true if the value was successfully retrieved

Source from the content-addressed store, hash-verified

341
342// Returns true if the value was successfully retrieved
343bool 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
358int CScriptDictionary::GetTypeId(const dictKey_t &key) const

Calls 7

GetFunction · 0.85
findMethod · 0.80
endMethod · 0.80
RefCastObjectMethod · 0.80
GetTypeInfoByIdMethod · 0.80
AssignScriptObjectMethod · 0.80

Tested by

no test coverage detected