]> git.mxchange.org Git - flightgear.git/commitdiff
Added some stubs in the flightgear main code to eventually add a full, FGSubsystems...
authorDurk Talsma <d.talsma@xs4all.nl>
Sun, 1 Aug 2010 14:16:33 +0000 (16:16 +0200)
committerDurk Talsma <d.talsma@xs4all.nl>
Sun, 1 Aug 2010 14:16:33 +0000 (16:16 +0200)
src/ATC/Makefile.am
src/ATC/atis.cxx [new file with mode: 0644]
src/ATC/atis.hxx [new file with mode: 0644]
src/Main/fg_init.cxx

index 35756c958bf13f648e844076052b0d53c8a4389b..8748cef1e7fac019c3f64950b083c8831188eefe 100644 (file)
@@ -2,6 +2,7 @@ noinst_LIBRARIES = libATC.a
 
 libATC_a_SOURCES = \
        atcutils.cxx atcutils.hxx \
+       atis.cxx atis.hxx \
        trafficcontrol.cxx trafficcontrol.hxx 
 
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
diff --git a/src/ATC/atis.cxx b/src/ATC/atis.cxx
new file mode 100644 (file)
index 0000000..3e95dba
--- /dev/null
@@ -0,0 +1,45 @@
+/******************************************************************************
+ * atis.cxx
+ * Written by Durk Talsma, started August 1, 2010.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *
+ **************************************************************************/
+
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include <iostream>
+
+#include "atis.hxx"
+
+FGAtisManager::FGAtisManager() {
+
+}
+
+FGAtisManager::~FGAtisManager() {
+
+}
+
+void FGAtisManager::init() {
+    SGSubsystem::init();
+}
+
+void FGAtisManager::update ( double time ) {
+    cerr << "ATIS code is running at time: " << time << endl;
+}
diff --git a/src/ATC/atis.hxx b/src/ATC/atis.hxx
new file mode 100644 (file)
index 0000000..12fc4fd
--- /dev/null
@@ -0,0 +1,39 @@
+/* -*- Mode: C++ -*- *****************************************************
+ * atic.hxx
+ * Written by Durk Talsma. Started August 1, 2010; based on earlier work
+ * by David C. Luff
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *
+ **************************************************************************/
+
+#ifndef _ATIS_HXX_
+#define _ATIS_HXX_
+
+#include <simgear/structure/subsystem_mgr.hxx>
+
+class FGAtisManager : public SGSubsystem
+{
+private:
+  
+public:
+  FGAtisManager();
+  ~FGAtisManager();
+  void init();
+  void update(double time);    
+};
+  
+#endif // _ATIS_HXX_
\ No newline at end of file
index 179b46e0e53dcb0209ed468817e11a802b7a9cd9..b740425a857640c5bd14be076fac750bef4b1816 100644 (file)
@@ -79,6 +79,7 @@
 #   include <ATCDCL/AIMgr.hxx>
 #   include "ATCDCL/commlist.hxx"
 #else
+#   include "ATC/atis.hxx"
 #   include "ATC/atcutils.hxx"
 #endif
 
@@ -1572,6 +1573,11 @@ bool fgInitSubsystems() {
     SG_LOG(SG_GENERAL, SG_INFO, "  AI Manager");
     globals->set_AI_mgr(new FGAIMgr);
     globals->get_AI_mgr()->init();
+#else
+    ////////////////////////////////////////////////////////////////////
+    // Initialise the ATIS Manager
+    ////////////////////////////////////////////////////////////////////
+    globals->add_subsystem("atis", new FGAtisManager, SGSubsystemMgr::POST_FDM);
 #endif
     ////////////////////////////////////////////////////////////////////
     // Initialise the AI Model Manager