21 mVisibleChildrenSet =
false;
24 void CachedTreeNode::clearCache()
28 mVisibleParent.reset();
29 mVisibleChildren.clear();
30 mVisibleChildrenSet =
false;
36 mUid = mBase->getUid();
43 mType = mBase->getType();
50 if (!mVisibleChildrenSet)
52 std::vector<TreeNodePtr> children = mBase->getVisibleChildren();
54 mVisibleChildren = std::vector<TreeNodeWeakPtr>(children.begin(), children.end());
55 mVisibleChildrenSet =
true;
58 std::vector<TreeNodePtr> retval(mVisibleChildren.size());
59 for (
unsigned i=0; i< retval.size(); ++i)
60 retval[i] = mVisibleChildren[i].lock();
67 if (!mVisibleParent.lock())
68 mVisibleParent = mBase->getVisibleParent();
69 return mVisibleParent.lock();