]> git.mxchange.org Git - flightgear.git/blobdiff - src/WeatherCM/FGLocalWeatherDatabase.h
- modified FGBinding to keep a local copy of the argument property
[flightgear.git] / src / WeatherCM / FGLocalWeatherDatabase.h
index 817ea34b7b6985469dbd3daaf6c9194969d84808..a779a861a2366e735d6691673b4c3bf04c21f7ba 100644 (file)
@@ -54,10 +54,11 @@ HISTORY
 /* INCLUDES                                                                */
 /****************************************************************************/
 #include <vector>
+#include STL_STRING
 
-#include <sg.h>
+#include <plib/sg.h>
 
-#include <Math/sphrintp.h>
+#include "sphrintp.h"
 
 #include "FGPhysicalProperties.h"
 #include "FGPhysicalProperty.h"
@@ -70,8 +71,9 @@ HISTORY
 /****************************************************************************/
 /* DEFINES                                                                 */
 /****************************************************************************/
-FG_USING_STD(vector);
-FG_USING_NAMESPACE(std);
+SG_USING_STD(vector);
+SG_USING_STD(string);
+SG_USING_NAMESPACE(std);
 
 /****************************************************************************/
 /* CLASS DECLARATION                                                       */
@@ -110,19 +112,22 @@ public:
 
     DatabaseWorkingType DatabaseStatus;
 
-    void init( const WeatherPrecision visibility, const DatabaseWorkingType type );
+    void init( const WeatherPrecision visibility,
+              const DatabaseWorkingType type,
+              const string &root );
 
     /************************************************************************/
     /* Constructor and Destructor                                          */
     /************************************************************************/
     FGLocalWeatherDatabase(
        const sgVec3&             position,
+       const string&             root,
        const WeatherPrecision    visibility = DEFAULT_WEATHER_VISIBILITY,
        const DatabaseWorkingType type       = PREFERED_WORKING_TYPE)
     {
        sgCopyVec3( last_known_position, position );
 
-       init( visibility, type );
+       init( visibility, type, root );
 
        theFGLocalWeatherDatabase = this;
     }
@@ -131,12 +136,13 @@ public:
        const WeatherPrecision    position_lat,
        const WeatherPrecision    position_lon,
        const WeatherPrecision    position_alt,
+       const string&             root,
        const WeatherPrecision    visibility = DEFAULT_WEATHER_VISIBILITY,
        const DatabaseWorkingType type       = PREFERED_WORKING_TYPE)
     {
        sgSetVec3( last_known_position, position_lat, position_lon, position_alt );
 
-       init( visibility, type );
+       init( visibility, type, root );
 
        theFGLocalWeatherDatabase = this;
     }
@@ -158,7 +164,15 @@ public:
     /************************************************************************/
     /* Get the physical properties on the specified point p                */
     /************************************************************************/
+#ifdef macintosh
+    /* fix a problem with mw compilers in that they don't know the
+       difference between the next two methods. Since the first one
+       doesn't seem to be used anywhere, I commented it out. This is
+       supposed to be fixed in the forthcoming CodeWarrior Release
+       6. */
+#else
     FGPhysicalProperties get(const sgVec2& p) const;
+#endif
     FGPhysicalProperty   get(const sgVec3& p) const;
 
     WeatherPrecision     getAirDensity(const sgVec3& p) const;