39{
40 long int a = 12341;
41 long double b = 3352.9933;
42
43
44 cout << "\n\n\n==========================================================\n";
45 cout << "Testing the PNode Class\n";
46 cout << "==========================================================\n";
47
48
49
50
51
52
53 cout << "Constructing Variants" << endl;
57
58
59 cout << "\n\n\n---------------------------------------------\n";
60 cout << "Creating new PNodes (All Datanodes)";
61 cout << "\n\n\n---------------------------------------------\n";
62
63 cout << "Creating p0" << endl;
65
66
67 cout << "Creating p1" << endl;
69
70 cout << "Creating p2" << endl;
72
73 cout << "\n\n\n---------------------------------------------\n";
74 cout << "Printing PNodes (All Datanodes)\n";
75 cout << "---------------------------------------------\n";
76
77 cout << *p0 << endl;
78 cout << *p1 << endl;
79 cout << *p2 << endl;
80
81
82
83 cout << "\n\n\n---------------------------------------------\n";
84 cout << "Creating p3" << endl;
85 cout << "---------------------------------------------\n";
86
88
89
90 cout << "Retrieving the variant in P3" << endl;
92 cout << "value: " << flush << v2 << endl;
93
94
95 cout << "---------------------------------------------\n";
96
97 cout << "Creating p4" << endl;
99
100 cout << "Creating p5" << endl;
102
103 cout << "Creating p6" << endl;
105
106
107 cout << "\n\n\n---------------------------------------------\n";
108 cout << "Printing PNodes (Datanodes and Opnodes)\n";
109 cout << "---------------------------------------------\n";
110
111 cout << *p0 << endl;
112 cout << *p1 << endl;
113 cout << *p2 << endl;
114
115
116 cout << *p4 << endl;
117 cout << *p5 << endl;
118 cout << *p6 << endl;
119
120
121
122 cout << "\n\n\n---------------------------------------------\n";
123 cout << "Realigning nodes.\n";
124 cout << "---------------------------------------------\n";
125
126 p0 = ((
OpNode*)p6)->GetRight();
127 p1 = ((
OpNode*)p5)->GetRight();
128
129 cout << *p0 << endl;
130 cout << *p1 << endl;
131
132 cout << "Finished" << endl;
133 return 0;
134}
const Variant & GetValue() const