1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
/*
* @file sample_node_updator.hpp
* Contains a samle node update functor.
*
* Copyright Ami Tavory, IBM-HRL, 2004.
*
* Permission to use, copy, modify, sell, and distribute this software
* is hereby granted without fee, provided that the above copyright notice
* appears in all copies, and that both that copyright notice and this
* permission notice appear in supporting documentation.
*
* None of the above authors, nor IBM Haifa Research Laboratories, make any
* representation about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
**/
#ifndef SAMPLE_NODE_UPDATOR_HPP
#define SAMPLE_NODE_UPDATOR_HPP
/**
* <class
* description = "A sample node updator."
* comment = "This class serves to show the interface a node update functor
* needs to support.">
**/
class sample_node_updator
{
/**
*******************************************************************************
*******************************************************************************
* <public_methods_group>
**/
public:
/**
***************************************************************************
***************************************************************************
** <group description = "Conclassors, declassor, and related.">
**/
/*
* <fn description = "Default constructor."
* comment = "Must be default constructible.">
**/
sample_node_updator
();
/** </fn> **/
/*
* <fn description = "Copy constructor."
* comment = "Must be copy constructible.">
**/
sample_node_updator
(const sample_node_updator &r_other);
/** </fn> **/
/*
* <fn description = "Swaps content."
* comment = "Must be swappable (if there is such a word).">
**/
inline void
swap
(sample_node_updator &r_other);
/** </fn> **/
/*
***************************************************************************
***************************************************************************
* </group>
**/
/**
***************************************************************************
***************************************************************************
** <group description = "Operators.">
**/
/**
* <fn description = "This method is called by the superclass container
* object to update the key of a node whose invariants have been
* violated. p_key is a pointer to the key being updated;
* p_l_child_key is a pointer to the key of the left-child node of
* the node being updated (and is NULL if there is no such child node);
* p_r_child_key is a pointer to the key of the right-child node of
* the node being updated (and is NULL if there is no such child node)."
* comment = "@@sample_node_updator_const_key_pointer_comment">
**/
void
operator()
(const_key_pointer p_key,
const_key_pointer p_l_child_key,
const_key_pointer p_r_child_key);
/** </fn> **/
/*
***************************************************************************
***************************************************************************
* </group>
**/
/**
*******************************************************************************
*******************************************************************************
* </public_methods_group>
**/
};
/**
* </class>
**/
#endif // #ifndef SAMPLE_NODE_UPDATOR_HPP
|