Lines Matching defs:Root

72   TreeTy* Root;
79 explicit ImmutableMap(const TreeTy* R) : Root(const_cast<TreeTy*>(R)) {
80 if (Root) { Root->retain(); }
82 ImmutableMap(const ImmutableMap &X) : Root(X.Root) {
83 if (Root) { Root->retain(); }
86 if (Root != X.Root) {
87 if (X.Root) { X.Root->retain(); }
88 if (Root) { Root->release(); }
89 Root = X.Root;
94 if (Root) { Root->release(); }
111 TreeTy *T = F.add(Old.Root, std::pair<key_type,data_type>(K,D));
116 TreeTy *T = F.remove(Old.Root,K);
130 return Root ? Root->contains(K) : false;
134 return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root;
138 return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root;
142 if (Root) { Root->retain(); }
143 return Root;
147 return Root;
151 if (Root) Root->retain();
155 if (Root) Root->release();
158 bool isEmpty() const { return !Root; }
182 if (Root) {
184 Root->foreach(CB);
190 if (Root) {
192 Root->foreach(CB);
200 void verify() const { if (Root) Root->verify(); }
235 iterator begin() const { return iterator(Root); }
239 if (Root) {
240 TreeTy* T = Root->find(K);
251 return Root ? &(Root->getMaxElement()->getValue()) : nullptr;
258 unsigned getHeight() const { return Root ? Root->getHeight() : 0; }
261 ID.AddPointer(M.Root);
284 TreeTy *Root;
293 : Root(const_cast<TreeTy*>(R)),
295 if (Root) { Root->retain(); }
300 : Root(X.getRootWithoutRetain()),
302 if (Root) { Root->retain(); }
306 : Root(X.Root),
308 if (Root) { Root->retain(); }
312 if (Root != X.Root) {
313 if (X.Root)
314 X.Root->retain();
316 if (Root)
317 Root->release();
319 Root = X.Root;
326 if (Root)
327 Root->release();
335 if (Root) Root->retain();
339 if (Root) Root->release();
343 TreeTy *NewT = Factory->add(Root, std::pair<key_type, data_type>(K, D));
348 TreeTy *NewT = Factory->remove(Root, K);
353 return Root ? Root->contains(K) : false;
357 return ImmutableMap<KeyT, ValT>(Factory->getCanonicalTree(Root));
361 return Root && RHS.Root ? Root->isEqual(*RHS.Root) : Root == RHS.Root;
365 return Root && RHS.Root ? Root->isNotEqual(*RHS.Root) : Root != RHS.Root;
368 bool isEmpty() const { return !Root; }
374 void verify() const { if (Root) Root->verify(); }
403 iterator begin() const { return iterator(Root); }
407 if (Root) {
408 TreeTy* T = Root->find(K);
419 return Root ? &(Root->getMaxElement()->getValue()) : 0;
426 unsigned getHeight() const { return Root ? Root->getHeight() : 0; }
429 ID.AddPointer(M.Root);