string _path;
string _callsign;
string _submodel;
- string _name;
+ std::string _name;
string _parent;
SGGeod userpos;
#include <GUI/gui.h> // mkDialog
#include <GUI/new_gui.hxx>
-typedef vector<string> StringVec;
-typedef vector<string>:: iterator StringVecIterator;
+typedef std::vector<std::string> StringVec;
+typedef StringVec::iterator StringVecIterator;
class FGATCDialogNew {
#include <sstream>
using std::ostringstream;
+using std::cerr;
+using std::endl;
FGATCDialog *current_atcdialog;
#include "ATCutils.hxx"
#include "ATCmgr.hxx"
+using std::string;
+using std::map;
using std::cout;
using std::cout;
using boost::ref;
#include <ATC/CommStation.hxx>
using std::vector;
+using std::pair;
+
using namespace flightgear;
// magic import of a helper which uses FGPositioned internals
FGAirport::~FGAirport()
{
- cerr << "Deleting Airport" << endl;
delete _dynamics;
}
<< (aRwy ? aRwy->ident() : "no runway preference"));
}
- return make_pair(sid, enroute);
+ return std::make_pair(sid, enroute);
}
pair<STAR*, WayptRef>
}
} // of STAR iteration
- return make_pair(star, enroute);
+ return std::make_pair(star, enroute);
}
bool AnalogComponent::configure( const std::string & nodeName, SGPropertyNode_ptr configNode )
{
- SG_LOG( SG_AUTOPILOT, SG_BULK, "AnalogComponent::configure(" << nodeName << ")" << endl );
+ SG_LOG( SG_AUTOPILOT, SG_BULK, "AnalogComponent::configure(" << nodeName << ")" );
if( Component::configure( nodeName, configNode ) )
return true;
return true;
}
- SG_LOG( SG_AUTOPILOT, SG_BULK, "AnalogComponent::configure(" << nodeName << ") [unhandled]" << endl );
+ SG_LOG( SG_AUTOPILOT, SG_BULK, "AnalogComponent::configure(" << nodeName << ") [unhandled]" );
return false;
}
#include "Main/fg_props.hxx"
+using std::map;
+using std::string;
+
using namespace FGXMLAutopilot;
Autopilot::Autopilot( SGPropertyNode_ptr rootNode, SGPropertyNode_ptr configNode ) :
SGPropertyNode_ptr node = configNode->getChild(i);
string childName = node->getName();
if( componentForge.count(childName) == 0 ) {
- SG_LOG( SG_AUTOPILOT, SG_BULK, "unhandled element <" << childName << ">" << endl );
+ SG_LOG( SG_AUTOPILOT, SG_BULK, "unhandled element <" << childName << ">" << std::endl );
continue;
}
Component * component = (*componentForge[childName])(node);
if( component->get_name().length() == 0 ) {
- ostringstream buf;
+ std::ostringstream buf;
buf << "unnamed_component_" << i;
component->set_name( buf.str() );
}
// check for duplicate name
std::string name = component->get_name();
for( unsigned i = 0; get_subsystem( name.c_str() ) != NULL; i++ ) {
- ostringstream buf;
+ std::ostringstream buf;
buf << component->get_name() << "_" << i;
name = buf.str();
}
#include <simgear/structure/exception.hxx>
#include <Main/fg_props.hxx>
-
+using std::vector;
+using std::string;
using simgear::PropertyList;
class FGXMLAutopilotGroupImplementation : public FGXMLAutopilotGroup
// check for duplicate names
string name = apName;
for( unsigned i = 0; get_subsystem( apName.c_str() ) != NULL; i++ ) {
- ostringstream buf;
+ std::ostringstream buf;
buf << name << "_" << i;
apName = buf.str();
}
bool Component::configure( const std::string & nodeName, SGPropertyNode_ptr configNode )
{
- SG_LOG( SG_AUTOPILOT, SG_BULK, "Component::configure(" << nodeName << ")" << endl );
+ SG_LOG( SG_AUTOPILOT, SG_BULK, "Component::configure(" << nodeName << ")" << std::endl );
if ( nodeName == "name" ) {
_name = configNode->getStringValue();
return true;
} // enable
- SG_LOG( SG_AUTOPILOT, SG_BULK, "Component::configure(" << nodeName << ") [unhandled]" << endl );
+ SG_LOG( SG_AUTOPILOT, SG_BULK, "Component::configure(" << nodeName << ") [unhandled]" << std::endl );
return false;
}
#include "digitalcomponent.hxx"
#include <Main/fg_props.hxx>
+using std::string;
using namespace FGXMLAutopilot;
DigitalComponent::DigitalComponent() :
#include "functor.hxx"
#include <deque>
+using std::map;
+using std::string;
+using std::endl;
+using std::cout;
+
namespace FGXMLAutopilot {
/* --------------------------------------------------------------------------------- */
#include "inputvalue.hxx"
#include <Main/fg_props.hxx>
+using std::map;
+using std::string;
+using std::endl;
+using std::cout;
+
namespace FGXMLAutopilot {
/**
using namespace FGXMLAutopilot;
+using std::endl;
+using std::cout;
+
PIDController::PIDController():
AnalogComponent(),
alpha( 0.1 ),
using namespace FGXMLAutopilot;
+using std::endl;
+using std::cout;
+
PISimpleController::PISimpleController() :
AnalogComponent(),
_int_sum( 0.0 )
using namespace FGXMLAutopilot;
+using std::endl;
+using std::cout;
+
Predictor::Predictor () :
AnalogComponent(),
_average(0.0)
// my hardware/driver requires many more.
#define POFF_UNITS 8
+using std::map;
+
////////////////////////////////////////////////////////////////////////
// Local functions.
////////////////////////////////////////////////////////////////////////
double c = abox->getDoubleValue("count", 5);
int count = (int) (c + (sg_random() - 0.5) * c);
- extent = max(w*w, extent);
+ extent = std::max(w*w, extent);
for (int j = 0; j < count; j++) {
#endif
#include "presets.hxx"
+#include <cmath>
#include <simgear/math/SGMisc.hxx>
#include <Main/fg_props.hxx>
string reply;
if( name == "X-TIME" ) {
- ostringstream buf;
+ std::ostringstream buf;
buf << globals->get_time_params()->get_cur_time();
reply = buf.str();
}
//boundaries
double boundary2_m = 130.0; // in the lift
if (lift_factor < 0.0) { // in the sink
- double highest_probe_temp= max ( probe_elev_m[1], probe_elev_m[2] );
- double highest_probe_downwind_m= max ( highest_probe_temp, probe_elev_m[3] );
+ double highest_probe_temp= std::max ( probe_elev_m[1], probe_elev_m[2] );
+ double highest_probe_downwind_m= std::max ( highest_probe_temp, probe_elev_m[3] );
boundary2_m = highest_probe_downwind_m - probe_elev_m[0];
}
agl_factor = 1.0;
} else {
agl_factor = exp(-(2 + probe_elev_m[0] / 2000) *
- (user_altitude_agl_m - boundary2_m) / max(probe_elev_m[0],200.0));
+ (user_altitude_agl_m - boundary2_m) / std::max(probe_elev_m[0],200.0));
}
double ground_wind_speed_mps = _surface_wind_speed_node->getDoubleValue() * SG_NM_TO_METER / 3600;
#include <deque>
#include "terrainsampler.hxx"
+
using simgear::PropertyList;
+using std::deque;
+using std::vector;
+using std::ostringstream;
+using std::string;
#include <simgear/props/tiedpropertylist.hxx>
#include "Hitch.hpp"
+
+using std::vector;
+
namespace yasim {
Hitch::Hitch(const char *name)
{
#include <iostream>
#include <iomanip>
-using std::setprecision;
-
#ifdef TEST_DEBUG
#include <stdio.h>
#endif
#include <iostream>
#include <sstream>
-
+using std::setprecision;
+using std::endl;
namespace yasim {
p(rotor_correction_factor,1)
SG_LOG(SG_INPUT, SG_ALERT,
"internal error in parameter set up for rotor: '" <<
- parametername <<"'" << endl);
+ parametername <<"'" << std::endl);
#undef p
}
#include "new_gui.hxx"
#include "menubar.hxx"
-
-\f
+using std::vector;
+using std::string;
+using std::map;\f
////////////////////////////////////////////////////////////////////////
// FIXME!!
//
# error This library requires C++
#endif
-#include <simgear/compiler.h> // for SG_USING_STD
#include <Main/fg_props.hxx>
#include <plib/pu.h>
#include <map>
-using std::map;
-
#include <vector>
-using std::vector;
-
class puMenuBar;
class puObject;
puMenuBar * _menuBar;
// A map of bindings for the menubar.
- map<string,vector<SGBinding *> > _bindings;
+ std::map<std::string,std::vector<SGBinding *> > _bindings;
// These are hoops that we have to jump through because PUI doesn't
// do memory management for lists. We have to allocate the arrays,
// freed.
char ** make_char_array (int size);
puCallback * make_callback_array (int size);
- vector<char **> _char_arrays;
- vector<puCallback *> _callback_arrays;
+ std::vector<char **> _char_arrays;
+ std::vector<puCallback *> _callback_arrays;
// A map for {menu node path}->puObject translation.
- map<string, puObject *> _objects;
+ std::map<std::string, puObject *> _objects;
};
#endif // __MENUBAR_HXX
extern puFont FONT_HELVETICA_14;
extern puFont FONT_SANS_12B;
+using std::map;
+using std::string;
-
-\f
////////////////////////////////////////////////////////////////////////
// Implementation of NewGUI.
////////////////////////////////////////////////////////////////////////
};
puFont *_font;
- map<const char*,FGColor*, ltstr> _colors;
- typedef map<const char*,FGColor*, ltstr>::iterator _itt_t;
- typedef map<const char*,FGColor*, ltstr>::const_iterator _citt_t;
+ typedef std::map<const char*,FGColor*, ltstr> ColourDict;
+ ColourDict _colors;
+ typedef ColourDict::iterator _itt_t;
+ typedef ColourDict::const_iterator _citt_t;
void clear_colors();
// Path to the font directory
SGPath _path;
- typedef map<const string, fntTexFont*> TexFontMap;
- typedef map<const FntParams, fnt*, FntParamsLess> PuFontMap;
+ typedef std::map<const std::string, fntTexFont*> TexFontMap;
+ typedef std::map<const FntParams, fnt*, FntParamsLess> PuFontMap;
TexFontMap _texFonts;
PuFontMap _puFonts;
#include <iomanip>
#include <iostream>
#include <string>
+
using std::string;
using std::cout;
+using std::endl;
typedef string stdString; // puObject has a "string" member
case props::VEC3D:
case props::VEC4D:
{
- streamsize precision = cout.precision(15);
+ std::streamsize precision = cout.precision(15);
c->printOn(cout);
cout.precision(precision);
}
#include <simgear/math/SGMath.hxx>
using simgear::PropertyList;
+using std::string;
void FGCommonInput::read_bindings (const SGPropertyNode * node, binding_list_t * binding_list, int modifiers, const string & module )
{
#include <Scripting/NasalSys.hxx>
using simgear::PropertyList;
+using std::cout;
+using std::endl;
FGEventSetting::FGEventSetting( SGPropertyNode_ptr base ) :
value(0.0)
#define __FGEVENTINPUT_HXX
#include "FGCommonInput.hxx"
+
+#include <vector>
+
#include "FGButton.hxx"
#include "FGDeviceConfigurationMap.hxx"
#include <simgear/structure/subsystem_mgr.hxx>
};
typedef SGSharedPtr<FGEventSetting> FGEventSetting_ptr;
-typedef vector<FGEventSetting_ptr> setting_list_t;
+typedef std::vector<FGEventSetting_ptr> setting_list_t;
/*
* A wrapper class for a configured event.
/*
* access for the name property
*/
- string GetName() const { return name; }
+ std::string GetName() const { return name; }
/*
* access for the description property
*/
- string GetDescription() const { return desc; }
+ std::string GetDescription() const { return desc; }
virtual void update( double dt );
protected:
virtual void fire( SGBinding * binding, FGEventData & eventData );
/* A more or less meaningfull description of the event */
- string desc;
+ std::string desc;
/* One of the predefined names of the event */
- string name;
+ std::string name;
/* A list of SGBinding objects */
binding_list_t bindings[KEYMOD_MAX];
class FGInputDevice : public SGReferenced {
public:
FGInputDevice() : debugEvents(false), grab(false) {}
- FGInputDevice( string aName ) : name(aName) {}
+ FGInputDevice( std::string aName ) : name(aName) {}
virtual ~FGInputDevice();
virtual void Send( const char * eventName, double value ) = 0;
- inline void Send( const string & eventName, double value ) {
+ inline void Send( const std::string & eventName, double value ) {
Send( eventName.c_str(), value );
}
virtual const char * TranslateEventName( FGEventData & eventData ) = 0;
- void SetName( string name );
- string & GetName() { return name; }
+ void SetName( std::string name );
+ std::string & GetName() { return name; }
void HandleEvent( FGEventData & eventData );
bool GetGrab() const { return grab; }
- const string & GetNasalModule() const { return nasalModule; }
+ const std::string & GetNasalModule() const { return nasalModule; }
private:
// A map of events, this device handles
- map<string,FGInputEvent_ptr> handledEvents;
+ std::map<std::string,FGInputEvent_ptr> handledEvents;
// the device has a name to be recognized
- string name;
+ std::string name;
// print out events comming in from the device
// if true
bool grab;
SGPropertyNode_ptr deviceNode;
- string nasalModule;
+ std::string nasalModule;
};
typedef SGSharedPtr<FGInputDevice> FGInputDevice_ptr;
unsigned AddDevice( FGInputDevice * inputDevice );
void RemoveDevice( unsigned index );
- map<int,FGInputDevice*> input_devices;
+ std::map<int,FGInputDevice*> input_devices;
FGDeviceConfigurationMap configMap;
SGPropertyNode_ptr nasalClose;
//
// Initialize nasal groups.
//
- ostringstream str;
+ std::ostringstream str;
str << "__js" << i;
string module = str.str();
nasalsys->createModule(module.c_str(), module.c_str(), "", 0);
#include "FGMacOSXEventInput.hxx"
+using std::stringstream;
+using std::map;
+using std::string;
#define GetHIDElementLongValue(element, key) ({ \
long value = 0; \
if (ret != kIOReturnSuccess) {
SG_LOG(SG_INPUT, SG_ALERT, "Error creating a plugin for HID : " << GetName());
- throw exception();
+ throw std::exception();
return;
}
(*plugin)->Release(plugin); // don't leak a ref
if (devInterface == NULL) {
return;
- throw exception();
+ throw std::exception();
}
// store the interface in this instance
ret = (*devInterface)->open(devInterface, 0);
if (ret != kIOReturnSuccess) {
SG_LOG(SG_INPUT, SG_ALERT, "Error opening device interface: " << GetName());
- throw exception();
+ throw std::exception();
return;
}
CFDictionaryRef props = getProperties();
class HIDElement;
struct FGMacOSXEventData : public FGEventData {
- FGMacOSXEventData(string name, double value, double dt, int modifiers) :
+ FGMacOSXEventData(std::string name, double value, double dt, int modifiers) :
FGEventData(value, dt, modifiers), name(name) {}
- string name;
+ std::string name;
};
//
HIDElement(CFDictionaryRef element, long page, long usage);
virtual ~HIDElement() {}
bool isUpdated();
- string getName() { return name; }
+ std::string getName() { return name; }
virtual void generateEvent(FGMacOSXInputDevice *device, double dt, int modifiers);
virtual long read(IOHIDDeviceInterface **interface);
virtual void write(IOHIDDeviceInterface **interface, double value) {
float value;
float lastValue;
- string name;
+ std::string name;
};
class AxisElement : public HIDElement {
private:
io_object_t device;
IOHIDDeviceInterface **devInterface;
- map<string, HIDElement *> elements; // maps eventName and its relevant element for Send()
+ std::map<std::string, HIDElement *> elements; // maps eventName and its relevant element for Send()
};
//
io_iterator_t removedIterator;
// maps FG device property ID (i.e. /input/events/device[ID]) with io_object for detaching devices
- map<io_object_t, unsigned> deviceIndices;
+ std::map<io_object_t, unsigned> deviceIndices;
};
//
// For obtaining event name and type from both HID element page and usage
//
-class HIDTypeByID : public map<long, pair<HIDUsageType, const char *>*> {
+class HIDTypeByID : public std::map<long, std::pair<HIDUsageType, const char *>*> {
public:
HIDTypeByID(struct HIDTypes *table) {
for( int i = 0; table[i].key!= -1; i++ )
- (*this)[table[i].key] = new pair<HIDUsageType, const char *>(table[i].type, table[i].eventName);
+ (*this)[table[i].key] = new std::pair<HIDUsageType, const char *>(table[i].type, table[i].eventName);
}
~HIDTypeByID() {
- map<long, pair<HIDUsageType, const char *>*>::iterator it;
+ std::map<long, std::pair<HIDUsageType, const char *>*>::iterator it;
for (it = this->begin(); it != this->end(); it++) {
delete (*it).second;
}
// key = (HID_element_page) << 16 | HID_element_usage)
const char *getName(long key) {
- pair<HIDUsageType, const char *> *usageType = (*this)[key];
+ std::pair<HIDUsageType, const char *> *usageType = (*this)[key];
if (usageType == NULL) {
return "";
} else {
}
const HIDUsageType getType(long key) {
- pair<HIDUsageType, const char *> *usageType = (*this)[key];
+ std::pair<HIDUsageType, const char *> *usageType = (*this)[key];
if (usageType == NULL) {
return kHIDUsageNotSupported;
} else {
#include "FGMouseInput.hxx"
#include "Main/globals.hxx"
+using std::ios_base;
+
void ActivePickCallbacks::init( int b, const osgGA::GUIEventAdapter* ea )
{
// Get the list of hit callbacks. Take the first callback that
#include "HUD.hxx"
+using std::endl;
+using std::ifstream;
static float clamp(float f)
{
#include <Airports/simple.hxx>
using std::cout;
+using std::string;
// Command callbacks for FlightGear
*/
// Used for storing airport town and county mapped by ID, since currently FG does not store this
-typedef map<string, string> airport_id_str_map_type;
+typedef std::map<std::string, std::string> airport_id_str_map_type;
typedef airport_id_str_map_type::iterator airport_id_str_map_iterator;
-typedef vector<KLN89Page*> kln89_page_list_type;
+typedef std::vector<KLN89Page*> kln89_page_list_type;
typedef kln89_page_list_type::iterator kln89_page_list_itr;
class KLN89 : public DCLGPS {
void ToggleOBSMode();
// Initiate Direct To operation to the supplied ID.
- void DtoInitiate(const string& id);
+ void DtoInitiate(const std::string& id);
//----------------------- Drawing functions which take CHARACTER units -------------------------
// Render string s in display field field at position x, y
// WHERE POSITION IS IN CHARACTER UNITS!
// zero y at bottom?
// invert: -1 => no inversion, 0 -> n => 1 char - s[invert] gets inverted, 99 => entire string gets inverted
- void DrawText(const string& s, int field, int px, int py, bool bold = false, int invert = -1);
+ void DrawText(const std::string& s, int field, int px, int py, bool bold = false, int invert = -1);
void DrawLatitude(double d, int field, int px, int py);
void DrawLongitude(double d, int field, int px, int py);
// Draw an airport or waypoint label on the moving map
// Specify position by the map pixel co-ordinate of the left or right, bottom, of the *visible* portion of the label.
// The black background quad will automatically overlap this by 1 pixel.
- void DrawLabel(const string& s, int x1, int y1, bool right_align = false);
+ void DrawLabel(const std::string& s, int x1, int y1, bool right_align = false);
int GetLabelQuadrant(double h);
int GetLabelQuadrant(double h1, double h2);
void DrawLine(int x1, int y1, int x2, int y2);
// Draw normal sized text on the moving map
- void DrawMapText(const string& s, int x, int y, bool draw_background = false);
+ void DrawMapText(const std::string& s, int x, int y, bool draw_background = false);
void DrawMapUpArrow(int x, int y);
#include "kln89_page.hxx"
#include <Main/fg_props.hxx>
+using std::string;
+
KLN89Page::KLN89Page(KLN89* parent) {
_kln89 = parent;
_entInvert = false;
inline void SetEntInvert(bool b) { _entInvert = b; }
// Get / Set a waypoint id, NOT the page name!
- virtual void SetId(const string& s);
- virtual const string& GetId();
+ virtual void SetId(const std::string& s);
+ virtual const std::string& GetId();
inline int GetSubPage() { return(_subPage); }
void SetSubPage(int n);
inline int GetNSubPages() { return(_nSubPages); }
- inline const string& GetName() { return(_name); }
+ inline const std::string& GetName() { return(_name); }
protected:
KLN89* _kln89;
- string _name; // eg. "APT", "NAV" etc
+ std::string _name; // eg. "APT", "NAV" etc
int _nSubPages;
// _subpage is zero based
int _subPage; // The subpage gets remembered when other pages are displayed
// Invert ID and display ENT in field 1
bool _entInvert;
- string _id; // The ID of the waypoint that the page is displaying.
+ std::string _id; // The ID of the waypoint that the page is displaying.
// Doesn't make sense for all pages, but does for all the data pages.
- void ShowScratchpadMessage(const string& line1, const string& line2);
+ void ShowScratchpadMessage(const std::string& line1, const std::string& line2);
bool _scratchpadMsg; // Set true when there is a scratchpad message to display
double _scratchpadTimer; // Used for displaying the scratchpad messages for the right amount of time.
- string _scratchpadLine1;
- string _scratchpadLine2;
+ std::string _scratchpadLine1;
+ std::string _scratchpadLine2;
// TODO - remove this function from this class and use a built in method instead.
- string GPSitoa(int n);
+ std::string GPSitoa(int n);
};
#endif // _KLN89_PAGE_HXX
#include "kln89_page_alt.hxx"
+using std::string;
+
KLN89AltPage::KLN89AltPage(KLN89* parent)
: KLN89Page(parent) {
_nSubPages = 2;
class FGRunway;
struct AptFreq {
- string service;
+ std::string service;
unsigned short int freq;
};
void Knob2Left1();
void Knob2Right1();
- void SetId(const string& s);
+ void SetId(const std::string& s);
private:
// Update the cached airport details
- void UpdateAirport(const string& id);
+ void UpdateAirport(const std::string& id);
- string _apt_id;
- string _last_apt_id;
- string _save_apt_id;
+ std::string _apt_id;
+ std::string _last_apt_id;
+ std::string _save_apt_id;
const FGAirport* ap;
vector<FGRunway*> _aptRwys;
#include <Main/fg_props.hxx>
#include "kln89_page_cal.hxx"
+using std::string;
+
KLN89CalPage::KLN89CalPage(KLN89* parent)
: KLN89Page(parent) {
_nSubPages = 8;
#include "kln89_page_dir.hxx"
#include <Main/fg_props.hxx>
+using std::string;
+
KLN89DirPage::KLN89DirPage(KLN89* parent)
: KLN89Page(parent) {
_nSubPages = 1;
void Update(double dt);
- void SetId(const string& s);
+ void SetId(const std::string& s);
void CrsrPressed();
void ClrPressed();
// Override the base class GetId function to return the waypoint ID under the cursor
// on FPL0 page, if there is one and the cursor is on.
// Otherwise return an empty string.
- inline const string& GetId() { return(_fp0SelWpId); }
+ inline const std::string& GetId() { return(_fp0SelWpId); }
private:
int _fpMode; // 0 = Dis, 1 = Dtk
bool _bEntWp; // set true when a waypoint is being entered
bool _bEntExp; // Set true when ent is expected to set the currently entered waypoint as entered.
- string _entWpStr; // The currently entered wp ID (need not be valid)
+ std::string _entWpStr; // The currently entered wp ID (need not be valid)
GPSWaypoint* _entWp; // Waypoint being currently entered
// The position of the cursor in a waypoint being entered
void Calc();
// The ID of the waypoint under the cursor in fpl0, if those conditions exist!
- string _fp0SelWpId;
+ std::string _fp0SelWpId;
- vector<string> _params;
+ std::vector<std::string> _params;
};
#endif // _KLN89_PAGE_FPL_HXX
#include <Navaids/fix.hxx>
#include <Navaids/navrecord.hxx>
+using std::string;
+
KLN89IntPage::KLN89IntPage(KLN89* parent)
: KLN89Page(parent) {
_nSubPages = 2;
void Knob2Left1();
void Knob2Right1();
- void SetId(const string& s);
+ void SetId(const std::string& s);
private:
- string _int_id;
- string _last_int_id;
- string _save_int_id;
+ std::string _int_id;
+ std::string _last_int_id;
+ std::string _save_int_id;
const FGFix* _fp;
FGNavRecord* _nearestVor;
FGNavRecord* _refNav; // Will usually be the same as _nearestVor, and gets reset to _nearestVor when page looses focus.
#include "kln89_page_nav.hxx"
#include <Main/fg_props.hxx>
+using std::string;
+
KLN89NavPage::KLN89NavPage(KLN89* parent)
: KLN89Page(parent) {
_nSubPages = 4;
void LooseFocus();
// Returns the id string of the selected waypoint on NAV4 if valid, else returns an empty string.
- string GetNav4WpId();
+ std::string GetNav4WpId();
private:
int _posFormat; // 0 => lat,lon; 1 => ref to wp.
#include "kln89_page_ndb.hxx"
#include <Navaids/navrecord.hxx>
+using std::string;
+
KLN89NDBPage::KLN89NDBPage(KLN89* parent)
: KLN89Page(parent) {
_nSubPages = 2;
void Knob2Left1();
void Knob2Right1();
- void SetId(const string& s);
+ void SetId(const std::string& s);
private:
- string _ndb_id;
- string _last_ndb_id;
- string _save_ndb_id;
+ std::string _ndb_id;
+ std::string _last_ndb_id;
+ std::string _save_ndb_id;
FGNavRecord* np;
};
#include "kln89_page_oth.hxx"
+using std::string;
+
KLN89OthPage::KLN89OthPage(KLN89* parent)
: KLN89Page(parent) {
_nSubPages = 12;
#include "kln89_page_vor.hxx"
#include <Navaids/navrecord.hxx>
+using std::string;
+
KLN89VorPage::KLN89VorPage(KLN89* parent)
: KLN89Page(parent) {
_nSubPages = 2;
void Knob2Left1();
void Knob2Right1();
- void SetId(const string& s);
+ void SetId(const std::string& s);
private:
- string _vor_id;
- string _last_vor_id;
- string _save_vor_id;
+ std::string _vor_id;
+ std::string _last_vor_id;
+ std::string _save_vor_id;
FGNavRecord* np;
};
virtual void update(double dt);
protected:
- string _name;
+ std::string _name;
int _num;
double _time;
double _updateInterval;
void updateFont();
- string _texture_path;
+ std::string _texture_path;
float _scale; // factor to convert nm to display units
void search (double frequency, double longitude_rad,
double latitude_rad, double altitude_m);
- string _name;
+ std::string _name;
unsigned int _num;
SGPropertyNode_ptr _longitude_node;
private:
void computeMach(double ias);
- string _name;
+ std::string _name;
unsigned int _num;
string _total_pressure;
string _static_pressure;
private:
- string _name;
+ std::string _name;
int _num;
string _static_pressure;
double _tau;
#include <Main/fg_props.hxx>
#include <Main/util.hxx>
+using std::string;
AttitudeIndicator::AttitudeIndicator ( SGPropertyNode *node )
:
private:
- string _name;
+ std::string _name;
int _num;
- string _suction;
+ std::string _suction;
Gyro _gyro;
void
Clock::init ()
{
- string branch;
+ std::string branch;
branch = "/instrumentation/" + _name;
SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
virtual void update(double dt);
private:
- string _name;
+ std::string _name;
unsigned int _num;
bool _is_serviceable;
GPS_APP_NONE // Not part of the approach sequence - the default.
};
-ostream& operator << (ostream& os, GPSAppWpType type);
+std::ostream& operator << (std::ostream& os, GPSAppWpType type);
struct GPSWaypoint {
GPSWaypoint();
static GPSWaypoint* createFromPositioned(const FGPositioned* aFix);
~GPSWaypoint();
- string GetAprId(); // Returns the id with i, f, m or h added if appropriate. (Initial approach fix, final approach fix, etc)
- string id;
+ std::string GetAprId(); // Returns the id with i, f, m or h added if appropriate. (Initial approach fix, final approach fix, etc)
+ std::string id;
float lat; // Radians
float lon; // Radians
GPSWpType type;
GPSAppWpType appType; // only used for waypoints that are part of an approach sequence
};
-typedef vector < GPSWaypoint* > gps_waypoint_array;
+typedef std::vector < GPSWaypoint* > gps_waypoint_array;
typedef gps_waypoint_array::iterator gps_waypoint_array_iterator;
-typedef map < string, gps_waypoint_array > gps_waypoint_map;
+typedef std::map < std::string, gps_waypoint_array > gps_waypoint_map;
typedef gps_waypoint_map::iterator gps_waypoint_map_iterator;
typedef gps_waypoint_map::const_iterator gps_waypoint_map_const_iterator;
class GPSFlightPlan {
public:
- vector<GPSWaypoint*> waypoints;
+ std::vector<GPSWaypoint*> waypoints;
inline bool IsEmpty() { return(waypoints.size() == 0); }
};
virtual ~FGIAP() = 0;
//protected:
- string _aptIdent; // The ident of the airport this approach is for
- string _ident; // The approach ident.
- string _name; // The full approach name.
- string _rwyStr; // The string used to specify the rwy - eg "B" in this instance.
+ std::string _aptIdent; // The ident of the airport this approach is for
+ std::string _ident; // The approach ident.
+ std::string _name; // The full approach name.
+ std::string _rwyStr; // The string used to specify the rwy - eg "B" in this instance.
bool _precision; // True for precision approach, false for non-precision.
};
~FGNPIAP();
//private:
public:
- 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.
// NOTE: It is an assumption in the code that uses this that there is a unique IAF per approach route.
- vector<GPSWaypoint*> _IAP; // The compulsory waypoints of the approach procedure (may duplicate one of the above).
+ std::vector<GPSWaypoint*> _IAP; // The compulsory waypoints of the approach procedure (may duplicate one of the above).
// _IAP includes the FAF and MAF, and the missed approach waypoints.
};
-typedef vector < FGIAP* > iap_list_type;
-typedef map < string, iap_list_type > iap_map_type;
+typedef std::vector < FGIAP* > iap_list_type;
+typedef std::map < std::string, iap_list_type > iap_map_type;
typedef iap_map_type::iterator iap_map_iterator;
// A class to encapsulate hr:min representation of time.
ClockTime t2(diff / 60, diff % 60);
return(t2);
}
- friend ostream& operator<< (ostream& out, const ClockTime& t);
+ friend std::ostream& operator<< (std::ostream& out, const ClockTime& t);
private:
int _hr;
virtual void update(double dt);
// Expand a SIAP ident to the full procedure name.
- string ExpandSIAPIdent(const string& ident);
+ std::string ExpandSIAPIdent(const std::string& ident);
// Render string s in display field field at position x, y
// WHERE POSITION IS IN CHARACTER UNITS!
// zero y at bottom?
- virtual void DrawText(const string& s, int field, int px, int py, bool bold = false);
+ virtual void DrawText(const std::string& s, int field, int px, int py, bool bold = false);
// Render a char at a given position as above
virtual void DrawChar(char c, int field, int px, int py, bool bold = false);
// Returns -1 if no active waypoint.
int GetActiveWaypointIndex();
// Ditto for an arbitrary waypoint id
- int GetWaypointIndex(const string& id);
+ int GetWaypointIndex(const std::string& id);
// Returns meters
float GetDistToActiveWaypoint();
// returns -1 if groundspeed is less than 30kts.
// If the waypoint is an unreached part of the active flight plan the time will be via each leg.
// otherwise it will be a direct-to time.
- double GetTimeToWaypoint(const string& id);
+ double GetTimeToWaypoint(const std::string& id);
// Return true if waypoint alerting is occuring
inline bool GetWaypointAlert() const { return(_waypointAlert); }
inline bool GetToFlag() const { return(_headingBugTo); }
// Initiate Direct To operation to the supplied ID.
- virtual void DtoInitiate(const string& id);
+ virtual void DtoInitiate(const std::string& id);
// Cancel Direct To operation
void DtoCancel();
// CDI full-scale deflection, specified either as an index into a vector of values (standard values) or as a double precision float (intermediate values).
// This will influence how an externally driven CDI will display as well as the NAV1 page.
// Hence the variables are located here, not in the nav page class.
- vector<float> _cdiScales;
+ std::vector<float> _cdiScales;
unsigned int _currentCdiScaleIndex;
bool _cdiScaleTransition; // Set true when the floating CDI value is used during transitions
double _currentCdiScale; // The floating value to use.
void LoadApproachData();
// Find first of any type of waypoint by id. (TODO - Possibly we should return multiple waypoints here).
- GPSWaypoint* FindFirstById(const string& id) const;
- GPSWaypoint* FindFirstByExactId(const string& id) const;
+ GPSWaypoint* FindFirstById(const std::string& id) const;
+ GPSWaypoint* FindFirstByExactId(const std::string& id) const;
- FGNavRecord* FindFirstVorById(const string& id, bool &multi, bool exact = false);
- FGNavRecord* FindFirstNDBById(const string& id, bool &multi, bool exact = false);
- const FGAirport* FindFirstAptById(const string& id, bool &multi, bool exact = false);
- const FGFix* FindFirstIntById(const string& id, bool &multi, bool exact = false);
+ FGNavRecord* FindFirstVorById(const std::string& id, bool &multi, bool exact = false);
+ FGNavRecord* FindFirstNDBById(const std::string& id, bool &multi, bool exact = false);
+ const FGAirport* FindFirstAptById(const std::string& id, bool &multi, bool exact = false);
+ const FGFix* FindFirstIntById(const std::string& id, bool &multi, bool exact = false);
// Find the closest VOR to a position in RADIANS.
FGNavRecord* FindClosestVor(double lat_rad, double lon_rad);
// Flightplans
// GPS can have up to _maxFlightPlans flightplans stored, PLUS an active FP which may or my not be one of the stored ones.
// This is from KLN89, but is probably not far off the mark for most if not all GPS.
- vector<GPSFlightPlan*> _flightPlans;
+ std::vector<GPSFlightPlan*> _flightPlans;
unsigned int _maxFlightPlans;
GPSFlightPlan* _activeFP;
bool _headingBugTo; // Set true when the heading bug is TO, false when FROM.
bool _waypointAlert; // Set true when waypoint alerting is happening. (This is a variable NOT a user-setting).
bool _departed; // Set when groundspeed first exceeds 30kts.
- string _departureTimeString; // Ditto.
+ std::string _departureTimeString; // Ditto.
double _elapsedTime; // Elapsed time in seconds since departure
ClockTime _powerOnTime; // Time (hr:min) of unit power-up.
bool _powerOnTimerSet; // Indicates that we have set the above following power-up.
// Magvar stuff. Might get some of this stuff (such as time) from FG in future.
SGTime* _time;
- list<string> _messageStack;
+ std::list<std::string> _messageStack;
- virtual void CreateFlightPlan(GPSFlightPlan* fp, vector<string> ids, vector<GPSWpType> wps);
+ virtual void CreateFlightPlan(GPSFlightPlan* fp, std::vector<std::string> ids, std::vector<GPSWpType> wps);
// Orientate the GPS unit to a flightplan - ie. figure out from current position
// and possibly orientation which leg of the FP we are on.
// the scale change, but it's in the manual...
bool _approachActive; // Set true when in approach-active mode
GPSFlightPlan* _approachFP; // Current approach - not necessarily loaded.
- string _approachID; // ID of the airport we have an approach loaded for - bit of a hack that can hopefully be removed in future.
+ std::string _approachID; // ID of the airport we have an approach loaded for - bit of a hack that can hopefully be removed in future.
// More hackery since we aren't actually storing an approach class... Doh!
- string _approachAbbrev;
- string _approachRwyStr;
+ std::string _approachAbbrev;
+ std::string _approachRwyStr;
};
#endif // _DCLGPS_HXX
FGNavRecord * _navrecord;
- string _name;
+ std::string _name;
int _num;
class AudioIdent * _audioIdent;
void GSDI::init()
{
- string branch;
+ std::string branch;
branch = "/instrumentation/" + _name;
SGPropertyNode *n = fgGetNode(branch.c_str(), _num, true);
_serviceableN = n->getNode("serviceable", true);
virtual void update(double dt);
private:
- string _name;
+ std::string _name;
unsigned int _num;
SGPropertyNode_ptr _serviceableN;
void
HeadingIndicator::init ()
{
- string branch;
+ std::string branch;
branch = "/instrumentation/" + _name;
SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
HeadingIndicator::bind ()
{
std::ostringstream temp;
- string branch;
+ std::string branch;
temp << _num;
branch = "/instrumentation/" + _name + "[" + temp.str() + "]";
HeadingIndicator::unbind ()
{
std::ostringstream temp;
- string branch;
+ std::string branch;
temp << _num;
branch = "/instrumentation/" + _name + "[" + temp.str() + "]";
Gyro _gyro;
double _last_heading_deg;
- string _name;
+ std::string _name;
int _num;
- string _suction;
+ std::string _suction;
SGPropertyNode_ptr _offset_node;
SGPropertyNode_ptr _heading_in_node;
int i;
for ( i = 0; i < node->nChildren(); ++i ) {
SGPropertyNode *child = node->getChild(i);
- string cname = child->getName();
- string cval = child->getStringValue();
+ std::string cname = child->getName();
+ std::string cval = child->getStringValue();
if ( cname == "name" ) {
name = cval;
} else if ( cname == "number" ) {
void
HeadingIndicatorDG::init ()
{
- string branch;
+ std::string branch;
branch = "/instrumentation/" + name;
_heading_in_node = fgGetNode("/orientation/heading-deg", true);
HeadingIndicatorDG::bind ()
{
std::ostringstream temp;
- string branch;
+ std::string branch;
temp << num;
branch = "/instrumentation/" + name + "[" + temp.str() + "]";
HeadingIndicatorDG::unbind ()
{
std::ostringstream temp;
- string branch;
+ std::string branch;
temp << num;
branch = "/instrumentation/" + name + "[" + temp.str() + "]";
Gyro _gyro;\r
double _last_heading_deg;\r
\r
- string name;\r
+ std::string name;\r
int num;\r
//string vacuum_system;\r
\r
#include <Main/fg_props.hxx>
#include <Main/util.hxx>
+using std::string;
HeadingIndicatorFG::HeadingIndicatorFG ( SGPropertyNode *node )
:
Gyro _gyro;
double _last_heading_deg;
- string name;
+ std::string name;
int num;
SGPropertyNode_ptr _offset_node;
private:
- string _name;
+ std::string _name;
int _num;
double _internal_pressure_inhg;
bool need_update;
// internal values
- string ident;
- string trans_ident;
+ std::string ident;
+ std::string trans_ident;
bool valid;
bool inrange;
double stn_lon;
void search ();
// internal values
- inline const string& get_ident() const { return ident; }
+ inline const std::string& get_ident() const { return ident; }
inline bool get_valid() const { return valid; }
inline bool get_inrange() const { return inrange; }
inline double get_stn_lon() const { return stn_lon; }
void
MagCompass::init ()
{
- string branch;
+ std::string branch;
branch = "/instrumentation/" + _name;
SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
double _error_deg;
double _rate_degps;
- string _name;
+ std::string _name;
int _num;
SGPropertyNode_ptr _serviceable_node;
const double MasterReferenceGyro::gravity = -32.1740485564;
+using std::string;
+
MasterReferenceGyro::MasterReferenceGyro ( SGPropertyNode *node ) :
_name(node->getStringValue("name", "master-reference-gyro")),
_num(node->getIntValue("number", 0))
static const double gravity; //conversion factor
- string _name;
+ std::string _name;
int _num;
double _last_roll;
double xrate_ms;
double _localizerWidth; // cached localizer width in degrees
- string _name;
+ std::string _name;
int _num;
// internal periodic station search timer
void valueChanged (SGPropertyNode * prop)
{
// format as fixed decimal "nnn.nn"
- ostringstream buf;
+ std::ostringstream buf;
buf << std::fixed
<< std::setw(5)
<< std::setfill('0')
try {
position = globals->get_aircraft_position();
}
- catch( exception & ) {
+ catch( std::exception & ) {
return;
}
#include <Main/fg_props.hxx>
#include <Main/util.hxx>
+using std::string;
SlipSkidBall::SlipSkidBall ( SGPropertyNode *node)
:
double _last_pos;
- string _name;
+ std::string _name;
int _num;
SGPropertyNode_ptr _serviceable_node;
#include "tacan.hxx"
using std::vector;
-
+using std::string;
/**
* Adjust the range.
void search (double frequency, double longitude_rad,
double latitude_rad, double altitude_m);
- double searchChannel (const string& channel);
+ double searchChannel (const std::string& channel);
void valueChanged (SGPropertyNode *);
- string _name;
+ std::string _name;
unsigned int _num;
SGPropertyNode_ptr _longitude_node;
SGPropertyNode_ptr _mp_callsign_node; // FIXME
bool _new_frequency;
- string _channel;
+ std::string _channel;
double _last_distance_nm;
double _frequency_mhz;
double _time_before_search_sec;
double _transmitter_range_nm;
double _transmitter_bearing_deg;
double _transmitter_bias;
- string _transmitter_name;
- string _transmitter_ident;
+ std::string _transmitter_name;
+ std::string _transmitter_ident;
double _mobile_lat, _mobile_lon;
double _mobile_elevation_ft;
double _mobile_range_nm;
double _mobile_bearing_deg;
double _mobile_bias;
- string _mobile_name;
- string _mobile_ident;
+ std::string _mobile_name;
+ std::string _mobile_ident;
int _listener_active;
};
#include "transponder.hxx"
+using std::string;
+
Transponder::Transponder(SGPropertyNode *node)
:
_name(node->getStringValue("name", "transponder")),
SGPropertyNode_ptr flightLevelNode;
// Internal
- string _name;
+ std::string _name;
int _num;
- string _mode_c_altitude;
+ std::string _mode_c_altitude;
};
#endif // TRANSPONDER_HXX
#include <Main/fg_props.hxx>
#include <Main/util.hxx>
+using std::string;
// Use a bigger number to be more responsive, or a smaller number
// to be more sluggish.
Gyro _gyro;
double _last_rate;
- string _name;
+ std::string _name;
int _num;
SGPropertyNode_ptr _roll_rate_node;
#include <Main/fg_props.hxx>
#include <Main/util.hxx>
+using std::string;
VerticalSpeedIndicator::VerticalSpeedIndicator ( SGPropertyNode *node )
: _internal_pressure_inhg(29.92),
double _internal_pressure_inhg;
- string _name;
+ std::string _name;
int _num;
- string _static_pressure;
+ std::string _static_pressure;
SGPropertyNode_ptr _serviceable_node;
SGPropertyNode_ptr _pressure_node;
#include <sstream>
#include <iomanip>
+
using std::stringstream;
using std::endl;
using std::setprecision;
using std::fixed;
using std::setw;
using std::setfill;
+using std::string;
#include <Main/fg_props.hxx>
#include <Main/globals.hxx>
virtual void valueChanged(SGPropertyNode *);
protected:
- string _name;
+ std::string _name;
int _num;
double _time;
double _interval;
SGPropertyNode *getInstrumentNode(const char *name, DefaultType value);
private:
- string _texture_path;
+ std::string _texture_path;
typedef enum { ARC, MAP, PLAN, ROSE, BSCAN} DisplayMode;
DisplayMode _display_mode;
* @return The property's value as a string, or the default value provided.
*/
inline const char * fgGetString (const std::string & name,
- const std::string & defaultValue = string(""))
+ const std::string & defaultValue = std::string(""))
{
return fgGetString( name.c_str(), defaultValue.c_str() );
}
if (logging == 0)
return;
- vector<SGPropertyNode_ptr> children = logging->getChildren("log");
+ std::vector<SGPropertyNode_ptr> children = logging->getChildren("log");
for (unsigned int i = 0; i < children.size(); i++) {
SGPropertyNode * child = children[i];
log.interval_ms = child->getLongValue("interval-ms");
log.last_time_ms = globals->get_sim_time_sec() * 1000;
log.delimiter = delimiter.c_str()[0];
- log.output = new ofstream(filename.c_str());
+ log.output = new std::ofstream(filename.c_str());
if (!log.output) {
SG_LOG(SG_GENERAL, SG_ALERT, "Cannot write log to " << filename);
continue;
#endif
SG_LOG( SG_GENERAL, SG_INFO, "FlightGear: Version "
<< version );
- SG_LOG( SG_GENERAL, SG_INFO, "Built with " << SG_COMPILER_STR << endl );
+ SG_LOG( SG_GENERAL, SG_INFO, "Built with " << SG_COMPILER_STR << std::endl );
// Allocate global data structures. This needs to happen before
// we parse command line options
char *genNameString()
{
- string website = "http://www.flightgear.org";
- string programName = "FlightGear";
+ std::string website = "http://www.flightgear.org";
+ std::string programName = "FlightGear";
char *name = new char[26];
name[20] = 114;
name[8] = 119;
//
// $Id$
-#ifdef HAVE_CONFIG_H\r
-# include <config.h>\r
-#endif\r
-\r
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <simgear/compiler.h>
#include <math.h>
#include <cstdlib>
#include <vector>
-using std::vector;
#include <simgear/debug/logstream.hxx>
#include <simgear/math/SGLimits.hxx>
#include "osgDB/Registry"
#endif
+using std::vector;
+
// Originally written by Alex Perry.
double
fgGetLowPass (double current, double target, double timeratio)
}
-string
+std::string
fgUnescape (const char *s)
{
- string r;
+ std::string r;
while (*s) {
if (*s != '\\') {
r += *s++;
fgUntie("/sim/current-view/viewer-y-m");
fgUntie("/sim/current-view/viewer-z-m");
- list<const char*>::const_iterator it;
+ std::list<const char*>::const_iterator it;
for (it = tied_props.begin(); it != tied_props.end(); it++){
fgUntie(*it);
}
private:
void do_bind();
- list<const char*> tied_props;
+ std::list<const char*> tied_props;
double axis_long;
double axis_lat;
bool inited;
SGPropertyNode_ptr view_number;
- vector<SGPropertyNode_ptr> config_list;
+ std::vector<SGPropertyNode_ptr> config_list;
typedef std::vector<FGViewerPtr> viewer_list;
viewer_list views;
SGVec3d abs_viewer_position;
#include <Main/fg_props.hxx>
using std::string;
+using std::vector;
typedef std::map<FGAirport*, SGPropertyNode_ptr> AirportPropertyMap;
#include "ATC-Inputs.hxx"
using std::string;
-
+using std::vector;
// Constructor: The _board parameter specifies which board to
#include "ATC-Main.hxx"
using std::string;
-
+using std::cout;
+using std::endl;
+using std::vector;
// Lock the ATC hardware
static int fgATCMainLock( int fd ) {
// cout << "tile width = " << tile_width << " tile_height = "
// << tile_height << endl;
- double tileRangeM = min(vis,_maxTileRangeM->getDoubleValue());
+ double tileRangeM = std::min(vis,_maxTileRangeM->getDoubleValue());
xrange = (int)(tileRangeM / tile_width) + 1;
yrange = (int)(tileRangeM / tile_height) + 1;
if ( xrange < 1 ) { xrange = 1; }
bool schedule_scenery(const SGGeod& position, double range_m, double duration=0.0);
// Load a model for a tile
- osg::Node* loadTileModel(const string& modelPath, bool cacheModel);
+ osg::Node* loadTileModel(const std::string& modelPath, bool cacheModel);
// Returns true if tiles around current view position have been loaded
bool isSceneryLoaded();
#define VOICE "/sim/sound/voices"
+using std::string;
/// MANAGER ///
try {
for (unsigned int i = 0; i < voices.size(); i++)
_voices.push_back(new FGVoice(this, voices[i]));
- } catch (const string& s) {
+ } catch (const std::string& s) {
SG_LOG(SG_SOUND, SG_ALERT, "VOICE: " << s);
}
# include <simgear/threads/SGQueue.hxx>
#else
# include <queue>
- using std::queue;
#endif // ENABLE_THREADS
using std::vector;
FGVoiceThread *_thread;
#endif
- string _host;
- string _port;
+ std::string _host;
+ std::string _port;
bool _enabled;
SGPropertyNode_ptr _pausedNode;
bool _paused;
- vector<FGVoice *> _voices;
+ std::vector<FGVoice *> _voices;
};
void setVolume(double);
void setPitch(double);
void setSpeed(double);
- void pushMessage(string);
+ void pushMessage(std::string);
private:
class FGVoiceListener;
FGVoiceMgr *_mgr;
#if defined(ENABLE_THREADS)
- SGLockedQueue<string> _msg;
+ SGLockedQueue<std::string> _msg;
#else
- queue<string> _msg;
+ std::queue<std::string> _msg;
#endif
};
private:
- string _name;
+ std::string _name;
int _num;
SGPropertyNode_ptr _serviceable_node;
SGPropertyNode_ptr _pressure_node;
// This file is in the Public Domain and comes with no warranty.
#include "static.hxx"
+
+#include <string>
+
#include <Main/fg_props.hxx>
#include <Main/util.hxx>
void
StaticSystem::init ()
{
- string branch;
- branch = "/systems/" + _name;
+ std::string branch = "/systems/" + _name;
SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
_serviceable_node = node->getChild("serviceable", 0, true);
private:
- string _name;
+ std::string _name;
int _num;
double _tau;
SGPropertyNode_ptr _serviceable_node;
VacuumSystem::init()
{
unsigned int i;
- string branch;
+ std::string branch;
branch = "/systems/" + _name;
SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
private:
- string _name;
+ std::string _name;
int _num;
string_list _rpms;
double _scale;
SGPropertyNode_ptr _serviceable_node;
- vector<SGPropertyNode_ptr> _rpm_nodes;
+ std::vector<SGPropertyNode_ptr> _rpm_nodes;
SGPropertyNode_ptr _pressure_node;
SGPropertyNode_ptr _suction_node;
#include <Main/globals.hxx>
#include <Time/sunsolver.hxx>
+using std::string;
+
static bool do_timeofday (const SGPropertyNode * arg)
{
const string &offset_type = arg->getStringValue("timeofday", "noon");
#include <simgear/io/iochannel.hxx>
class PropertySetter;
-typedef vector<PropertySetter*> PropertySetterVector;
+typedef std::vector<PropertySetter*> PropertySetterVector;
class FGPanelProtocol : public SGSubsystem {
public:
FGPanelProtocol( SGPropertyNode_ptr root );