Lines Matching defs:Root
266 // Mutating operations. A tree root can be manipulated as
454 // in an existing root if that root is still marked mutable.
595 /// markImmutable - Clears the mutable bits of a root and all of its
659 ImutAVLTreeGenericIterator(const TreeTy *Root) {
660 if (Root) stack.push_back(reinterpret_cast<uintptr_t>(Root));
768 ImutAVLTreeInOrderIterator(const TreeTy* Root) : InternalItr(Root) {
769 if (Root)
965 TreeTy *Root;
968 /// Constructs a set from a pointer to a tree root. In general one
972 explicit ImmutableSet(TreeTy* R) : Root(R) {
973 if (Root) { Root->retain(); }
975 ImmutableSet(const ImmutableSet &X) : Root(X.Root) {
976 if (Root) { Root->retain(); }
979 if (Root != X.Root) {
980 if (X.Root) { X.Root->retain(); }
981 if (Root) { Root->release(); }
982 Root = X.Root;
987 if (Root) { Root->release(); }
1014 TreeTy *NewT = F.add(Old.Root, V);
1026 TreeTy *NewT = F.remove(Old.Root, V);
1045 return Root ? Root->contains(V) : false;
1049 return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root;
1053 return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root;
1057 if (Root) { Root->retain(); }
1058 return Root;
1062 return Root;
1066 bool isEmpty() const { return !Root; }
1073 void foreach(Callback& C) { if (Root) Root->foreach(C); }
1076 void foreach() { if (Root) { Callback C; Root->foreach(C); } }
1084 iterator begin() const { return iterator(Root); }
1091 unsigned getHeight() const { return Root ? Root->getHeight() : 0; }
1094 ID.AddPointer(S.Root);
1103 void validateTree() const { if (Root) Root->validateTree(); }
1116 TreeTy *Root;
1120 /// Constructs a set from a pointer to a tree root. In general one
1125 : Root(R),
1127 if (Root) { Root->retain(); }
1130 : Root(X.Root),
1132 if (Root) { Root->retain(); }
1135 if (Root != X.Root) {
1136 if (X.Root) { X.Root->retain(); }
1137 if (Root) { Root->release(); }
1138 Root = X.Root;
1144 if (Root) { Root->release(); }
1152 return ImmutableSetRef(Factory->add(Root, V), Factory);
1156 return ImmutableSetRef(Factory->remove(Root, V), Factory);
1161 return Root ? Root->contains(V) : false;
1166 Factory->getCanonicalTree(Root) : Root);
1170 return Root;
1174 return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root;
1178 return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root;
1182 bool isEmpty() const { return !Root; }
1194 iterator begin() const { return iterator(Root); }
1201 unsigned getHeight() const { return Root ? Root->getHeight() : 0; }
1204 ID.AddPointer(S.Root);
1213 void validateTree() const { if (Root) Root->validateTree(); }