Fawkes API  Fawkes Development Version
run.h
1 
2 /***************************************************************************
3  * run.h - Fawkes run functions
4  *
5  * Created: Wed May 04 23:23:23 2011
6  * Copyright 2006-2011 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef _LIBS_BASEAPP_RUN_H_
25 #define _LIBS_BASEAPP_RUN_H_
26 
27 #include <baseapp/init_options.h>
28 
29 namespace fawkes {
30 class ArgumentParser;
31 class MultiLogger;
32 class NetworkLogger;
33 class BlackBoard;
34 class Configuration;
35 class FawkesMainThread;
36 class PluginManager;
37 class AspectManager;
38 class ThreadManager;
39 class FawkesNetworkManager;
40 class Clock;
41 class Time;
42 class ConfigNetworkHandler;
43 class PluginNetworkHandler;
44 
45 namespace tf {
46 class Transformer;
47 class TransformListener;
48 } // namespace tf
49 
50 namespace runtime {
51 
52 extern ArgumentParser * argument_parser;
53 extern FawkesMainThread * main_thread;
54 extern MultiLogger * logger;
55 extern NetworkLogger * network_logger;
56 extern BlackBoard * blackboard;
57 extern Configuration * config;
58 extern Clock * clock;
59 extern PluginManager * plugin_manager;
60 extern AspectManager * aspect_manager;
61 extern ThreadManager * thread_manager;
62 extern FawkesNetworkManager * network_manager;
63 extern ConfigNetworkHandler * nethandler_config;
64 extern PluginNetworkHandler * nethandler_plugin;
65 extern tf::Transformer * tf_transformer;
66 extern tf::TransformListener *tf_listener;
67 extern Time * start_time;
68 
69 bool init(int argc, char **argv, int &retval);
70 bool init(const InitOptions &options, int &retval);
71 void run();
72 void cleanup();
73 void quit();
74 float uptime();
75 
76 void print_usage(const char *progname);
77 
78 } // end namespace runtime
79 } // end namespace fawkes
80 
81 #endif
fawkes