MCPcopy Create free account
hub / github.com/MyGUI/mygui / add

Method add

UnitTests/UnitTest_TreeControl/GenericNode.h:130–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128
129 template<class NODE, class OWNER>
130 void GenericNode<NODE, OWNER>::add(NODE* pNode)
131 {
132 MYGUI_DEBUG_ASSERT(pNode, "GenericNode<NODE, OWNER>::add pNode is nullptr");
133
134 if (pNode->mpParent)
135 pNode->mpParent->remove(pNode, false);
136
137 pNode->mpParent = static_cast<NODE*>(this);
138 pNode->setOwner(mpOwner);
139 mChildren.push_back(pNode);
140
141 invalidate();
142 }
143
144 template<class NODE, class OWNER>
145 void GenericNode<NODE, OWNER>::remove(NODE* pNode, bool bDelete)

Callers 2

SampleLayoutMethod · 0.45
notifyTreeNodePrepareMethod · 0.45

Calls 3

setOwnerMethod · 0.80
removeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected