Kind-of worked on the R-Tree; not really enough time to do much.
[aesalon.git] / src / monitor / Aesalon.cpp
blob31ed0fb43967e7d6c4b23205d88302b647aed364
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 0
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 /*rt.insert(RTree::Bound(77.7, 79.2), 1);
32 rt.insert(RTree::Bound(64.9, 67), 2);
33 rt.insert(RTree::Bound(76.3, 78.9), 3);
34 rt.insert(RTree::Bound(21.1, 27.9), 4);
35 rt.insert(RTree::Bound(86.2, 88.5), 5);*/
36 /*rt.insert(RTree::Bound(2.2, 8), 6);
37 rt.insert(RTree::Bound(1.1, 5.3), 7);
38 rt.insert(RTree::Bound(78.4, 82.1), 8);
39 rt.insert(RTree::Bound(41.3, 43.9), 9);
40 rt.insert(RTree::Bound(86.2, 93.2), 10);*/
42 rt.insert(RTree::Bound(2.2, 8), 6);
43 rt.insert(RTree::Bound(1.1, 5.3), 7);
45 class Processor : public RTree::Callback {
46 public:
47 virtual bool handle(const RTree::Bound &/*bound*/, int &value) {
48 Message(Debug, "****\t\tFound value " << value);
49 return true;
53 Processor p;
55 rt.search(RTree::Bound(0.0, 8.0), &p);
56 rt.search(RTree::Bound(0.0, 16.0), &p);
58 return 0;
60 #endif