28.05.1999 Christian Mayer Created
16.06.1999 Durk Talsma Portability for Linux
20.06.1999 Christian Mayer added lots of consts
+10.10.1999 Christian Mayer added mutable for gcc 2.95 portability
+11.10.1999 Christian Mayer changed set<> to map<> on Bernie Bright's
+ suggestion
*****************************************************************************/
/****************************************************************************/
/* INCLUDES */
/****************************************************************************/
#include "FGWeatherDefs.h"
+
+// for the case that mutable isn't supported:
+#include <simgear/compiler.h>
/****************************************************************************/
/* DEFINES */
class FGTemperatureItem
{
private:
- WeatherPrecition value;
- WeatherPrecition alt;
+ mutable WeatherPrecision value;
+ WeatherPrecision alt;
protected:
public:
- FGTemperatureItem(const WeatherPrecition& a, const WeatherPrecition& v) {alt = a; value = v;}
- FGTemperatureItem(const WeatherPrecition& v) {alt = 0.0; value = v;}
- FGTemperatureItem() {alt = 0.0; value = (WeatherPrecition)FG_WEATHER_DEFAULT_TEMPERATURE;}
+ FGTemperatureItem(const WeatherPrecision& a, const WeatherPrecision& v) {alt = a; value = v;}
+ FGTemperatureItem(const WeatherPrecision& v) {alt = 0.0; value = v;}
+ FGTemperatureItem() {alt = 0.0; value = (WeatherPrecision)FG_WEATHER_DEFAULT_TEMPERATURE;}
+
+ WeatherPrecision getValue() const { return value; };
+ WeatherPrecision getAlt() const { return alt; };
- WeatherPrecition getValue() const { return value; };
- WeatherPrecition getAlt() const { return alt; };
+ void setAlt (WeatherPrecision x) { alt = x; }
+ void setValue(WeatherPrecision x) { value = x; }
- FGTemperatureItem& operator*= (const WeatherPrecition& arg);
+ FGTemperatureItem& operator*= (const WeatherPrecision& arg);
FGTemperatureItem& operator+= (const FGTemperatureItem& arg);
FGTemperatureItem& operator-= (const FGTemperatureItem& arg);
};
-inline FGTemperatureItem& FGTemperatureItem::operator*= (const WeatherPrecition& arg)
+inline FGTemperatureItem& FGTemperatureItem::operator*= (const WeatherPrecision& arg)
{
value *= arg;
return *this;