0024645: Pointer to the last is wrong for a tree node
[occt.git] / src / TCollection / TCollection_AVLSearchTree.lxx
1 // Created by: J.P. TIRAULT
2 // Copyright (c) 1998-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 //-----------------------------------------------------------------------------
17 // inline methods for AVLSearchTree
18 //-----------------------------------------------------------------------------
19 #include <Standard_Address.hxx>
20
21 //-----------------------------------------------------------------------------
22 // IsEmpty : Is the current tree empty ?
23 //-----------------------------------------------------------------------------
24 inline Standard_Boolean TCollection_AVLSearchTree::IsEmpty () const
25 {
26   return TheRoot == NULL;
27 }
28
29 //-----------------------------------------------------------------------------
30 // GetRoot : Returns the root of the current tree
31 //-----------------------------------------------------------------------------
32 inline Standard_Address TCollection_AVLSearchTree::GetRoot () const 
33 {
34   return TheRoot;
35 }
36
37 //-----------------------------------------------------------------------------
38 // GetComparator : Returns the Comparator of the current tree
39 //-----------------------------------------------------------------------------
40 inline Comparator TCollection_AVLSearchTree::GetComparator () const 
41 {
42   return TheComparator;
43 }
44
45 // ---------------------------------------------------------------------------
46 // SetRoot : Replaces the root of the current tree
47 //-----------------------------------------------------------------------------
48 inline void TCollection_AVLSearchTree::SetRoot(const Standard_Address ANode)
49 {
50   TheRoot = ANode;
51 }
52
53