MCPcopy Create free account
hub / github.com/axmolengine/axmol / insertProtectedChild

Method insertProtectedChild

core/2d/ProtectedNode.cpp:244–256  ·  view source on GitHub ↗

helper used by reorderChild & add

Source from the content-addressed store, hash-verified

242
243// helper used by reorderChild & add
244void ProtectedNode::insertProtectedChild(ax::Node* child, int z)
245{
246#if AX_ENABLE_GC_FOR_NATIVE_OBJECTS
247 auto sEngine = ScriptEngineManager::getInstance()->getScriptEngine();
248 if (sEngine)
249 {
250 sEngine->retainScriptObject(this, child);
251 }
252#endif // AX_ENABLE_GC_FOR_NATIVE_OBJECTS
253 _reorderProtectedChildDirty = true;
254 _protectedChildren.pushBack(child);
255 child->setLocalZOrder(z);
256}
257
258void ProtectedNode::sortAllProtectedChildren()
259{

Callers 1

addProtectedChildMethod · 0.95

Calls 3

getInstanceFunction · 0.85
pushBackMethod · 0.80
setLocalZOrderMethod · 0.45

Tested by

no test coverage detected