2 * @file sample_node_updator.hpp
\r
3 * Contains a samle node update functor.
\r
5 * Copyright Ami Tavory, IBM-HRL, 2004.
\r
7 * Permission to use, copy, modify, sell, and distribute this software
\r
8 * is hereby granted without fee, provided that the above copyright notice
\r
9 * appears in all copies, and that both that copyright notice and this
\r
10 * permission notice appear in supporting documentation.
\r
12 * None of the above authors, nor IBM Haifa Research Laboratories, make any
\r
13 * representation about the suitability of this software for any
\r
14 * purpose. It is provided "as is" without express or implied warranty.
\r
18 #ifndef SAMPLE_NODE_UPDATOR_HPP
\r
19 #define SAMPLE_NODE_UPDATOR_HPP
\r
24 * description = "A sample node updator."
\r
25 * comment = "This class serves to show the interface a node update functor
\r
26 * needs to support.">
\r
28 class sample_node_updator
\r
31 *******************************************************************************
\r
32 *******************************************************************************
\r
33 * <public_methods_group>
\r
38 ***************************************************************************
\r
39 ***************************************************************************
\r
40 ** <group description = "Conclassors, declassor, and related.">
\r
44 * <fn description = "Default constructor."
\r
45 * comment = "Must be default constructible.">
\r
52 * <fn description = "Copy constructor."
\r
53 * comment = "Must be copy constructible.">
\r
56 (const sample_node_updator &r_other);
\r
60 * <fn description = "Swaps content."
\r
61 * comment = "Must be swappable (if there is such a word).">
\r
65 (sample_node_updator &r_other);
\r
69 ***************************************************************************
\r
70 ***************************************************************************
\r
76 ***************************************************************************
\r
77 ***************************************************************************
\r
78 ** <group description = "Operators.">
\r
82 * <fn description = "This method is called by the superclass container
\r
83 * object to update the key of a node whose invariants have been
\r
84 * violated. p_key is a pointer to the key being updated;
\r
85 * p_l_child_key is a pointer to the key of the left-child node of
\r
86 * the node being updated (and is NULL if there is no such child node);
\r
87 * p_r_child_key is a pointer to the key of the right-child node of
\r
88 * the node being updated (and is NULL if there is no such child node)."
\r
89 * comment = "@@sample_node_updator_const_key_pointer_comment">
\r
93 (const_key_pointer p_key,
\r
94 const_key_pointer p_l_child_key,
\r
95 const_key_pointer p_r_child_key);
\r
99 ***************************************************************************
\r
100 ***************************************************************************
\r
106 *******************************************************************************
\r
107 *******************************************************************************
\r
108 * </public_methods_group>
\r
116 #endif // #ifndef SAMPLE_NODE_UPDATOR_HPP
\r