2 CLAW - a C++ Library Absolutely Wonderful
4 CLAW is a free library without any particular aim but being useful to
7 Copyright (C) 2005-2011 Julien Jorge
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Lesser General Public
11 License as published by the Free Software Foundation; either
12 version 2.1 of the License, or (at your option) any later version.
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with this library; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 contact: julien.jorge@gamned.org
26 * \file binary_node.tpp
27 * \brief The binary_node class implementation.
28 * \author Julien Jorge
33 /*---------------------------------------------------------------------------*/
35 * \brief Binary node constructor.
36 * \post (left==NULL) && (right==NULL)
39 claw::binary_node<U>::binary_node()
40 : left(NULL), right(NULL)
45 /*---------------------------------------------------------------------------*/
47 * \brief Binary node copy constructor.
48 * \param that Node to copy from.
51 claw::binary_node<U>::binary_node( const binary_node& that )
54 left = new U( * that.left );
59 right = new U( * that.right );
62 } // binary_node() [copy constructor]
64 /*---------------------------------------------------------------------------*/
66 * \brief Clear right and left childs. Memory's not freed.
67 * \post this->left == NULL && this->right == NULL
70 void claw::binary_node<U>::clear()
76 /*---------------------------------------------------------------------------*/
78 * \brief Binary node destructor.
79 * Deletes the whole subtree.
82 claw::binary_node<U>::~binary_node()
89 } // ~binary_node() [destructor]