Minor changes here and there.
[aesalon.git] / src / monitor / Aesalon.cpp
blob686ded4c0edf941c4ab8c9ec3c01b3c1adb7d131
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"
13 #include "config/GlobalVault.h"
15 #include "storage/RTree.h"
17 #if 1
18 int main(int argc, char *argv[]) {
19 Config::GlobalVault gv;
20 Monitor::Coordinator coordinator(argv);
21 coordinator.run();
22 return coordinator.returnValue();
25 #else
26 int main(int argc, char *argv[]) {
27 typedef Storage::RTree<double, int, 1, 5, 2> RTree;
29 RTree rt;
31 RTree::Bound b;
33 b.setRange(RTree::Range(77.7, 79.2), 0);
34 rt.insert(b, 1);
35 b.setRange(RTree::Range(64.9, 67), 0);
36 rt.insert(b, 2);
37 b.setRange(RTree::Range(76.3, 78.9), 0);
38 rt.insert(b, 3);
39 b.setRange(RTree::Range(21.1, 27.9), 0);
40 rt.insert(b, 4);
41 b.setRange(RTree::Range(86.2, 88.5), 0);
42 rt.insert(b, 5);
43 b.setRange(RTree::Range(2.2, 8), 0);
44 rt.insert(b, 6);
45 b.setRange(RTree::Range(1.1, 5.3), 0);
46 rt.insert(b, 7);
47 b.setRange(RTree::Range(78.4, 82.1), 0);
48 rt.insert(b, 8);
49 b.setRange(RTree::Range(41.3, 43.9), 0);
50 rt.insert(b, 9);
51 b.setRange(RTree::Range(86.2, 93.2), 0);
52 rt.insert(b, 10);
54 b.setRange(RTree::Range(21.1, 27.9), 0);
55 rt.remove(b, 4);
56 b.setRange(RTree::Range(2.2, 8), 0);
57 rt.remove(b, 6);
58 b.setRange(RTree::Range(1.1, 5.3), 0);
59 rt.remove(b, 7);
61 class Processor : public RTree::SearchProcessor {
62 public:
63 virtual bool process(const RTree::Bound &bound, int value) {
64 Message(Debug, "****\t\tFound value " << value);
65 return true;
69 Processor p;
71 b.setRange(RTree::Range(0.0, 8.0), 0);
73 rt.search(b, &p);
75 return 0;
77 #endif