Debian Codegraph @

src/Environment/ephemeris.hxx

raw symbols SCIP
1 // ephemeris.hxx -- wrap SGEphemeris code in a subsystem
2 //
3 // Written by James Turner, started June 2010.
4 //
5 // Copyright (C) 2010 Curtis L. Olson - http://www.flightgear.org/~curt
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 //
21 // $Id$
22
23 #ifndef FG_ENVIRONMENT_EPHEMERIS_HXX
24 #define FG_ENVIRONMENT_EPHEMERIS_HXX
25
26 #include <simgear/structure/subsystem_mgr.hxx>
27
28 #include <Main/fg_props.hxx>
29
30 class SGEphemeris;
31 class SGPropertyNode;
32
33 /**
34 * Wrap SGEphemeris in a subsystem/property interface
35 */
36 class Ephemeris : public SGSubsystem
37 {
38 public:
39 Ephemeris();
40 ~Ephemeris();
41
42 // Subsystem API.
43 void bind() override;
44 void init() override;
45 void postinit() override;
46 void shutdown() override;
47 void unbind() override;
48 void update(double dt) override;
49
50 // Subsystem identification.
51 static const char* staticSubsystemClassId() { return "ephemeris"; }
52
53 SGEphemeris* data();
54
55 private:
56 std::unique_ptr<SGEphemeris> _impl;
57 SGPropertyNode_ptr _latProp;
58 SGPropertyNode_ptr _moonlight;
59 };
60
61 #endif // of FG_ENVIRONMENT_EPHEMERIS_HXX