MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / New

Function New

Source/Engine/Scripting/Internal/ManagedDictionary.h:194–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192 }
193
194 static ManagedDictionary New(MType* keyType, MType* valueType)
195 {
196 ManagedDictionary result;
197 MTypeObject* dictionaryType = GetClass(keyType, valueType);
198 if (!dictionaryType)
199 return result;
200
201 MObject* exception = nullptr;
202#if !USE_MONO_AOT
203 MObject* instance = CreateInstance(nullptr, dictionaryType, nullptr, &exception);
204#else
205 void* params[2];
206 params[0] = dictionaryType;
207 params[1] = nullptr;
208 MObject* instance = CreateInstance->Invoke(nullptr, params, &exception);
209#endif
210 if (exception)
211 {
212 MException ex(exception);
213 ex.Log(LogType::Error, TEXT(""));
214 return result;
215 }
216
217 result.Instance = instance;
218 return result;
219 }
220
221 void Add(MObject* key, MObject* value)
222 {

Callers 15

ToManagedMethod · 0.70
ToManagedFunction · 0.70
GetClassFunction · 0.70
WriteMethod · 0.50
NewObjectMethod · 0.50
SetManagedInstanceMethod · 0.50
CreateManagedMethod · 0.50
ObjectInternal_Create1Function · 0.50
ObjectInternal_Create2Function · 0.50
NewObjectMethod · 0.50

Calls 3

GetClassFunction · 0.70
InvokeMethod · 0.45
LogMethod · 0.45

Tested by

no test coverage detected