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

Method removeChild

core/2d/Node.cpp:1084–1095  ·  view source on GitHub ↗

"remove" logic MUST only be on this method * If a class want's to extend the 'removeChild' behavior it only needs * to override this method */

Source from the content-addressed store, hash-verified

1082 * to override this method
1083 */
1084void Node::removeChild(Node* child, bool cleanup /* = true */)
1085{
1086 // explicit nil handling
1087 if (_children.empty())
1088 {
1089 return;
1090 }
1091
1092 ssize_t index = _children.getIndex(child);
1093 if (index != AX_INVALID_INDEX)
1094 this->detachChild(child, index, cleanup);
1095}
1096
1097void Node::removeChildByTag(int tag, bool cleanup /* = true */)
1098{

Callers 15

removeChildByTagMethod · 0.95
removeChildByNameMethod · 0.95
updateMethod · 0.45
switchToMethod · 0.45
switchToAndReleaseMeMethod · 0.45
__playMethod · 0.45
__play4Method · 0.45
__play5Method · 0.45
deleteRadioButtonMethod · 0.45
createVideoMethod · 0.45
menuCallback_MessageMethod · 0.45

Calls 3

detachChildMethod · 0.95
emptyMethod · 0.45
getIndexMethod · 0.45

Tested by 13

deleteRadioButtonMethod · 0.36
createVideoMethod · 0.36
menuCallback_MessageMethod · 0.36
removeSpriteMethod · 0.36
onTouchEndedMethod · 0.36
removeThisMethod · 0.36
onEnterMethod · 0.36
removeSystemMethod · 0.36
loadingCallBackMethod · 0.36
setupMethod · 0.36
removeAndAddSpriteMethod · 0.36