MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / Add

Method Add

src/hx/Anon.cpp:286–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286Anon_obj *Anon_obj::Add(const String &inName,const Dynamic &inValue,bool inSetThisPointer)
287{
288 // TODO - fixed
289 if (!mFields.mPtr)
290 {
291 mFields = hx::FieldMapCreate();
292 HX_OBJ_WB_GET(this, mFields.mPtr);
293 }
294
295 __string_hash_set(HX_MAP_THIS_ mFields,inName,inValue,true);
296 if (inSetThisPointer && inValue.GetPtr())
297 inValue.GetPtr()->__SetThis(this);
298 return this;
299}
300
301static int _hx_toString_depth = 0;
302String Anon_obj::toString()

Callers 7

SourceInfoFunction · 0.45
GetInstanceFieldsMethod · 0.45
buffer_append_charFunction · 0.45
ParseCommandLineFunction · 0.45
runObjectMethod · 0.45
anonAddMethod · 0.45

Calls 3

FieldMapCreateFunction · 0.85
GetPtrMethod · 0.80
__SetThisMethod · 0.80

Tested by

no test coverage detected