Decision time again, as per usual . . .
[aesalon.git] / src / monitor / Aesalon.cpp
blob142b2bfaa4cf2b70033c266fa99b9334502e86e6
1 /** Aesalon, a tool to visualize program behaviour in real time.
2 Copyright (C) 2009-2011, Aesalon development team.
4 Aesalon is distributed under the terms of the GNU GPLv3. See
5 the included file LICENSE for more information.
7 @file src/monitor/Aesalon.cpp
8 */
9 #include <stdlib.h>
10 #include <iostream>
12 #include "monitor/Coordinator.h"
14 #include "storage/RTree.h"
16 #if 1
17 int main(int argc, char *argv[]) {
18 Monitor::Coordinator coordinator(argv);
19 coordinator.run();
20 return coordinator.returnValue();
24 #else
25 int main(int argc, char *argv[]) {
26 typedef Storage::RTree<double, int, 1, 5, 2> RTree;
28 RTree rt;
30 RTree::Bound b;
32 b.setRange(RTree::Range(77.7, 79.2), 0);
33 rt.insert(b, 1);
34 b.setRange(RTree::Range(64.9, 67), 0);
35 rt.insert(b, 2);
36 b.setRange(RTree::Range(76.3, 78.9), 0);
37 rt.insert(b, 3);
38 b.setRange(RTree::Range(21.1, 27.9), 0);
39 rt.insert(b, 4);
40 b.setRange(RTree::Range(86.2, 88.5), 0);
41 rt.insert(b, 5);
42 b.setRange(RTree::Range(2.2, 8), 0);
43 rt.insert(b, 6);
44 b.setRange(RTree::Range(1.1, 5.3), 0);
45 rt.insert(b, 7);
46 b.setRange(RTree::Range(78.4, 82.1), 0);
47 rt.insert(b, 8);
48 b.setRange(RTree::Range(41.3, 43.9), 0);
49 rt.insert(b, 9);
50 b.setRange(RTree::Range(86.2, 93.2), 0);
51 rt.insert(b, 10);
53 b.setRange(RTree::Range(21.1, 27.9), 0);
54 rt.remove(b, 4);
55 b.setRange(RTree::Range(2.2, 8), 0);
56 rt.remove(b, 6);
57 b.setRange(RTree::Range(1.1, 5.3), 0);
58 rt.remove(b, 7);
60 class Processor : public RTree::SearchProcessor {
61 public:
62 virtual bool process(const RTree::Bound &bound, int value) {
63 Message(Debug, "****\t\tFound value " << value);
64 return true;
68 Processor p;
70 b.setRange(RTree::Range(0.0, 8.0), 0);
72 rt.search(b, &p);
74 return 0;
76 #endif