version 0.3.0
[fms.git] / include / fmsapp.h
diff --git a/include/fmsapp.h b/include/fmsapp.h
new file mode 100644 (file)
index 0000000..a816d9a
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef _fmsapp_\r
+#define _fmsapp_\r
+\r
+#include "threadwrapper/threadedexecutor.h"\r
+\r
+#include <Poco/Util/ServerApplication.h>\r
+\r
+// main FMS application class\r
+class FMSApp:public Poco::Util::ServerApplication\r
+{\r
+public:\r
+       FMSApp();\r
+\r
+       static void Terminate() { ((FMSApp *)&FMSApp::instance())->terminate(); }\r
+\r
+private:\r
+       void initialize(Poco::Util::Application &self);\r
+       void initializeLogger();\r
+       void defineOptions(Poco::Util::OptionSet &options);\r
+       int main(const std::vector<std::string> &args);\r
+\r
+       void StartThreads();\r
+\r
+       void handleHelp(const std::string &name, const std::string &value);\r
+       void displayHelp();\r
+\r
+       bool m_displayhelp;\r
+\r
+       ThreadedExecutor m_threads;\r
+\r
+};\r
+\r
+#endif // _fmsapp_\r