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();
boost::shared_ptr< TreeNode > TreeNodePtr
virtual TreeNodePtr getVisibleParent() const
virtual QString getUid() const
virtual std::vector< TreeNodePtr > getVisibleChildren() const
CachedTreeNode(TreeNodePtr base)
virtual QString getType() const
Namespace for all CustusX production code.