-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtree.cc
49 lines (42 loc) · 1.11 KB
/
tree.cc
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
//
// See copyright.h for copyright notice and limitation of liability
// and disclaimer of warranty provisions.
//
#include "copyright.h"
///////////////////////////////////////////////////////////////////////////
//
// file: tree.cc
//
// This file defines the basic class of tree node
//
///////////////////////////////////////////////////////////////////////////
#include "tree.h"
/* line number to assign to the current node being constructed */
int node_lineno = 1;
///////////////////////////////////////////////////////////////////////////
//
// tree_node::tree_node
//
// constructor of tree node
//
///////////////////////////////////////////////////////////////////////////
tree_node::tree_node()
{
line_number = node_lineno;
}
///////////////////////////////////////////////////////////////////////////
//
// tree_node::get_line_number
//
///////////////////////////////////////////////////////////////////////////
int tree_node::get_line_number()
{
return line_number;
}
//
// Set up common area from existing node
//
tree_node *tree_node::set(tree_node *t) {
line_number = t->line_number;
return this;
}