1
0
Fork 0

SGSubsystem classes: Whitespace standardisation of the declarations.

This is a clean up commit prior to the subsystem API standardisation to simplify
the diffs.  It includes all SGSubsystem and SGSubsystemGroup derived classes.
This commit is contained in:
Edward d'Auvergne 2018-04-03 12:21:33 +02:00
parent 8428cd2a44
commit 60a2444766
122 changed files with 2449 additions and 2543 deletions
docs-mini
src
AIModel
Aircraft
Airports
Autopilot
Canvas
Cockpit
Environment
FDM
GUI
Input
Instrumentation
Main
Model
Network
Scenery

View file

@ -54,16 +54,15 @@ SGSubsystem and define at least a small set of functions:
class FGFX : public SGSubsystem class FGFX : public SGSubsystem
{ {
public: public:
FGFX();
virtual ~FGFX();
FGFX (); virtual void init();
virtual ~FGFX (); virtual void reinit();
virtual void bind();
virtual void init (); virtual void unbind();
virtual void reinit (); virtual void update(double dt);
virtual void bind (); };
virtual void unbind ();
virtual void update (double dt);
}
The init() functions should make sure everything is set and ready so the The init() functions should make sure everything is set and ready so the
update() function can be run by the main loop. The reinit() function handles update() function can be run by the main loop. The reinit() function handles

View file

@ -37,7 +37,6 @@ typedef SGSharedPtr<FGAIBase> FGAIBasePtr;
class FGAIManager : public SGSubsystem class FGAIManager : public SGSubsystem
{ {
public: public:
FGAIManager(); FGAIManager();
virtual ~FGAIManager(); virtual ~FGAIManager();
@ -108,6 +107,7 @@ public:
double radarRangeM() const double radarRangeM() const
{ return _radarRangeM; } { return _radarRangeM; }
private: private:
// FGSubmodelMgr is a friend for access to the AI_list // FGSubmodelMgr is a friend for access to the AI_list
friend class FGSubmodelMgr; friend class FGSubmodelMgr;

View file

@ -41,6 +41,7 @@ public:
PerformanceData* getDefaultPerformance() const; PerformanceData* getDefaultPerformance() const;
static const char* subsystemName() { return "aircraft-performance-db"; } static const char* subsystemName() { return "aircraft-performance-db"; }
private: private:
void load(const SGPath& path); void load(const SGPath& path);

View file

@ -19,11 +19,10 @@
class FGAIBase; class FGAIBase;
class FGAIManager; class FGAIManager;
class FGSubmodelMgr : public SGSubsystem, public SGPropertyChangeListener class FGSubmodelMgr : public SGSubsystem,
public SGPropertyChangeListener
{ {
public: public:
typedef struct { typedef struct {
SGPropertyNode_ptr trigger_node; SGPropertyNode_ptr trigger_node;
SGPropertyNode_ptr prop; SGPropertyNode_ptr prop;
@ -107,7 +106,6 @@ public:
void shutdown() override; void shutdown() override;
private: private:
typedef std::vector <submodel*> submodel_vector_type; typedef std::vector <submodel*> submodel_vector_type;
typedef submodel_vector_type::iterator submodel_vector_iterator; typedef submodel_vector_type::iterator submodel_vector_iterator;
@ -186,7 +184,6 @@ private:
SGVec3d getCartOffsetPos(submodel* sm) const; SGVec3d getCartOffsetPos(submodel* sm) const;
void setOffsetPos(submodel* sm); void setOffsetPos(submodel* sm);
}; };
#endif // __SYSTEMS_SUBMODEL_HXX #endif // __SYSTEMS_SUBMODEL_HXX

View file

@ -31,13 +31,15 @@
typedef std::vector<SGGeod> SGGeodVec; typedef std::vector<SGGeod> SGGeodVec;
class PagedPathForHistory : public SGReferenced { class PagedPathForHistory : public SGReferenced
{
public: public:
PagedPathForHistory() : last_seen(0) {} PagedPathForHistory() : last_seen(0) {}
virtual ~PagedPathForHistory() {} virtual ~PagedPathForHistory() {}
SGGeodVec path; SGGeodVec path;
time_t last_seen; time_t last_seen;
}; };
typedef SGSharedPtr<PagedPathForHistory> PagedPathForHistory_ptr; typedef SGSharedPtr<PagedPathForHistory> PagedPathForHistory_ptr;
const unsigned int SAMPLE_BUCKET_WIDTH = 1024; const unsigned int SAMPLE_BUCKET_WIDTH = 1024;
@ -88,7 +90,6 @@ private:
}; };
/** /**
* Bucket is a fixed-size container of samples. This is a crude slab * Bucket is a fixed-size container of samples. This is a crude slab
* allocation of samples, in chunks defined by the width constant above. * allocation of samples, in chunks defined by the width constant above.
@ -104,11 +105,11 @@ private:
double m_lastCaptureTime; double m_lastCaptureTime;
double m_sampleInterval; ///< sample interval in seconds double m_sampleInterval; ///< sample interval in seconds
/// our store of samples (in buckets). The last bucket is partially full, /// our store of samples (in buckets). The last bucket is partially full,
/// with the number of valid samples indicated by m_validSampleCount /// with the number of valid samples indicated by m_validSampleCount
std::vector<SampleBucket*> m_buckets; std::vector<SampleBucket*> m_buckets;
/// number of valid samples in the final bucket /// number of valid samples in the final bucket
unsigned int m_validSampleCount; unsigned int m_validSampleCount;
SGPropertyNode_ptr m_weightOnWheels; SGPropertyNode_ptr m_weightOnWheels;

View file

@ -31,9 +31,7 @@
class FGControls : public SGSubsystem class FGControls : public SGSubsystem
{ {
public: public:
enum { enum {
ALL_ENGINES = -1, ALL_ENGINES = -1,
MAX_ENGINES = 12 MAX_ENGINES = 12
@ -251,12 +249,11 @@ private:
int vertical_mode; int vertical_mode;
int lateral_mode; int lateral_mode;
SGPropertyNode_ptr auto_coordination; SGPropertyNode_ptr auto_coordination;
SGPropertyNode_ptr auto_coordination_factor; SGPropertyNode_ptr auto_coordination_factor;
simgear::TiedPropertyList _tiedProperties; simgear::TiedPropertyList _tiedProperties;
public:
public:
FGControls(); FGControls();
~FGControls(); ~FGControls();
@ -640,6 +637,7 @@ public:
void set_autopilot_engage( int ap, bool val ); void set_autopilot_engage( int ap, bool val );
static const char* subsystemName() { return "controls"; } static const char* subsystemName() { return "controls"; }
private: private:
inline void do_autocoordination() { inline void do_autocoordination() {
// check for autocoordination // check for autocoordination
@ -650,7 +648,6 @@ private:
} }
}; };
#endif // _CONTROLS_HXX #endif // _CONTROLS_HXX

View file

@ -50,6 +50,7 @@ public:
FGAirportDynamicsRef dynamicsForICAO(const std::string& icao); FGAirportDynamicsRef dynamicsForICAO(const std::string& icao);
static const char* subsystemName() { return "airport-dynamics"; } static const char* subsystemName() { return "airport-dynamics"; }
private: private:
typedef std::map<std::string, FGAirportDynamicsRef> ICAODynamicsDict; typedef std::map<std::string, FGAirportDynamicsRef> ICAODynamicsDict;
ICAODynamicsDict m_dynamics; ICAODynamicsDict m_dynamics;

View file

@ -40,8 +40,8 @@ namespace FGXMLAutopilot {
* <li>an optional periodical definition</li> * <li>an optional periodical definition</li>
* </ul> * </ul>
*/ */
class AnalogComponent : public Component { class AnalogComponent : public Component
{
private: private:
/** /**
* @brief a flag signalling that the output property value shall be fed back * @brief a flag signalling that the output property value shall be fed back

View file

@ -50,18 +50,15 @@ class StateMachineComponent : public Component
{ {
public: public:
StateMachineComponent( SGPropertyNode& props_root, StateMachineComponent( SGPropertyNode& props_root,
SGPropertyNode& cfg ) SGPropertyNode& cfg ) {
{
inner = simgear::StateMachine::createFromPlist(&cfg, &props_root); inner = simgear::StateMachine::createFromPlist(&cfg, &props_root);
} }
virtual bool configure( const std::string & nodeName, SGPropertyNode_ptr config) virtual bool configure( const std::string & nodeName, SGPropertyNode_ptr config) {
{
return false; return false;
} }
virtual void update( bool firstTime, double dt ) virtual void update( bool firstTime, double dt ) {
{
SG_UNUSED(firstTime); SG_UNUSED(firstTime);
inner->update(dt); inner->update(dt);
} }

View file

@ -40,10 +40,9 @@ using std::vector;
using simgear::PropertyList; using simgear::PropertyList;
using FGXMLAutopilot::Autopilot; using FGXMLAutopilot::Autopilot;
class FGXMLAutopilotGroupImplementation: class FGXMLAutopilotGroupImplementation : public FGXMLAutopilotGroup
public FGXMLAutopilotGroup
{ {
public: public:
FGXMLAutopilotGroupImplementation(const std::string& nodeName): FGXMLAutopilotGroupImplementation(const std::string& nodeName):
FGXMLAutopilotGroup(), FGXMLAutopilotGroup(),
_nodeName(nodeName) _nodeName(nodeName)
@ -57,10 +56,9 @@ class FGXMLAutopilotGroupImplementation:
InitStatus incrementalInit(); InitStatus incrementalInit();
void reinit(); void reinit();
private: private:
void initFrom( SGPropertyNode_ptr rootNode, const char * childName ); void initFrom( SGPropertyNode_ptr rootNode, const char * childName );
std::string _nodeName; std::string _nodeName;
}; };
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------

View file

@ -36,9 +36,9 @@ public:
void addAutopilotFromFile( const std::string & name, SGPropertyNode_ptr apNode, const char * path ); void addAutopilotFromFile( const std::string & name, SGPropertyNode_ptr apNode, const char * path );
virtual void addAutopilot( const std::string & name, SGPropertyNode_ptr apNode, SGPropertyNode_ptr config ) = 0; virtual void addAutopilot( const std::string & name, SGPropertyNode_ptr apNode, SGPropertyNode_ptr config ) = 0;
virtual void removeAutopilot( const std::string & name ) = 0; virtual void removeAutopilot( const std::string & name ) = 0;
protected: protected:
FGXMLAutopilotGroup() : SGSubsystemGroup("FGXMLAutopilotGroup") {} FGXMLAutopilotGroup() : SGSubsystemGroup("FGXMLAutopilotGroup") {}
}; };
#endif // _XMLAUTO_HXX #endif // _XMLAUTO_HXX

View file

@ -35,17 +35,15 @@ namespace FGXMLAutopilot {
/** /**
* @brief Base class for other autopilot components * @brief Base class for other autopilot components
*/ */
class Component : public SGSubsystem { class Component : public SGSubsystem
{
private: private:
SGSharedPtr<const SGCondition> _condition; SGSharedPtr<const SGCondition> _condition;
SGPropertyNode_ptr _enable_prop; SGPropertyNode_ptr _enable_prop;
std::string * _enable_value; std::string * _enable_value;
bool _enabled; bool _enabled;
protected: protected:
virtual bool configure( SGPropertyNode& cfg_node, virtual bool configure( SGPropertyNode& cfg_node,
const std::string& cfg_name, const std::string& cfg_name,
SGPropertyNode& prop_root ); SGPropertyNode& prop_root );
@ -85,7 +83,6 @@ protected:
bool _honor_passive; bool _honor_passive;
public: public:
/** /**
* @brief A constructor for an empty Component. * @brief A constructor for an empty Component.
*/ */
@ -139,6 +136,6 @@ public:
bool isPropertyEnabled(); bool isPropertyEnabled();
}; };
} }
#endif // COMPONENT_HXX #endif // COMPONENT_HXX

View file

@ -90,11 +90,13 @@ typedef SGSharedPtr<DigitalOutput> DigitalOutput_ptr;
* <li>any number of output properties</li> * <li>any number of output properties</li>
* </ul> * </ul>
*/ */
class DigitalComponent : public Component { class DigitalComponent : public Component
{
public: public:
DigitalComponent(); DigitalComponent();
class InputMap : public std::map<const std::string,SGSharedPtr<const SGCondition> > { class InputMap : public std::map<const std::string,SGSharedPtr<const SGCondition> >
{
public: public:
bool get_value( const std::string & name ) const; bool get_value( const std::string & name ) const;
}; };

View file

@ -37,7 +37,7 @@ namespace FGXMLAutopilot {
*/ */
class DigitalFilter : public AnalogComponent class DigitalFilter : public AnalogComponent
{ {
private: private:
SGSharedPtr<class DigitalFilterImplementation> _implementation; SGSharedPtr<class DigitalFilterImplementation> _implementation;
enum InitializeTo { enum InitializeTo {
@ -46,7 +46,7 @@ class DigitalFilter : public AnalogComponent
INITIALIZE_NONE INITIALIZE_NONE
}; };
protected: protected:
virtual bool configure( SGPropertyNode& cfg_node, virtual bool configure( SGPropertyNode& cfg_node,
const std::string& cfg_name, const std::string& cfg_name,
SGPropertyNode& prop_root ); SGPropertyNode& prop_root );
@ -64,7 +64,6 @@ public:
virtual bool configure( SGPropertyNode& prop_root, virtual bool configure( SGPropertyNode& prop_root,
SGPropertyNode& cfg ); SGPropertyNode& cfg );
}; };
} // namespace FGXMLAutopilot } // namespace FGXMLAutopilot

View file

@ -63,8 +63,10 @@ public:
/** /**
* @brief A simple flipflop implementation * @brief A simple flipflop implementation
*/ */
class FlipFlop : public Logic { class FlipFlop : public Logic
{
public: public:
protected: protected:
/** /**
* @brief Over-rideable hook method to allow derived classes to refine top-level * @brief Over-rideable hook method to allow derived classes to refine top-level
@ -92,7 +94,6 @@ private:
* @brief Pointer to the actual flip flop implementation * @brief Pointer to the actual flip flop implementation
*/ */
SGSharedPtr<FlipFlopImplementation> _implementation; SGSharedPtr<FlipFlopImplementation> _implementation;
}; };
} }

View file

@ -32,11 +32,13 @@ namespace FGXMLAutopilot {
/** /**
* @brief A simple logic class writing &lt;condition&gt; to a property * @brief A simple logic class writing &lt;condition&gt; to a property
*/ */
class Logic : public DigitalComponent { class Logic : public DigitalComponent
{
public: public:
bool get_input() const; bool get_input() const;
void set_output( bool value ); void set_output( bool value );
bool get_output() const; bool get_output() const;
protected: protected:
void update( bool firstTime, double dt ); void update( bool firstTime, double dt );
}; };

View file

@ -37,8 +37,8 @@ namespace FGXMLAutopilot {
/** /**
* Roy Ovesen's PID controller * Roy Ovesen's PID controller
*/ */
class PIDController : public AnalogComponent { class PIDController : public AnalogComponent
{
private: private:
// Configuration values // Configuration values
InputValueList Kp; // proportional gain InputValueList Kp; // proportional gain
@ -65,6 +65,7 @@ protected:
virtual bool configure( SGPropertyNode& cfg_node, virtual bool configure( SGPropertyNode& cfg_node,
const std::string& cfg_name, const std::string& cfg_name,
SGPropertyNode& prop_root ); SGPropertyNode& prop_root );
public: public:
PIDController(); PIDController();
~PIDController() {} ~PIDController() {}

View file

@ -37,10 +37,10 @@ namespace FGXMLAutopilot {
/** /**
* A simplistic P [ + I ] PI controller * A simplistic P [ + I ] PI controller
*/ */
class PISimpleController : public AnalogComponent { class PISimpleController : public AnalogComponent
{
private: private:
// proportional component data // proportional component data
InputValueList _Kp; InputValueList _Kp;
@ -54,7 +54,6 @@ protected:
SGPropertyNode& prop_root ); SGPropertyNode& prop_root );
public: public:
PISimpleController(); PISimpleController();
~PISimpleController() {} ~PISimpleController() {}

View file

@ -44,8 +44,8 @@ namespace FGXMLAutopilot {
* 0.1 would mean (9 parts past value + 1 part current value) / 10 * 0.1 would mean (9 parts past value + 1 part current value) / 10
* 0.25 would mean (3 parts past value + 1 part current value) / 4 * 0.25 would mean (3 parts past value + 1 part current value) / 4
*/ */
class Predictor : public AnalogComponent { class Predictor : public AnalogComponent
{
private: private:
double _last_value; double _last_value;
double _average; double _average;

View file

@ -64,11 +64,11 @@ public:
int numLegs() const; int numLegs() const;
// deprecated // deprecated
int numWaypts() const int numWaypts() const
{ return numLegs(); } { return numLegs(); }
// deprecated // deprecated
flightgear::Waypt* wayptAtIndex(int index) const; flightgear::Waypt* wayptAtIndex(int index) const;
SGPropertyNode_ptr wayptNodeAtIndex(int index) const; SGPropertyNode_ptr wayptNodeAtIndex(int index) const;
@ -101,6 +101,7 @@ public:
flightgear::WayptRef waypointFromString(const std::string& target); flightgear::WayptRef waypointFromString(const std::string& target);
static const char* subsystemName() { return "route-manager"; } static const char* subsystemName() { return "route-manager"; }
private: private:
bool commandDefineUserWaypoint(const SGPropertyNode * arg, SGPropertyNode * root); bool commandDefineUserWaypoint(const SGPropertyNode * arg, SGPropertyNode * root);
bool commandDeleteUserWaypoint(const SGPropertyNode * arg, SGPropertyNode * root); bool commandDeleteUserWaypoint(const SGPropertyNode * arg, SGPropertyNode * root);
@ -182,7 +183,7 @@ private:
virtual void currentWaypointChanged(); virtual void currentWaypointChanged();
// tied getters and setters // tied getters and setters
std::string getDepartureICAO() const; std::string getDepartureICAO() const;
std::string getDepartureName() const; std::string getDepartureName() const;
void setDepartureICAO(const std::string& aIdent); void setDepartureICAO(const std::string& aIdent);
@ -226,5 +227,4 @@ private:
void setAlternate(const std::string &icao); void setAlternate(const std::string &icao);
}; };
#endif // _ROUTE_MGR_HXX #endif // _ROUTE_MGR_HXX

View file

@ -22,10 +22,9 @@
#include <simgear/canvas/CanvasMgr.hxx> #include <simgear/canvas/CanvasMgr.hxx>
#include <simgear/props/PropertyBasedMgr.hxx> #include <simgear/props/PropertyBasedMgr.hxx>
class CanvasMgr: class CanvasMgr : public simgear::canvas::CanvasMgr
public simgear::canvas::CanvasMgr
{ {
public: public:
CanvasMgr(); CanvasMgr();
virtual void init(); virtual void init();
@ -43,7 +42,8 @@ class CanvasMgr:
unsigned int getCanvasTexId(const simgear::canvas::CanvasPtr& canvas) const; unsigned int getCanvasTexId(const simgear::canvas::CanvasPtr& canvas) const;
static const char* subsystemName() { return "Canvas"; } static const char* subsystemName() { return "Canvas"; }
protected:
protected:
osg::observer_ptr<osg::Camera> _gui_camera; osg::observer_ptr<osg::Camera> _gui_camera;
SGPropertyChangeCallback<CanvasMgr> _cb_model_reinit; SGPropertyChangeCallback<CanvasMgr> _cb_model_reinit;

View file

@ -34,10 +34,9 @@ namespace osgGA
} }
class GUIEventHandler; class GUIEventHandler;
class GUIMgr: class GUIMgr : public SGSubsystem
public SGSubsystem
{ {
public: public:
GUIMgr(); GUIMgr();
simgear::canvas::WindowPtr createWindow(const std::string& name = ""); simgear::canvas::WindowPtr createWindow(const std::string& name = "");
@ -68,8 +67,7 @@ class GUIMgr:
*/ */
void ungrabPointer(const simgear::canvas::WindowPtr& window); void ungrabPointer(const simgear::canvas::WindowPtr& window);
protected: protected:
simgear::canvas::GroupPtr _desktop; simgear::canvas::GroupPtr _desktop;
osg::ref_ptr<GUIEventHandler> _event_handler; osg::ref_ptr<GUIEventHandler> _event_handler;

View file

@ -78,6 +78,7 @@ public:
bool anyRuleForType(const std::string& type) const; bool anyRuleForType(const std::string& type) const;
bool isPositionedShown(FGPositioned* pos); bool isPositionedShown(FGPositioned* pos);
protected: protected:
std::string _name; std::string _name;
int _num; int _num;
@ -145,7 +146,6 @@ private:
SGPropertyNode_ptr _Radar_controls; SGPropertyNode_ptr _Radar_controls;
SGPropertyNode_ptr _font_node; SGPropertyNode_ptr _font_node;
SGPropertyNode_ptr _ai_enabled_node; SGPropertyNode_ptr _ai_enabled_node;
SGPropertyNode_ptr _navRadio1Node; SGPropertyNode_ptr _navRadio1Node;

View file

@ -30,9 +30,9 @@
#include "wxradar.hxx" #include "wxradar.hxx"
class agRadar : public wxRadarBg{ class agRadar : public wxRadarBg
{
public: public:
agRadar ( SGPropertyNode *node ); agRadar ( SGPropertyNode *node );
agRadar (); agRadar ();
virtual ~agRadar (); virtual ~agRadar ();

View file

@ -36,7 +36,6 @@ namespace flightgear
class CockpitDisplayManager : public SGSubsystemGroup class CockpitDisplayManager : public SGSubsystemGroup
{ {
public: public:
CockpitDisplayManager (); CockpitDisplayManager ();
virtual ~CockpitDisplayManager (); virtual ~CockpitDisplayManager ();

View file

@ -36,7 +36,9 @@ class FGPavement;
// Built-in layer for the atc radar. // Built-in layer for the atc radar.
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
class GroundRadar : public SGSubsystem, public SGPropertyChangeListener, private FGODGauge class GroundRadar : public SGSubsystem,
public SGPropertyChangeListener,
private FGODGauge
{ {
public: public:
static const int TextureHalfSize = 256; static const int TextureHalfSize = 256;
@ -45,6 +47,7 @@ public:
void updateTexture(); void updateTexture();
virtual void valueChanged(SGPropertyNode*); virtual void valueChanged(SGPropertyNode*);
virtual void update (double dt); virtual void update (double dt);
protected: protected:
void createTexture(const char* texture_name); void createTexture(const char* texture_name);

View file

@ -36,9 +36,10 @@
class FGODGauge; class FGODGauge;
class wxRadarBg : public SGSubsystem, public SGPropertyChangeListener { class wxRadarBg : public SGSubsystem,
public SGPropertyChangeListener
{
public: public:
wxRadarBg(SGPropertyNode *node); wxRadarBg(SGPropertyNode *node);
wxRadarBg(); wxRadarBg();
virtual ~wxRadarBg(); virtual ~wxRadarBg();
@ -75,7 +76,7 @@ protected:
double elevation; double elevation;
double bumpiness; double bumpiness;
double elapsed_time; double elapsed_time;
}ground_echo; } ground_echo;
typedef std::vector <ground_echo*> ground_echo_vector_type; typedef std::vector <ground_echo*> ground_echo_vector_type;
typedef ground_echo_vector_type::iterator ground_echo_vector_iterator; typedef ground_echo_vector_type::iterator ground_echo_vector_iterator;
@ -200,5 +201,4 @@ SGPropertyNode *wxRadarBg::getInstrumentNode(const char *name, const char *value
return result; return result;
} }
#endif // _INST_WXRADAR_HXX #endif // _INST_WXRADAR_HXX

View file

@ -25,10 +25,13 @@
#include <simgear/structure/subsystem_mgr.hxx> #include <simgear/structure/subsystem_mgr.hxx>
namespace Environment { namespace Environment {
class LayerInterpolateController : public SGSubsystem {
public: class LayerInterpolateController : public SGSubsystem
{
public:
static LayerInterpolateController * createInstance( SGPropertyNode_ptr rootNode ); static LayerInterpolateController * createInstance( SGPropertyNode_ptr rootNode );
}; };
} // namespace } // namespace
#endif // _ENVIRONMENT_CTRL_HXX #endif // _ENVIRONMENT_CTRL_HXX

View file

@ -38,9 +38,7 @@ class SGSky;
*/ */
class FGEnvironmentMgr : public SGSubsystemGroup class FGEnvironmentMgr : public SGSubsystemGroup
{ {
public: public:
enum { enum {
MAX_CLOUD_LAYERS = 5 MAX_CLOUD_LAYERS = 5
}; };
@ -60,7 +58,6 @@ public:
*/ */
virtual FGEnvironment getEnvironment () const; virtual FGEnvironment getEnvironment () const;
/** /**
* Get the environment information for another location. * Get the environment information for another location.
*/ */
@ -68,6 +65,7 @@ public:
double alt) const; double alt) const;
virtual FGEnvironment getEnvironment(const SGGeod& aPos) const; virtual FGEnvironment getEnvironment(const SGGeod& aPos) const;
private: private:
void updateClosestAirport(); void updateClosestAirport();

View file

@ -36,7 +36,6 @@ class SGPropertyNode;
class Ephemeris : public SGSubsystem class Ephemeris : public SGSubsystem
{ {
public: public:
Ephemeris(); Ephemeris();
~Ephemeris(); ~Ephemeris();
@ -50,6 +49,7 @@ public:
static const char* subsystemName() { return "ephemeris"; } static const char* subsystemName() { return "ephemeris"; }
SGEphemeris* data(); SGEphemeris* data();
private: private:
std::unique_ptr<SGEphemeris> _impl; std::unique_ptr<SGEphemeris> _impl;
SGPropertyNode_ptr _latProp; SGPropertyNode_ptr _latProp;
@ -57,4 +57,3 @@ private:
}; };
#endif // of FG_ENVIRONMENT_EPHEMERIS_HXX #endif // of FG_ENVIRONMENT_EPHEMERIS_HXX

View file

@ -171,6 +171,7 @@ public:
typedef std::vector<LiveMetarProperties_ptr> MetarPropertiesList; typedef std::vector<LiveMetarProperties_ptr> MetarPropertiesList;
MetarPropertiesList::iterator findMetarAtPath(const string &propPath); MetarPropertiesList::iterator findMetarAtPath(const string &propPath);
protected: protected:
void bind(); void bind();
void unbind(); void unbind();
@ -189,7 +190,6 @@ protected:
simgear::TiedPropertyList _tiedProperties; simgear::TiedPropertyList _tiedProperties;
MetarPropertiesList _metarProperties; MetarPropertiesList _metarProperties;
MetarRequester* _requester; MetarRequester* _requester;
}; };
static bool commandRequestMetar(const SGPropertyNode * arg, SGPropertyNode * root) static bool commandRequestMetar(const SGPropertyNode * arg, SGPropertyNode * root)
@ -400,7 +400,8 @@ void BasicRealWxController::checkNearbyMetar()
/* -------------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------------- */
class NoaaMetarRealWxController : public BasicRealWxController, MetarRequester { class NoaaMetarRealWxController : public BasicRealWxController, MetarRequester
{
public: public:
NoaaMetarRealWxController( SGPropertyNode_ptr rootNode ); NoaaMetarRealWxController( SGPropertyNode_ptr rootNode );
@ -410,6 +411,7 @@ public:
virtual ~NoaaMetarRealWxController() virtual ~NoaaMetarRealWxController()
{ {
} }
private: private:
std::string noaa_base_url; std::string noaa_base_url;
}; };

View file

@ -25,7 +25,9 @@
#include <simgear/structure/subsystem_mgr.hxx> #include <simgear/structure/subsystem_mgr.hxx>
#include <simgear/props/props.hxx> #include <simgear/props/props.hxx>
namespace Environment { namespace Environment {
class RealWxController : public SGSubsystem class RealWxController : public SGSubsystem
{ {
public: public:

View file

@ -38,9 +38,9 @@ using std::string;
#include <simgear/props/tiedpropertylist.hxx> #include <simgear/props/tiedpropertylist.hxx>
class FGRidgeLift : public SGSubsystem { class FGRidgeLift : public SGSubsystem
{
public: public:
FGRidgeLift(); FGRidgeLift();
~FGRidgeLift(); ~FGRidgeLift();

View file

@ -40,10 +40,12 @@ using std::string;
#include <simgear/props/tiedpropertylist.hxx> #include <simgear/props/tiedpropertylist.hxx>
namespace Environment { namespace Environment {
/** /**
* @brief Class for presampling the terrain roughness * @brief Class for presampling the terrain roughness
*/ */
class AreaSampler : public SGSubsystem { class AreaSampler : public SGSubsystem
{
public: public:
AreaSampler( SGPropertyNode_ptr rootNode ); AreaSampler( SGPropertyNode_ptr rootNode );
virtual ~AreaSampler(); virtual ~AreaSampler();
@ -327,6 +329,7 @@ public:
virtual void bind(); virtual void bind();
virtual void unbind(); virtual void unbind();
virtual void update (double delta_time_sec); virtual void update (double delta_time_sec);
private: private:
inline string areaSubsystemName( unsigned i ) { inline string areaSubsystemName( unsigned i ) {
ostringstream name; ostringstream name;

View file

@ -26,6 +26,7 @@
#include <simgear/structure/subsystem_mgr.hxx> #include <simgear/structure/subsystem_mgr.hxx>
namespace Environment { namespace Environment {
class TerrainSampler : public SGSubsystemGroup class TerrainSampler : public SGSubsystemGroup
{ {
public: public:

View file

@ -31,10 +31,9 @@
#include <FDM/flight.hxx> #include <FDM/flight.hxx>
class FGExternalNet: public FGInterface { class FGExternalNet : public FGInterface
{
private: private:
int data_in_port; int data_in_port;
int data_out_port; int data_out_port;
int cmd_port; int cmd_port;
@ -49,7 +48,6 @@ private:
FGNetFDM fdm; FGNetFDM fdm;
public: public:
// Constructor // Constructor
FGExternalNet( double dt, std::string host, int dop, int dip, int cp ); FGExternalNet( double dt, std::string host, int dop, int dip, int cp );
@ -61,8 +59,6 @@ public:
// update the fdm // update the fdm
void update( double dt ); void update( double dt );
}; };
#endif // _EXTERNAL_NET_HXX #endif // _EXTERNAL_NET_HXX

View file

@ -32,10 +32,9 @@
#include <FDM/flight.hxx> #include <FDM/flight.hxx>
class FGExternalPipe: public FGInterface { class FGExternalPipe : public FGInterface
{
private: private:
bool valid; bool valid;
std::string fifo_name_1; std::string fifo_name_1;
@ -63,8 +62,8 @@ private:
void update_property( double dt ); void update_property( double dt );
void process_set_command( const string_list &tokens ); void process_set_command( const string_list &tokens );
public:
public:
// Constructor // Constructor
FGExternalPipe( double dt, std::string fifo_name, std::string protocol ); FGExternalPipe( double dt, std::string fifo_name, std::string protocol );
@ -76,8 +75,6 @@ public:
// update the fdm // update the fdm
void update( double dt ); void update( double dt );
}; };
#endif // _EXTERNAL_PIPE_HXX #endif // _EXTERNAL_PIPE_HXX

View file

@ -98,11 +98,12 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
class FGJSBsim: public FGInterface { class FGJSBsim : public FGInterface
{
public: public:
/// Constructor /// Constructor
FGJSBsim( double dt ); FGJSBsim( double dt );
/// Destructor /// Destructor
~FGJSBsim(); ~FGJSBsim();
@ -221,6 +222,7 @@ public:
double get_agl_ft(double t, const JSBSim::FGColumnVector3& loc, double get_agl_ft(double t, const JSBSim::FGColumnVector3& loc,
double alt_off, double contact[3], double normal[3], double alt_off, double contact[3], double normal[3],
double vel[3], double angularVel[3]); double vel[3], double angularVel[3]);
private: private:
JSBSim::FGFDMExec *fdmex; JSBSim::FGFDMExec *fdmex;
JSBSim::FGInitialCondition *fgic; JSBSim::FGInitialCondition *fgic;
@ -324,5 +326,4 @@ private:
void update_external_forces(double t_off); void update_external_forces(double t_off);
}; };
#endif // _JSBSIM_HXX #endif // _JSBSIM_HXX

View file

@ -32,10 +32,9 @@
#include "IO360.hxx" #include "IO360.hxx"
#include "LaRCsimIC.hxx" #include "LaRCsimIC.hxx"
class FGLaRCsim: public FGInterface { class FGLaRCsim : public FGInterface
{
private: private:
FGNewEngine eng; FGNewEngine eng;
LaRCsimIC* lsic; LaRCsimIC* lsic;
void set_ls(void); void set_ls(void);
@ -46,7 +45,6 @@ private:
double mass, i_xx, i_yy, i_zz, i_xz; double mass, i_xx, i_yy, i_zz, i_xz;
public: public:
FGLaRCsim( double dt ); FGLaRCsim( double dt );
~FGLaRCsim(void); ~FGLaRCsim(void);
@ -103,7 +101,4 @@ public:
} }
}; };
#endif // _LARCSIM_HXX #endif // _LARCSIM_HXX

View file

@ -29,8 +29,8 @@
#include "flight.hxx" #include "flight.hxx"
class FGNullFDM: public FGInterface { class FGNullFDM : public FGInterface
{
public: public:
FGNullFDM( double dt ); FGNullFDM( double dt );
~FGNullFDM(); ~FGNullFDM();
@ -42,5 +42,4 @@ public:
void update( double dt ); void update( double dt );
}; };
#endif // _NULLFDM_HXX #endif // _NULLFDM_HXX

View file

@ -28,7 +28,7 @@
#include <FDM/flight.hxx> #include <FDM/flight.hxx>
class FGACMS: public FGInterface class FGACMS : public FGInterface
{ {
public: public:
FGACMS( double dt ); FGACMS( double dt );
@ -41,12 +41,10 @@ public:
void update( double dt ); void update( double dt );
private: private:
SGPropertyNode_ptr _alt, _speed, _climb_rate; SGPropertyNode_ptr _alt, _speed, _climb_rate;
SGPropertyNode_ptr _pitch, _roll, _heading; SGPropertyNode_ptr _pitch, _roll, _heading;
SGPropertyNode_ptr _acc_lat, _acc_lon, _acc_down; SGPropertyNode_ptr _acc_lat, _acc_lon, _acc_down;
SGPropertyNode_ptr _temp, _wow; SGPropertyNode_ptr _temp, _wow;
}; };
#endif // _ACMS_HXX #endif // _ACMS_HXX

View file

@ -26,10 +26,9 @@ class SGSocket;
#include <FDM/flight.hxx> #include <FDM/flight.hxx>
class FGADA: public FGInterface { class FGADA : public FGInterface
{
private: private:
SGSocket *fdmsock; SGSocket *fdmsock;
#if 0 #if 0
// Auxilliary Flight Model parameters, basically for HUD // Auxilliary Flight Model parameters, basically for HUD
@ -71,7 +70,6 @@ private:
bool copy_from_FGADA(); bool copy_from_FGADA();
public: public:
FGADA( double dt ); FGADA( double dt );
~FGADA(); ~FGADA();
@ -80,8 +78,6 @@ public:
// update position based on inputs, positions, velocities, etc. // update position based on inputs, positions, velocities, etc.
void update(double dt); void update(double dt);
}; };
#endif // _ADA_HXX #endif // _ADA_HXX

View file

@ -47,7 +47,7 @@
// #define SG_DEGREES_TO_RADIANS 0.0174532925f // #define SG_DEGREES_TO_RADIANS 0.0174532925f
// max. no. gears, maxi. no. engines // max. no. gears, maxi. no. engines
#define AISIM_MAX 4 #define AISIM_MAX 4
#define AISIM_G 32.174f #define AISIM_G 32.174f

View file

@ -25,7 +25,7 @@
FUNCTIONAL DESCRIPTION FUNCTIONAL DESCRIPTION
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
interface to the the hot air balloon simulator interface to the hot air balloon simulator
HISTORY HISTORY
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
@ -55,12 +55,11 @@ HISTORY
/****************************************************************************/ /****************************************************************************/
class FGBalloonSim: public FGInterface { class FGBalloonSim : public FGInterface
{
balloon current_balloon; balloon current_balloon;
public: public:
FGBalloonSim( double dt ); FGBalloonSim( double dt );
~FGBalloonSim(); ~FGBalloonSim();
@ -77,10 +76,5 @@ public:
void update( double dt ); void update( double dt );
}; };
/****************************************************************************/ /****************************************************************************/
#endif /*BalloonSimInterface_H*/ #endif /*BalloonSimInterface_H*/

View file

@ -28,8 +28,8 @@
#include <FDM/flight.hxx> #include <FDM/flight.hxx>
class FGMagicCarpet: public FGInterface { class FGMagicCarpet : public FGInterface
{
public: public:
FGMagicCarpet( double dt ); FGMagicCarpet( double dt );
~FGMagicCarpet(); ~FGMagicCarpet();
@ -39,8 +39,6 @@ public:
// update position based on inputs, positions, velocities, etc. // update position based on inputs, positions, velocities, etc.
void update( double dt ); void update( double dt );
}; };
#endif // _MAGICCARPET_HXX #endif // _MAGICCARPET_HXX

View file

@ -27,15 +27,17 @@
#include "flight.hxx" #include "flight.hxx"
class FGUFO: public FGInterface { class FGUFO : public FGInterface
{
private: private:
class lowpass
class lowpass { {
private: private:
static double _dt; static double _dt;
double _coeff; double _coeff;
double _last; double _last;
bool _initialized; bool _initialized;
public: public:
lowpass(double coeff) : _coeff(coeff), _initialized(false) {} lowpass(double coeff) : _coeff(coeff), _initialized(false) {}
static inline void set_delta(double dt) { _dt = dt; } static inline void set_delta(double dt) { _dt = dt; }
@ -67,8 +69,6 @@ public:
// update position based on inputs, positions, velocities, etc. // update position based on inputs, positions, velocities, etc.
void update( double dt ); void update( double dt );
}; };
#endif // _UFO_HXX #endif // _UFO_HXX

View file

@ -6,7 +6,8 @@
namespace yasim { class FGFDM; }; namespace yasim { class FGFDM; };
class YASim : public FGInterface { class YASim : public FGInterface
{
public: public:
YASim(double dt); YASim(double dt);
~YASim(); ~YASim();
@ -19,8 +20,7 @@ public:
// Run an iteration // Run an iteration
virtual void update(double dt); virtual void update(double dt);
private: private:
void report(); void report();
void copyFromYASim(); void copyFromYASim();
void copyToYASim(bool copyState); void copyToYASim(bool copyState);

View file

@ -57,8 +57,8 @@ public:
FGInterface* getInterface() const; FGInterface* getInterface() const;
static const char* subsystemName() { return "flight"; } static const char* subsystemName() { return "flight"; }
private:
private:
void createImplementation(); void createImplementation();
TankPropertiesList _tankProperties; TankPropertiesList _tankProperties;

View file

@ -99,7 +99,8 @@ class FGAIAircraft;
* life/visibility, computes the track if the * life/visibility, computes the track if the
* position has changed. * position has changed.
*/ */
class TrackComputer { class TrackComputer
{
public: public:
inline TrackComputer( double & track, double & path, const SGGeod & position ) : inline TrackComputer( double & track, double & path, const SGGeod & position ) :
_track( track ), _track( track ),
@ -118,6 +119,7 @@ public:
_path = atan2( d, distance ) * SGD_RADIANS_TO_DEGREES; _path = atan2( d, distance ) * SGD_RADIANS_TO_DEGREES;
} }
} }
private: private:
double & _track; double & _track;
double & _path; double & _path;
@ -126,8 +128,8 @@ private:
}; };
// This is based heavily on LaRCsim/ls_generic.h // This is based heavily on LaRCsim/ls_generic.h
class FGInterface : public SGSubsystem { class FGInterface : public SGSubsystem
{
// Has the init() method been called. This is used to delay // Has the init() method been called. This is used to delay
// initialization until scenery can be loaded and we know the true // initialization until scenery can be loaded and we know the true
// ground elevation. // ground elevation.
@ -221,9 +223,7 @@ class FGInterface : public SGSubsystem {
void set_A_Z_pilot(double z) void set_A_Z_pilot(double z)
{ _set_Accels_Pilot_Body(_state.a_pilot_body_v[0], _state.a_pilot_body_v[1], z); } { _set_Accels_Pilot_Body(_state.a_pilot_body_v[0], _state.a_pilot_body_v[1], z); }
protected: protected:
int _calc_multiloop (double dt); int _calc_multiloop (double dt);
@ -386,7 +386,6 @@ protected:
inline void _set_Climb_Rate(double rate) { _state.climb_rate = rate; } inline void _set_Climb_Rate(double rate) { _state.climb_rate = rate; }
public: public:
FGInterface(); FGInterface();
FGInterface( double dt ); FGInterface( double dt );
virtual ~FGInterface(); virtual ~FGInterface();

View file

@ -30,7 +30,6 @@ class puFont;
class NewGUI : public SGSubsystem class NewGUI : public SGSubsystem
{ {
public: public:
/** /**
* Constructor. * Constructor.
*/ */
@ -174,7 +173,6 @@ public:
static const char* subsystemName() { return "gui"; } static const char* subsystemName() { return "gui"; }
protected: protected:
/** /**
* Test if the menubar is visible. * Test if the menubar is visible.
* *
@ -203,6 +201,7 @@ protected:
bool getMenuBarOverlapHide() const; bool getMenuBarOverlapHide() const;
void setMenuBarOverlapHide(bool hide); void setMenuBarOverlapHide(bool hide);
private: private:
void createMenuBarImplementation(); void createMenuBarImplementation();
@ -237,9 +236,7 @@ private:
// cache of loaded dialog proeprties // cache of loaded dialog proeprties
typedef std::map<std::string,SGPropertyNode_ptr> NameDialogDict; typedef std::map<std::string,SGPropertyNode_ptr> NameDialogDict;
NameDialogDict _dialog_props; NameDialogDict _dialog_props;
}; };
#endif // __NEW_GUI_HXX #endif // __NEW_GUI_HXX

View file

@ -46,7 +46,8 @@ struct FGEventData {
double dt; double dt;
}; };
class FGEventSetting : public SGReferenced { class FGEventSetting : public SGReferenced
{
public: public:
FGEventSetting( SGPropertyNode_ptr base ); FGEventSetting( SGPropertyNode_ptr base );
@ -87,11 +88,11 @@ public:
std::string reportBytes(const std::string& moduleName) const; std::string reportBytes(const std::string& moduleName) const;
virtual void valueChanged(SGPropertyNode * node); virtual void valueChanged(SGPropertyNode * node);
protected: protected:
unsigned int reportId; unsigned int reportId;
std::string nasalFunction; std::string nasalFunction;
bool dirty; bool dirty;
}; };
typedef SGSharedPtr<FGReportSetting> FGReportSetting_ptr; typedef SGSharedPtr<FGReportSetting> FGReportSetting_ptr;
@ -119,9 +120,10 @@ typedef std::vector<FGReportSetting_ptr> report_setting_list_t;
* </event> * </event>
*/ */
class FGInputDevice; class FGInputDevice;
class FGInputEvent : public SGReferenced,FGCommonInput { class FGInputEvent : public SGReferenced,
FGCommonInput
{
public: public:
/* /*
* Constructor for the class. The arg node shall point * Constructor for the class. The arg node shall point
* to the property corresponding to the <event> node * to the property corresponding to the <event> node
@ -170,7 +172,8 @@ protected:
double lastSettingValue; double lastSettingValue;
}; };
class FGButtonEvent : public FGInputEvent { class FGButtonEvent : public FGInputEvent
{
public: public:
FGButtonEvent( FGInputDevice * device, SGPropertyNode_ptr node ); FGButtonEvent( FGInputDevice * device, SGPropertyNode_ptr node );
virtual void fire( FGEventData & eventData ); virtual void fire( FGEventData & eventData );
@ -181,7 +184,8 @@ protected:
bool lastState; bool lastState;
}; };
class FGAxisEvent : public FGInputEvent { class FGAxisEvent : public FGInputEvent
{
public: public:
FGAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node ); FGAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node );
~FGAxisEvent(); ~FGAxisEvent();
@ -189,6 +193,7 @@ public:
void SetMaxRange( double value ) { maxRange = value; } void SetMaxRange( double value ) { maxRange = value; }
void SetMinRange( double value ) { minRange = value; } void SetMinRange( double value ) { minRange = value; }
void SetRange( double min, double max ) { minRange = min; maxRange = max; } void SetRange( double min, double max ) { minRange = min; maxRange = max; }
protected: protected:
virtual void fire( FGEventData & eventData ); virtual void fire( FGEventData & eventData );
double tolerance; double tolerance;
@ -203,16 +208,20 @@ protected:
bool mirrorInterpolater = false; bool mirrorInterpolater = false;
}; };
class FGRelAxisEvent : public FGAxisEvent { class FGRelAxisEvent : public FGAxisEvent
{
public: public:
FGRelAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node ); FGRelAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node );
protected: protected:
virtual void fire( SGBinding * binding, FGEventData & eventData ); virtual void fire( SGBinding * binding, FGEventData & eventData );
}; };
class FGAbsAxisEvent : public FGAxisEvent { class FGAbsAxisEvent : public FGAxisEvent
{
public: public:
FGAbsAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node ) : FGAxisEvent( device, node ) {} FGAbsAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node ) : FGAxisEvent( device, node ) {}
protected: protected:
virtual void fire( SGBinding * binding, FGEventData & eventData ); virtual void fire( SGBinding * binding, FGEventData & eventData );
}; };
@ -224,7 +233,8 @@ typedef class SGSharedPtr<FGInputEvent> FGInputEvent_ptr;
* all operating systems. This is the base class for the O/S-specific * all operating systems. This is the base class for the O/S-specific
* implementation of input device handlers * implementation of input device handlers
*/ */
class FGInputDevice : public SGReferenced { class FGInputDevice : public SGReferenced
{
public: public:
FGInputDevice() {} FGInputDevice() {}
FGInputDevice( std::string aName, std::string aSerial = {} ) : FGInputDevice( std::string aName, std::string aSerial = {} ) :
@ -306,7 +316,9 @@ typedef SGSharedPtr<FGInputDevice> FGInputDevice_ptr;
/* /*
* The Subsystem for the event input device * The Subsystem for the event input device
*/ */
class FGEventInput : public SGSubsystem,FGCommonInput { class FGEventInput : public SGSubsystem,
FGCommonInput
{
public: public:
FGEventInput(); FGEventInput();
virtual ~FGEventInput(); virtual ~FGEventInput();
@ -317,6 +329,7 @@ public:
const static unsigned MAX_DEVICES = 1000; const static unsigned MAX_DEVICES = 1000;
const static unsigned INVALID_DEVICE_INDEX = MAX_DEVICES + 1; const static unsigned INVALID_DEVICE_INDEX = MAX_DEVICES + 1;
protected: protected:
static const char * PROPERTY_ROOT; static const char * PROPERTY_ROOT;

View file

@ -46,6 +46,7 @@ public:
void shutdown() override; void shutdown() override;
static const char* subsystemName() { return "input-hid"; } static const char* subsystemName() { return "input-hid"; }
private: private:
class FGHIDEventInputPrivate; class FGHIDEventInputPrivate;

View file

@ -36,7 +36,9 @@
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// The Joystick Input Class // The Joystick Input Class
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
class FGJoystickInput : public SGSubsystem,FGCommonInput { class FGJoystickInput : public SGSubsystem,
FGCommonInput
{
public: public:
FGJoystickInput(); FGJoystickInput();
virtual ~FGJoystickInput(); virtual ~FGJoystickInput();
@ -101,7 +103,6 @@ private:
joystick joysticks[MAX_JOYSTICKS]; joystick joysticks[MAX_JOYSTICKS];
void updateJoystick(int index, joystick* joy, double dt); void updateJoystick(int index, joystick* joy, double dt);
}; };
#endif #endif

View file

@ -37,7 +37,9 @@
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// The Keyboard Input Class // The Keyboard Input Class
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
class FGKeyboardInput : public SGSubsystem,FGCommonInput { class FGKeyboardInput : public SGSubsystem,
FGCommonInput
{
public: public:
FGKeyboardInput(); FGKeyboardInput();
virtual ~FGKeyboardInput(); virtual ~FGKeyboardInput();

View file

@ -39,7 +39,8 @@ struct FGLinuxEventData : public FGEventData {
/* /*
* A implementation for linux event devices * A implementation for linux event devices
*/ */
class FGLinuxInputDevice : public FGInputDevice { class FGLinuxInputDevice : public FGInputDevice
{
public: public:
FGLinuxInputDevice(); FGLinuxInputDevice();
FGLinuxInputDevice( std::string name, std::string devname, std::string aSerial ); FGLinuxInputDevice( std::string name, std::string devname, std::string aSerial );
@ -56,6 +57,7 @@ public:
int GetFd() { return fd; } int GetFd() { return fd; }
double Normalize( struct input_event & event ); double Normalize( struct input_event & event );
private: private:
std::string devname; std::string devname;
int fd; int fd;
@ -63,7 +65,8 @@ private:
std::map<unsigned int,input_absinfo> absinfo; std::map<unsigned int,input_absinfo> absinfo;
}; };
class FGLinuxEventInput : public FGEventInput { class FGLinuxEventInput : public FGEventInput
{
public: public:
FGLinuxEventInput(); FGLinuxEventInput();
virtual ~ FGLinuxEventInput(); virtual ~ FGLinuxEventInput();

View file

@ -42,7 +42,8 @@ struct FGMacOSXEventData : public FGEventData {
// //
// Mac OS X specific FGEventInput // Mac OS X specific FGEventInput
// //
class FGMacOSXEventInput : public FGEventInput { class FGMacOSXEventInput : public FGEventInput
{
public: public:
FGMacOSXEventInput(); FGMacOSXEventInput();
@ -51,6 +52,7 @@ public:
virtual void init(); virtual void init();
virtual void postinit(); virtual void postinit();
virtual void shutdown(); virtual void shutdown();
private: private:
friend class FGMacOSXEventInputPrivate; friend class FGMacOSXEventInputPrivate;

View file

@ -38,7 +38,9 @@ namespace osgGA { class GUIEventAdapter; }
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
// The Mouse Input Class // The Mouse Input Class
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
class FGMouseInput : public SGSubsystem, FGCommonInput { class FGMouseInput : public SGSubsystem,
FGCommonInput
{
public: public:
FGMouseInput(); FGMouseInput();
virtual ~FGMouseInput() = default; virtual ~FGMouseInput() = default;
@ -64,12 +66,12 @@ public:
* @brief check if the active mode passes clicks through to the UI or not * @brief check if the active mode passes clicks through to the UI or not
*/ */
bool isActiveModePassThrough() const; bool isActiveModePassThrough() const;
private: private:
void processMotion(int x, int y, const osgGA::GUIEventAdapter* ea); void processMotion(int x, int y, const osgGA::GUIEventAdapter* ea);
class FGMouseInputPrivate; class FGMouseInputPrivate;
std::unique_ptr<FGMouseInputPrivate> d; std::unique_ptr<FGMouseInputPrivate> d;
}; };
#endif #endif

View file

@ -56,7 +56,6 @@ public:
virtual ~FGInput(); virtual ~FGInput();
static const char* subsystemName() { return "input"; } static const char* subsystemName() { return "input"; }
}; };
#endif // _INPUT_HXX #endif // _INPUT_HXX

View file

@ -40,7 +40,8 @@ class fntTexFont;
class FGViewer; class FGViewer;
class ClipBox; class ClipBox;
class LineSegment { class LineSegment
{
public: public:
LineSegment(GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1) LineSegment(GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1)
: _x0(x0), _y0(y0), _x1(x1), _y1(y1) {} : _x0(x0), _y0(y0), _x1(x1), _y1(y1) {}
@ -56,7 +57,8 @@ private:
class LineList { class LineList
{
public: public:
void add(const LineSegment& seg) { _list.push_back(seg); } void add(const LineSegment& seg) { _list.push_back(seg); }
void erase() { _list.erase(_list.begin(), _list.end()); } void erase() { _list.erase(_list.begin(), _list.end()); }
@ -76,7 +78,8 @@ private:
class HUDText { class HUDText
{
public: public:
HUDText(fntRenderer *f, float x, float y, const char *s, int align = 0, int digits = 0); HUDText(fntRenderer *f, float x, float y, const char *s, int align = 0, int digits = 0);
void draw(); void draw();
@ -91,7 +94,8 @@ private:
class TextList { class TextList
{
public: public:
TextList() { _font = 0; } TextList() { _font = 0; }
@ -111,7 +115,9 @@ private:
class HUD : public SGSubsystem, public SGPropertyChangeListener { class HUD : public SGSubsystem,
public SGPropertyChangeListener
{
public: public:
HUD(); HUD();
~HUD(); ~HUD();

View file

@ -74,8 +74,8 @@ typedef airport_id_str_map_type::iterator airport_id_str_map_iterator;
typedef std::vector<KLN89Page*> kln89_page_list_type; typedef std::vector<KLN89Page*> kln89_page_list_type;
typedef kln89_page_list_type::iterator kln89_page_list_itr; typedef kln89_page_list_type::iterator kln89_page_list_itr;
class KLN89 : public DCLGPS { class KLN89 : public DCLGPS
{
friend class KLN89Page; friend class KLN89Page;
friend class KLN89AptPage; friend class KLN89AptPage;
friend class KLN89VorPage; friend class KLN89VorPage;

View file

@ -39,9 +39,7 @@ class SGSampleGroup;
*/ */
class ADF : public AbstractInstrument class ADF : public AbstractInstrument
{ {
public: public:
ADF ( SGPropertyNode *node ); ADF ( SGPropertyNode *node );
virtual ~ADF (); virtual ~ADF ();
@ -49,7 +47,6 @@ public:
virtual void update (double delta_time_sec); virtual void update (double delta_time_sec);
private: private:
void set_bearing (double delta_time_sec, double bearing); void set_bearing (double delta_time_sec, double bearing);
void search (double frequency, const SGGeod& pos); void search (double frequency, const SGGeod& pos);
@ -82,5 +79,4 @@ private:
SGSharedPtr<SGSampleGroup> _sgr; SGSharedPtr<SGSampleGroup> _sgr;
}; };
#endif // __INSTRUMENTS_ADF_HXX #endif // __INSTRUMENTS_ADF_HXX

View file

@ -36,9 +36,7 @@ class FGEnvironmentMgr;
*/ */
class AirspeedIndicator : public SGSubsystem class AirspeedIndicator : public SGSubsystem
{ {
public: public:
AirspeedIndicator ( SGPropertyNode *node ); AirspeedIndicator ( SGPropertyNode *node );
virtual ~AirspeedIndicator (); virtual ~AirspeedIndicator ();

View file

@ -29,9 +29,7 @@
*/ */
class Altimeter : public SGSubsystem class Altimeter : public SGSubsystem
{ {
public: public:
Altimeter (SGPropertyNode *node, const std::string& aDefaultName, double quantum = 0); Altimeter (SGPropertyNode *node, const std::string& aDefaultName, double quantum = 0);
virtual ~Altimeter (); virtual ~Altimeter ();

View file

@ -38,9 +38,7 @@
*/ */
class AttitudeIndicator : public SGSubsystem class AttitudeIndicator : public SGSubsystem
{ {
public: public:
AttitudeIndicator ( SGPropertyNode *node ); AttitudeIndicator ( SGPropertyNode *node );
virtual ~AttitudeIndicator (); virtual ~AttitudeIndicator ();
@ -51,7 +49,6 @@ public:
virtual void update (double dt); virtual void update (double dt);
private: private:
std::string _name; std::string _name;
int _num; int _num;
std::string _suction; std::string _suction;

View file

@ -26,7 +26,8 @@
* /instrumentation/clock/indicated-sec * /instrumentation/clock/indicated-sec
* /instrumentation/clock/indicated-string * /instrumentation/clock/indicated-string
*/ */
class Clock : public SGSubsystem { class Clock : public SGSubsystem
{
public: public:
Clock(SGPropertyNode *node); Clock(SGPropertyNode *node);
virtual ~Clock(); virtual ~Clock();

View file

@ -454,8 +454,9 @@ private:
/* ------------- The CommRadio implementation ---------------------- */ /* ------------- The CommRadio implementation ---------------------- */
class CommRadioImpl: public CommRadio, OutputProperties { class CommRadioImpl: public CommRadio,
OutputProperties
{
public: public:
CommRadioImpl(SGPropertyNode_ptr node); CommRadioImpl(SGPropertyNode_ptr node);
virtual ~CommRadioImpl(); virtual ~CommRadioImpl();
@ -487,7 +488,6 @@ private:
void updateAudio(); void updateAudio();
SGSampleGroup* _sampleGroup = nullptr; SGSampleGroup* _sampleGroup = nullptr;
}; };
CommRadioImpl::CommRadioImpl(SGPropertyNode_ptr node) : CommRadioImpl::CommRadioImpl(SGPropertyNode_ptr node) :

View file

@ -28,7 +28,8 @@
namespace Instrumentation { namespace Instrumentation {
class SignalQualityComputer : public SGReferenced { class SignalQualityComputer : public SGReferenced
{
public: public:
virtual ~SignalQualityComputer(); virtual ~SignalQualityComputer();
virtual double computeSignalQuality( double distance_nm ) const = 0; virtual double computeSignalQuality( double distance_nm ) const = 0;

View file

@ -94,7 +94,8 @@ typedef std::map < std::string, gps_waypoint_array > gps_waypoint_map;
typedef gps_waypoint_map::iterator gps_waypoint_map_iterator; typedef gps_waypoint_map::iterator gps_waypoint_map_iterator;
typedef gps_waypoint_map::const_iterator gps_waypoint_map_const_iterator; typedef gps_waypoint_map::const_iterator gps_waypoint_map_const_iterator;
class GPSFlightPlan { class GPSFlightPlan
{
public: public:
std::vector<GPSWaypoint*> waypoints; std::vector<GPSWaypoint*> waypoints;
inline bool IsEmpty() { return waypoints.empty(); } inline bool IsEmpty() { return waypoints.empty(); }
@ -102,12 +103,13 @@ public:
// TODO - probably de-public the internals of the next 2 classes and add some methods! // TODO - probably de-public the internals of the next 2 classes and add some methods!
// Instrument approach procedure base class // Instrument approach procedure base class
class FGIAP { class FGIAP
{
public: public:
FGIAP(); FGIAP();
virtual ~FGIAP() = 0; virtual ~FGIAP() = 0;
//protected:
//protected:
std::string _aptIdent; // The ident of the airport this approach is for std::string _aptIdent; // The ident of the airport this approach is for
std::string _ident; // The approach ident. std::string _ident; // The approach ident.
std::string _name; // The full approach name. std::string _name; // The full approach name.
@ -116,10 +118,12 @@ public:
}; };
// Non-precision instrument approach procedure // Non-precision instrument approach procedure
class FGNPIAP : public FGIAP { class FGNPIAP : public FGIAP
{
public: public:
FGNPIAP(); FGNPIAP();
~FGNPIAP(); ~FGNPIAP();
//private: //private:
public: public:
std::vector<GPSFlightPlan*> _approachRoutes; // The approach route(s) from the IAF(s) to the IF. std::vector<GPSFlightPlan*> _approachRoutes; // The approach route(s) from the IAF(s) to the IF.
@ -133,8 +137,8 @@ typedef std::map < std::string, iap_list_type > iap_map_type;
typedef iap_map_type::iterator iap_map_iterator; typedef iap_map_type::iterator iap_map_iterator;
// A class to encapsulate hr:min representation of time. // A class to encapsulate hr:min representation of time.
class ClockTime
class ClockTime { {
public: public:
ClockTime(); ClockTime();
ClockTime(int hr, int min); ClockTime(int hr, int min);
@ -168,8 +172,8 @@ private:
// AlignedProjection - a class to project an area local to a runway onto an orthogonal co-ordinate system // AlignedProjection - a class to project an area local to a runway onto an orthogonal co-ordinate system
// with the origin at the threshold and the runway aligned with the y axis. // with the origin at the threshold and the runway aligned with the y axis.
class AlignedProjection { class AlignedProjection
{
public: public:
AlignedProjection(); AlignedProjection();
AlignedProjection(const SGGeod& centre, double heading); AlignedProjection(const SGGeod& centre, double heading);
@ -187,14 +191,13 @@ private:
SGGeod _origin; // lat/lon of local area origin (the threshold) SGGeod _origin; // lat/lon of local area origin (the threshold)
double _theta; // the rotation angle for alignment in radians double _theta; // the rotation angle for alignment in radians
double _correction_factor; // Reduction in surface distance per degree of longitude due to latitude. Saves having to do a cos() every call. double _correction_factor; // Reduction in surface distance per degree of longitude due to latitude. Saves having to do a cos() every call.
}; };
// ------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// TODO - merge generic GPS functions instead and split out KLN specific stuff. // TODO - merge generic GPS functions instead and split out KLN specific stuff.
class DCLGPS : public SGSubsystem { class DCLGPS : public SGSubsystem
{
public: public:
DCLGPS(RenderArea2D* instrument); DCLGPS(RenderArea2D* instrument);
virtual ~DCLGPS() = 0; virtual ~DCLGPS() = 0;
@ -326,7 +329,6 @@ protected:
// Data and lookup functions // Data and lookup functions
protected: protected:
void LoadApproachData(); void LoadApproachData();
@ -445,6 +447,7 @@ protected:
ClockTime _powerOnTime; // Time (hr:min) of unit power-up. ClockTime _powerOnTime; // Time (hr:min) of unit power-up.
bool _powerOnTimerSet; // Indicates that we have set the above following power-up. bool _powerOnTimerSet; // Indicates that we have set the above following power-up.
void SetPowerOnTimer(); void SetPowerOnTimer();
public: public:
void ResetPowerOnTimer(); void ResetPowerOnTimer();
// Set the alarm to go off at a given time. // Set the alarm to go off at a given time.
@ -453,6 +456,7 @@ public:
_alarmTime.set_min(min); _alarmTime.set_min(min);
_alarmSet = true; _alarmSet = true;
} }
protected: protected:
ClockTime _alarmTime; ClockTime _alarmTime;
bool _alarmSet; bool _alarmSet;
@ -487,6 +491,7 @@ protected:
// More hackery since we aren't actually storing an approach class... Doh! // More hackery since we aren't actually storing an approach class... Doh!
std::string _approachAbbrev; std::string _approachAbbrev;
std::string _approachRwyStr; std::string _approachRwyStr;
private: private:
simgear::TiedPropertyList _tiedProperties; simgear::TiedPropertyList _tiedProperties;
}; };

View file

@ -34,9 +34,7 @@ class FGNavRecord;
*/ */
class DME : public AbstractInstrument class DME : public AbstractInstrument
{ {
public: public:
DME ( SGPropertyNode *node ); DME ( SGPropertyNode *node );
virtual ~DME (); virtual ~DME ();
@ -70,5 +68,4 @@ private:
class AudioIdent * _audioIdent; class AudioIdent * _audioIdent;
}; };
#endif // __INSTRUMENTS_DME_HXX #endif // __INSTRUMENTS_DME_HXX

View file

@ -251,12 +251,12 @@ private:
#endif #endif
// command handlers // command handlers
void selectLegMode(); void selectLegMode();
void selectOBSMode(flightgear::Waypt* waypt); void selectOBSMode(flightgear::Waypt* waypt);
void directTo(); void directTo();
// tied-property getter/setters // tied-property getter/setters
void setCommand(const char* aCmd); void setCommand(const char* aCmd);
const char* getCommand() const { return ""; } const char* getCommand() const { return ""; }
@ -315,7 +315,7 @@ private:
void tieSGGeodReadOnly(SGPropertyNode* aNode, SGGeod& aRef, void tieSGGeodReadOnly(SGPropertyNode* aNode, SGGeod& aRef,
const char* lonStr, const char* latStr, const char* altStr); const char* lonStr, const char* latStr, const char* altStr);
// FlightPlan::Delegate // FlightPlan::Delegate
virtual void currentWaypointChanged(); virtual void currentWaypointChanged();
virtual void waypointsChanged(); virtual void waypointsChanged();
virtual void cleared(); virtual void cleared();
@ -325,7 +325,7 @@ private:
void routeManagerFlightPlanChanged(SGPropertyNode*); void routeManagerFlightPlanChanged(SGPropertyNode*);
void routeActivated(SGPropertyNode*); void routeActivated(SGPropertyNode*);
// members // members
SGPropertyNode_ptr _gpsNode; SGPropertyNode_ptr _gpsNode;
SGPropertyNode_ptr _currentWayptNode; SGPropertyNode_ptr _currentWayptNode;
SGPropertyNode_ptr _magvar_node; SGPropertyNode_ptr _magvar_node;
@ -377,12 +377,12 @@ private:
SGGeod _indicated_pos; SGGeod _indicated_pos;
double _legDistanceNm; double _legDistanceNm;
// scratch data // scratch data
SGGeod _scratchPos; SGGeod _scratchPos;
SGPropertyNode_ptr _scratchNode; SGPropertyNode_ptr _scratchNode;
bool _scratchValid; bool _scratchValid;
#if FG_210_COMPAT #if FG_210_COMPAT
// search data // search data
int _searchResultIndex; int _searchResultIndex;
std::string _searchQuery; std::string _searchQuery;
FGPositioned::Type _searchType; FGPositioned::Type _searchType;
@ -393,7 +393,7 @@ private:
bool _searchNames; ///< set if we're searching names instead of idents bool _searchNames; ///< set if we're searching names instead of idents
#endif #endif
// turn data // turn data
bool _computeTurnData; ///< do we need to update the turn data? bool _computeTurnData; ///< do we need to update the turn data?
bool _anticipateTurn; ///< are we anticipating the next turn or not? bool _anticipateTurn; ///< are we anticipating the next turn or not?
bool _inTurn; // is a turn in progress? bool _inTurn; // is a turn in progress?
@ -409,7 +409,7 @@ private:
flightgear::WayptRef _prevWaypt; flightgear::WayptRef _prevWaypt;
flightgear::WayptRef _currentWaypt; flightgear::WayptRef _currentWaypt;
// autopilot drive properties // autopilot drive properties
SGPropertyNode_ptr _apDrivingFlag; SGPropertyNode_ptr _apDrivingFlag;
SGPropertyNode_ptr _apTrueHeading; SGPropertyNode_ptr _apTrueHeading;

View file

@ -34,9 +34,7 @@
*/ */
class HeadingIndicator : public SGSubsystem class HeadingIndicator : public SGSubsystem
{ {
public: public:
HeadingIndicator ( SGPropertyNode *node ); HeadingIndicator ( SGPropertyNode *node );
HeadingIndicator (); HeadingIndicator ();
virtual ~HeadingIndicator (); virtual ~HeadingIndicator ();
@ -48,7 +46,6 @@ public:
virtual void update (double dt); virtual void update (double dt);
private: private:
Gyro _gyro; Gyro _gyro;
double _last_heading_deg; double _last_heading_deg;
@ -62,7 +59,6 @@ private:
SGPropertyNode_ptr _heading_out_node; SGPropertyNode_ptr _heading_out_node;
SGPropertyNode_ptr _heading_bug_error_node; SGPropertyNode_ptr _heading_bug_error_node;
SGPropertyNode_ptr _heading_bug_node; SGPropertyNode_ptr _heading_bug_node;
}; };
#endif // __INSTRUMENTS_HEADING_INDICATOR_HXX #endif // __INSTRUMENTS_HEADING_INDICATOR_HXX

View file

@ -32,9 +32,7 @@
*/ */
class HeadingIndicatorDG : public SGSubsystem class HeadingIndicatorDG : public SGSubsystem
{ {
public: public:
HeadingIndicatorDG ( SGPropertyNode *node ); HeadingIndicatorDG ( SGPropertyNode *node );
HeadingIndicatorDG (); HeadingIndicatorDG ();
virtual ~HeadingIndicatorDG (); virtual ~HeadingIndicatorDG ();
@ -46,7 +44,6 @@ public:
virtual void update (double dt); virtual void update (double dt);
private: private:
Gyro _gyro; Gyro _gyro;
double _last_heading_deg, _last_indicated_heading_dg; double _last_heading_deg, _last_indicated_heading_dg;

View file

@ -34,9 +34,7 @@
*/ */
class HeadingIndicatorFG : public SGSubsystem class HeadingIndicatorFG : public SGSubsystem
{ {
public: public:
HeadingIndicatorFG ( SGPropertyNode *node ); HeadingIndicatorFG ( SGPropertyNode *node );
HeadingIndicatorFG (); HeadingIndicatorFG ();
virtual ~HeadingIndicatorFG (); virtual ~HeadingIndicatorFG ();
@ -48,7 +46,6 @@ public:
virtual void update (double dt); virtual void update (double dt);
private: private:
Gyro _gyro; Gyro _gyro;
double _last_heading_deg; double _last_heading_deg;
@ -63,9 +60,6 @@ private:
SGPropertyNode_ptr _error_node; SGPropertyNode_ptr _error_node;
SGPropertyNode_ptr _nav1_error_node; SGPropertyNode_ptr _nav1_error_node;
SGPropertyNode_ptr _off_node; SGPropertyNode_ptr _off_node;
}; };
#endif // __INSTRUMENTS_HEADING_INDICATOR_HXX #endif // __INSTRUMENTS_HEADING_INDICATOR_HXX

View file

@ -50,9 +50,7 @@ class SGInterpTable;
*/ */
class InstVerticalSpeedIndicator : public SGSubsystem class InstVerticalSpeedIndicator : public SGSubsystem
{ {
public: public:
InstVerticalSpeedIndicator ( SGPropertyNode *node ); InstVerticalSpeedIndicator ( SGPropertyNode *node );
virtual ~InstVerticalSpeedIndicator (); virtual ~InstVerticalSpeedIndicator ();
@ -61,7 +59,6 @@ public:
virtual void update (double dt); virtual void update (double dt);
private: private:
std::string _name; std::string _name;
int _num; int _num;

View file

@ -28,7 +28,6 @@
class FGInstrumentMgr : public SGSubsystemGroup class FGInstrumentMgr : public SGSubsystemGroup
{ {
public: public:
FGInstrumentMgr (); FGInstrumentMgr ();
virtual ~FGInstrumentMgr (); virtual ~FGInstrumentMgr ();

View file

@ -185,5 +185,4 @@ public:
inline bool get_et_ann() const { return et_ann; } inline bool get_et_ann() const { return et_ann; }
}; };
#endif // _FG_KR_87_HXX #endif // _FG_KR_87_HXX

View file

@ -40,9 +40,7 @@
*/ */
class MagCompass : public SGSubsystem class MagCompass : public SGSubsystem
{ {
public: public:
MagCompass ( SGPropertyNode *node); MagCompass ( SGPropertyNode *node);
MagCompass (); MagCompass ();
virtual ~MagCompass (); virtual ~MagCompass ();
@ -52,7 +50,6 @@ public:
virtual void update (double dt); virtual void update (double dt);
private: private:
double _rate_degps; double _rate_degps;
std::string _name; std::string _name;
@ -71,7 +68,6 @@ private:
SGPropertyNode_ptr _y_accel_node; SGPropertyNode_ptr _y_accel_node;
SGPropertyNode_ptr _z_accel_node; SGPropertyNode_ptr _z_accel_node;
SGPropertyNode_ptr _out_node; SGPropertyNode_ptr _out_node;
}; };
#endif // __INSTRUMENTS_MAG_COMPASS_HXX #endif // __INSTRUMENTS_MAG_COMPASS_HXX

View file

@ -33,7 +33,6 @@ class SGSampleGroup;
class FGMarkerBeacon : public AbstractInstrument class FGMarkerBeacon : public AbstractInstrument
{ {
// Inputs // Inputs
SGPropertyNode_ptr lon_node; SGPropertyNode_ptr lon_node;
SGPropertyNode_ptr lat_node; SGPropertyNode_ptr lat_node;
@ -57,7 +56,6 @@ class FGMarkerBeacon : public AbstractInstrument
SGSharedPtr<SGSampleGroup> _sgr; SGSharedPtr<SGSampleGroup> _sgr;
public: public:
enum fgMkrBeacType { enum fgMkrBeacType {
NOBEACON = 0, NOBEACON = 0,
INNER, INNER,

View file

@ -35,9 +35,7 @@
class MasterReferenceGyro : public SGSubsystem class MasterReferenceGyro : public SGSubsystem
{ {
public: public:
MasterReferenceGyro ( SGPropertyNode *node ); MasterReferenceGyro ( SGPropertyNode *node );
MasterReferenceGyro (); MasterReferenceGyro ();
virtual ~MasterReferenceGyro (); virtual ~MasterReferenceGyro ();
@ -49,7 +47,6 @@ public:
virtual void update (double dt); virtual void update (double dt);
private: private:
static const double gravity; //conversion factor static const double gravity; //conversion factor
std::string _name; std::string _name;

View file

@ -34,7 +34,8 @@
class SGSampleGroup; class SGSampleGroup;
class FGNavRadio : public AbstractInstrument, public SGPropertyChangeListener class FGNavRadio : public AbstractInstrument,
public SGPropertyChangeListener
{ {
SGPropertyNode_ptr _radio_node; SGPropertyNode_ptr _radio_node;
@ -165,11 +166,10 @@ class FGNavRadio : public AbstractInstrument, public SGPropertyChangeListener
FGNavRecord* findPrimaryNavaid(const SGGeod& aPos, double aFreqMHz); FGNavRecord* findPrimaryNavaid(const SGGeod& aPos, double aFreqMHz);
// implement SGPropertyChangeListener // implement SGPropertyChangeListener
virtual void valueChanged (SGPropertyNode * prop); virtual void valueChanged (SGPropertyNode * prop);
public:
public:
FGNavRadio(SGPropertyNode *node); FGNavRadio(SGPropertyNode *node);
~FGNavRadio(); ~FGNavRadio();
@ -182,5 +182,4 @@ public:
void updateNav(); void updateNav();
}; };
#endif // _FG_NAVRADIO_HXX #endif // _FG_NAVRADIO_HXX

View file

@ -802,13 +802,15 @@ void GS::display( NavIndicator & navIndicator )
/* ------------- The NavRadio implementation ---------------------- */ /* ------------- The NavRadio implementation ---------------------- */
class NavRadioImpl : public NavRadio { class NavRadioImpl : public NavRadio
{
public: public:
NavRadioImpl( SGPropertyNode_ptr node ); NavRadioImpl( SGPropertyNode_ptr node );
virtual ~NavRadioImpl(); virtual ~NavRadioImpl();
virtual void update( double dt ); virtual void update( double dt );
virtual void init(); virtual void init();
private: private:
void search(); void search();
@ -818,6 +820,7 @@ private:
void init(); void init();
void update( double dt ); void update( double dt );
private: private:
NavRadioImpl * _navRadioImpl; NavRadioImpl * _navRadioImpl;
SGPropertyNode_ptr is_valid_node; SGPropertyNode_ptr is_valid_node;

View file

@ -27,6 +27,7 @@
#include <simgear/structure/subsystem_mgr.hxx> #include <simgear/structure/subsystem_mgr.hxx>
namespace Instrumentation { namespace Instrumentation {
class NavRadio : public SGSubsystem class NavRadio : public SGSubsystem
{ {
public: public:

View file

@ -31,12 +31,10 @@
class RadarAltimeter : public SGSubsystem class RadarAltimeter : public SGSubsystem
{ {
public: public:
RadarAltimeter ( SGPropertyNode *node ); RadarAltimeter ( SGPropertyNode *node );
virtual ~RadarAltimeter (); virtual ~RadarAltimeter ();
private: private:
virtual void init (); virtual void init ();
virtual void update (double dt); virtual void update (double dt);
@ -54,7 +52,6 @@ private:
SGPropertyNode_ptr _serviceable_node; SGPropertyNode_ptr _serviceable_node;
SGPropertyNode_ptr _sceneryLoaded; SGPropertyNode_ptr _sceneryLoaded;
SGVec3d _antennaOffset; // in aircraft local XYZ frame SGVec3d _antennaOffset; // in aircraft local XYZ frame
std::string _name; std::string _name;
@ -63,7 +60,6 @@ private:
double _interval; double _interval;
double _min_radalt; double _min_radalt;
}; };
#endif // _INST_AGRADAR_HXX #endif // _INST_AGRADAR_HXX

View file

@ -30,9 +30,7 @@
*/ */
class SlipSkidBall : public SGSubsystem class SlipSkidBall : public SGSubsystem
{ {
public: public:
SlipSkidBall ( SGPropertyNode *node ); SlipSkidBall ( SGPropertyNode *node );
virtual ~SlipSkidBall (); virtual ~SlipSkidBall ();
@ -49,7 +47,6 @@ private:
SGPropertyNode_ptr _z_accel_node; SGPropertyNode_ptr _z_accel_node;
SGPropertyNode_ptr _out_node; SGPropertyNode_ptr _out_node;
SGPropertyNode_ptr _override_node; SGPropertyNode_ptr _override_node;
}; };
#endif // __INSTRUMENTS_SLIP_SKID_BALL_HXX #endif // __INSTRUMENTS_SLIP_SKID_BALL_HXX

View file

@ -31,11 +31,10 @@
* /instrumentation/"name"/indicated-ground-speed-kt * /instrumentation/"name"/indicated-ground-speed-kt
* /instrumentation/"name"/indicated-time-kt * /instrumentation/"name"/indicated-time-kt
*/ */
class TACAN : public SGSubsystem, public SGPropertyChangeListener class TACAN : public SGSubsystem,
public SGPropertyChangeListener
{ {
public:
public:
TACAN(SGPropertyNode *node); TACAN(SGPropertyNode *node);
virtual ~TACAN(); virtual ~TACAN();
@ -43,8 +42,7 @@ class TACAN : public SGSubsystem, public SGPropertyChangeListener
virtual void reinit (); virtual void reinit ();
virtual void update (double delta_time_sec); virtual void update (double delta_time_sec);
private: private:
void disabled(bool force = false); void disabled(bool force = false);
void search (double frequency, const SGGeod& pos); void search (double frequency, const SGGeod& pos);
@ -89,5 +87,4 @@ class TACAN : public SGSubsystem, public SGPropertyChangeListener
int _listener_active; int _listener_active;
}; };
#endif // __INSTRUMENTS_TACAN_HXX #endif // __INSTRUMENTS_TACAN_HXX

View file

@ -50,7 +50,6 @@ class SGSampleGroup;
class TCAS : public SGSubsystem class TCAS : public SGSubsystem
{ {
typedef enum typedef enum
{ {
AdvisoryClear = 0, /*< Clear of traffic */ AdvisoryClear = 0, /*< Clear of traffic */

View file

@ -27,7 +27,8 @@
#include <simgear/structure/subsystem_mgr.hxx> #include <simgear/structure/subsystem_mgr.hxx>
#include <simgear/props/tiedpropertylist.hxx> #include <simgear/props/tiedpropertylist.hxx>
class Transponder : public AbstractInstrument, public SGPropertyChangeListener class Transponder : public AbstractInstrument,
public SGPropertyChangeListener
{ {
public: public:
Transponder(SGPropertyNode *node); Transponder(SGPropertyNode *node);
@ -42,15 +43,13 @@ protected:
bool isPowerSwitchOn() const override; bool isPowerSwitchOn() const override;
private: private:
enum Mode enum Mode {
{
MODE_A = 0, MODE_A = 0,
MODE_C, MODE_C,
MODE_S MODE_S
}; };
enum KnobPosition enum KnobPosition {
{
KNOB_OFF = 0, KNOB_OFF = 0,
KNOB_STANDBY, KNOB_STANDBY,
KNOB_TEST, KNOB_TEST,

View file

@ -37,9 +37,7 @@
*/ */
class TurnIndicator : public SGSubsystem class TurnIndicator : public SGSubsystem
{ {
public: public:
TurnIndicator ( SGPropertyNode *node ); TurnIndicator ( SGPropertyNode *node );
virtual ~TurnIndicator (); virtual ~TurnIndicator ();
@ -50,7 +48,6 @@ public:
virtual void update (double dt); virtual void update (double dt);
private: private:
Gyro _gyro; Gyro _gyro;
double _last_rate; double _last_rate;
@ -61,7 +58,6 @@ private:
SGPropertyNode_ptr _yaw_rate_node; SGPropertyNode_ptr _yaw_rate_node;
SGPropertyNode_ptr _electric_current_node; SGPropertyNode_ptr _electric_current_node;
SGPropertyNode_ptr _rate_out_node; SGPropertyNode_ptr _rate_out_node;
}; };
#endif // __INSTRUMENTS_TURN_INDICATOR_HXX #endif // __INSTRUMENTS_TURN_INDICATOR_HXX

View file

@ -33,9 +33,7 @@
*/ */
class VerticalSpeedIndicator : public SGSubsystem class VerticalSpeedIndicator : public SGSubsystem
{ {
public: public:
VerticalSpeedIndicator ( SGPropertyNode *node ); VerticalSpeedIndicator ( SGPropertyNode *node );
virtual ~VerticalSpeedIndicator (); virtual ~VerticalSpeedIndicator ();
@ -44,7 +42,6 @@ public:
virtual void update (double dt); virtual void update (double dt);
private: private:
double _casing_pressure_Pa = 0.0; double _casing_pressure_Pa = 0.0;
double _casing_airmass_kg = 0.0; double _casing_airmass_kg = 0.0;
double _casing_density_kgpm3 = 0.0; double _casing_density_kgpm3 = 0.0;
@ -61,7 +58,6 @@ private:
SGPropertyNode_ptr _speed_fpm_node; SGPropertyNode_ptr _speed_fpm_node;
SGPropertyNode_ptr _speed_mps_node; SGPropertyNode_ptr _speed_mps_node;
SGPropertyNode_ptr _speed_kts_node; SGPropertyNode_ptr _speed_kts_node;
}; };
#endif // __INSTRUMENTS_VERTICAL_SPEED_INDICATOR_HXX #endif // __INSTRUMENTS_VERTICAL_SPEED_INDICATOR_HXX

View file

@ -21,13 +21,11 @@
#include <simgear/props/PropertyInterpolationMgr.hxx> #include <simgear/props/PropertyInterpolationMgr.hxx>
class FGInterpolator: class FGInterpolator : public simgear::PropertyInterpolationMgr
public simgear::PropertyInterpolationMgr
{ {
public: public:
FGInterpolator(); FGInterpolator();
~FGInterpolator(); ~FGInterpolator();
}; };
#endif /* FG_INTERPOLATOR_HXX_ */ #endif /* FG_INTERPOLATOR_HXX_ */

View file

@ -55,12 +55,10 @@ public:
*/ */
static bool isMultiplayerRequested(); static bool isMultiplayerRequested();
private: private:
void add_channel(const std::string& config); void add_channel(const std::string& config);
FGProtocol* parse_port_config( const std::string& cfgstr ); FGProtocol* parse_port_config( const std::string& cfgstr );
private: private:
// define the global I/O channel list // define the global I/O channel list
//io_container global_io_list; //io_container global_io_list;
@ -70,5 +68,4 @@ private:
SGPropertyNode_ptr _realDeltaTime; SGPropertyNode_ptr _realDeltaTime;
}; };
#endif // _FG_IO_HXX #endif // _FG_IO_HXX

View file

@ -28,7 +28,6 @@ public:
virtual void update (double dt); virtual void update (double dt);
private: private:
/** /**
* A single instance of a log file (the logger can contain many). * A single instance of a log file (the logger can contain many).
*/ */
@ -43,7 +42,6 @@ private:
}; };
std::vector< std::unique_ptr<Log> > _logs; std::vector< std::unique_ptr<Log> > _logs;
}; };
#endif // __LOGGER_HXX #endif // __LOGGER_HXX

View file

@ -21,7 +21,6 @@ class FGFX;
class FGAircraftModel : public SGSubsystem class FGAircraftModel : public SGSubsystem
{ {
public: public:
FGAircraftModel (); FGAircraftModel ();
virtual ~FGAircraftModel (); virtual ~FGAircraftModel ();
@ -35,6 +34,7 @@ public:
virtual SGVec3d& getVelocity() { return _velocity; } virtual SGVec3d& getVelocity() { return _velocity; }
static const char* subsystemName() { return "aircraft-model"; } static const char* subsystemName() { return "aircraft-model"; }
private: private:
void deinit (); void deinit ();

View file

@ -23,7 +23,6 @@ class SGModelPlacement;
class FGModelMgr : public SGSubsystem class FGModelMgr : public SGSubsystem
{ {
public: public:
/** /**
* A dynamically-placed model using properties. * A dynamically-placed model using properties.
* *
@ -85,6 +84,7 @@ public:
virtual void remove_instance (Instance * instance); virtual void remove_instance (Instance * instance);
static const char* subsystemName() { return "model-manager"; } static const char* subsystemName() { return "model-manager"; }
private: private:
/** /**
* Listener class that adds models at runtime. * Listener class that adds models at runtime.
@ -104,7 +104,6 @@ private:
std::unique_ptr<Listener> _listener; std::unique_ptr<Listener> _listener;
std::vector<Instance *> _instances; std::vector<Instance *> _instances;
}; };
#endif // __MODELMGR_HXX #endif // __MODELMGR_HXX

View file

@ -42,6 +42,7 @@ public:
virtual void update(double); virtual void update(double);
static const char* subsystemName() { return "dns"; } static const char* subsystemName() { return "dns"; }
private: private:
bool _inited; bool _inited;
std::unique_ptr<simgear::DNS::Client> _dns; std::unique_ptr<simgear::DNS::Client> _dns;

View file

@ -49,6 +49,7 @@ public:
std::string getDefaultCatalogFallbackUrl() const; std::string getDefaultCatalogFallbackUrl() const;
static const char* subsystemName() { return "http"; } static const char* subsystemName() { return "http"; }
private: private:
bool _inited; bool _inited;
std::unique_ptr<simgear::HTTP::Client> _http; std::unique_ptr<simgear::HTTP::Client> _http;

View file

@ -23,9 +23,10 @@
#include <simgear/props/props.hxx> #include <simgear/props/props.hxx>
#include <simgear/math/sg_geodesy.hxx> #include <simgear/math/sg_geodesy.hxx>
class FGCom : public SGSubsystem, public SGPropertyChangeListener class FGCom : public SGSubsystem,
public SGPropertyChangeListener
{ {
public: public:
FGCom(); FGCom();
virtual ~FGCom(); virtual ~FGCom();
@ -38,9 +39,7 @@ class FGCom : public SGSubsystem, public SGPropertyChangeListener
virtual void shutdown(); virtual void shutdown();
void iaxTextEvent(struct iaxc_ev_text text); void iaxTextEvent(struct iaxc_ev_text text);
private:
private:
SGPropertyNode_ptr _ptt_node; // PTT; nonzero int indicating channel number (instrumentation/comm/[channel-1]) SGPropertyNode_ptr _ptt_node; // PTT; nonzero int indicating channel number (instrumentation/comm/[channel-1])
SGPropertyNode_ptr _selected_comm_node; // selected channel (fgcom); nonzero channel int indicating channel number (instrumentation/comm/[channel-1]) SGPropertyNode_ptr _selected_comm_node; // selected channel (fgcom); nonzero channel int indicating channel number (instrumentation/comm/[channel-1])
SGPropertyNode_ptr _commFrequencyNode; // current comm node in use; e.g. /instrumentation/comm[0] SGPropertyNode_ptr _commFrequencyNode; // current comm node in use; e.g. /instrumentation/comm[0]
@ -68,7 +67,6 @@ class FGCom : public SGSubsystem, public SGPropertyChangeListener
SGPropertyNode_ptr _mpTransmitFrequencyNode; // sim/multiplay/comm-transmit-frequency-mhz SGPropertyNode_ptr _mpTransmitFrequencyNode; // sim/multiplay/comm-transmit-frequency-mhz
SGPropertyNode_ptr _mpTransmitPowerNode; // sim/multiplay/comm-transmit-power-norm SGPropertyNode_ptr _mpTransmitPowerNode; // sim/multiplay/comm-transmit-power-norm
double _maxRange; double _maxRange;
double _minRange; double _minRange;
double _currentCommFrequency; double _currentCommFrequency;
@ -98,7 +96,6 @@ class FGCom : public SGSubsystem, public SGPropertyChangeListener
void updateCall(); void updateCall();
void connectToCommFrequency(); void connectToCommFrequency();
void testMode(bool testMode); void testMode(bool testMode);
}; };
#endif // of FG_FGCOM_HXX #endif // of FG_FGCOM_HXX

View file

@ -166,9 +166,9 @@ public:
* *
* Mongoose API is documented here: http://cesanta.com/docs/API.shtml * Mongoose API is documented here: http://cesanta.com/docs/API.shtml
*/ */
class MongooseHttpd: public FGHttpd { class MongooseHttpd : public FGHttpd
{
public: public:
/** /**
* Construct a MongooseHttpd object from options in a PropertyNode * Construct a MongooseHttpd object from options in a PropertyNode
*/ */
@ -210,8 +210,7 @@ public:
* *
* @see URIHandlerMap::findHandler( const std::string & uri ) * @see URIHandlerMap::findHandler( const std::string & uri )
*/ */
SGSharedPtr<URIHandler> findHandler(const std::string & uri) SGSharedPtr<URIHandler> findHandler(const std::string & uri) {
{
return _uriHandler.findHandler(uri); return _uriHandler.findHandler(uri);
} }

View file

@ -26,6 +26,7 @@
namespace flightgear { namespace flightgear {
namespace http { namespace http {
extern const char * PROPERTY_ROOT; extern const char * PROPERTY_ROOT;
@ -36,7 +37,8 @@ public:
static FGHttpd * createInstance( SGPropertyNode_ptr configNode ); static FGHttpd * createInstance( SGPropertyNode_ptr configNode );
}; };
} } // namespace http
} // namespace flightgear } // namespace flightgear
#endif // FG_HTTPD_HXX #endif // FG_HTTPD_HXX

View file

@ -52,7 +52,6 @@ class FGScenery : public SGSubsystem
class ScenerySwitchListener; class ScenerySwitchListener;
friend class ScenerySwitchListener; friend class ScenerySwitchListener;
// scene graph // scene graph
osg::ref_ptr<osg::Switch> scene_graph; osg::ref_ptr<osg::Switch> scene_graph;
osg::ref_ptr<osg::Group> terrain_branch; osg::ref_ptr<osg::Group> terrain_branch;

Some files were not shown because too many files have changed in this diff Show more