From 139af0026f72a345fd02232a5dc7eb5c19cb2934 Mon Sep 17 00:00:00 2001 From: bcoconni Date: Mon, 11 Nov 2013 19:55:54 +0100 Subject: [PATCH] Synchronized FG with the removal of 'using std::*' in simgear's easyxml --- src/Airports/dynamicloader.cxx | 2 + src/Airports/dynamicloader.hxx | 2 +- src/Airports/sidstar.cxx | 1 + src/FDM/JSBSim/FGFDMExec.h | 74 ++++++++++--------- .../initialization/FGInitialCondition.h | 4 +- src/FDM/JSBSim/initialization/FGTrim.h | 2 +- src/FDM/JSBSim/initialization/FGTrimAxis.h | 24 +++--- src/FDM/JSBSim/initialization/FGTrimmer.h | 6 +- src/FDM/JSBSim/input_output/FGScript.h | 42 +++++------ src/FDM/JSBSim/input_output/FGXMLParse.h | 2 +- src/FDM/JSBSim/math/FGStateSpace.h | 2 +- src/FDM/JSBSim/models/FGAerodynamics.h | 2 +- src/FDM/JSBSim/models/FGBuoyantForces.h | 6 +- src/FDM/JSBSim/models/FGExternalForce.h | 4 +- src/FDM/JSBSim/models/FGFCS.h | 18 ++--- src/FDM/JSBSim/models/FGGasCell.h | 6 +- src/FDM/JSBSim/models/FGGroundReactions.h | 10 +-- src/FDM/JSBSim/models/FGLGear.h | 2 +- src/FDM/JSBSim/models/FGOutput.h | 4 +- .../JSBSim/models/flight_control/FGAngles.h | 2 +- .../flight_control/FGSensorOrientation.h | 2 +- .../JSBSim/models/flight_control/FGSwitch.h | 4 +- .../JSBSim/models/flight_control/FGWaypoint.h | 2 +- src/FDM/JSBSim/models/propulsion/FGEngine.h | 16 ++-- src/FDM/JSBSim/models/propulsion/FGNozzle.h | 4 +- .../JSBSim/models/propulsion/FGPropeller.h | 4 +- src/FDM/JSBSim/models/propulsion/FGRotor.h | 10 +-- src/FDM/JSBSim/models/propulsion/FGThruster.h | 10 +-- .../models/propulsion/FGTransmission.cpp | 1 + src/FDM/YASim/FGFDM.hpp | 6 +- src/FDM/YASim/YASim.cxx | 1 + src/FDM/YASim/YASim.hxx | 2 +- src/FDM/YASim/yasim-test.cpp | 1 + src/FDM/fdm_shell.cxx | 2 + src/Scripting/NasalSys.cxx | 2 + src/Scripting/NasalSys_private.hxx | 2 +- src/Traffic/SchedFlight.cxx | 1 + src/Traffic/Schedule.cxx | 2 + src/Traffic/TrafficMgr.cxx | 2 + 39 files changed, 153 insertions(+), 136 deletions(-) diff --git a/src/Airports/dynamicloader.cxx b/src/Airports/dynamicloader.cxx index d35891b0d..b2b435d73 100644 --- a/src/Airports/dynamicloader.cxx +++ b/src/Airports/dynamicloader.cxx @@ -27,6 +27,8 @@ #include #include +using std::string; + /***************************************************************************** * Helper function for parsing position string ****************************************************************************/ diff --git a/src/Airports/dynamicloader.hxx b/src/Airports/dynamicloader.hxx index b204e9bf1..24500a46a 100644 --- a/src/Airports/dynamicloader.hxx +++ b/src/Airports/dynamicloader.hxx @@ -41,7 +41,7 @@ private: void startArc(const XMLAttributes &atts); FGAirportDynamics* _dynamics; - string value; + std::string value; // map from local (groundnet.xml) to global (nav-cache) IDs for nodes std::map _idMap; diff --git a/src/Airports/sidstar.cxx b/src/Airports/sidstar.cxx index ad8d61344..af7a020c9 100644 --- a/src/Airports/sidstar.cxx +++ b/src/Airports/sidstar.cxx @@ -35,6 +35,7 @@ using std::cerr; using std::endl; +using std::string; FGSidStar::FGSidStar(FGAirport *ap) { id = ap->getId(); diff --git a/src/FDM/JSBSim/FGFDMExec.h b/src/FDM/JSBSim/FGFDMExec.h index 833bf4181..3ffef0241 100644 --- a/src/FDM/JSBSim/FGFDMExec.h +++ b/src/FDM/JSBSim/FGFDMExec.h @@ -190,7 +190,7 @@ class FGFDMExec : public FGJSBBase, public FGXMLFileRead { struct childData { FGFDMExec* exec; - string info; + std::string info; FGColumnVector3 Loc; FGColumnVector3 Orient; bool mated; @@ -291,8 +291,9 @@ public: @param addModelToPath set to true to add the model name to the AircraftPath, defaults to true @return true if successful */ - bool LoadModel(const string& AircraftPath, const string& EnginePath, const string& SystemsPath, - const string& model, bool addModelToPath = true); + bool LoadModel(const std::string& AircraftPath, const std::string& EnginePath, + const std::string& SystemsPath, const std::string& model, + bool addModelToPath = true); /** Loads an aircraft model. The paths to the aircraft and engine config file directories must be set prior to calling this. See @@ -304,7 +305,7 @@ public: @param addModelToPath set to true to add the model name to the AircraftPath, defaults to true @return true if successful*/ - bool LoadModel(const string& model, bool addModelToPath = true); + bool LoadModel(const std::string& model, bool addModelToPath = true); /** Loads a script @param Script The full path name and file name for the script to be loaded. @@ -316,23 +317,24 @@ public: the file specified in the script will be used. If an initialization file is not given in either place, an error will result. @return true if successfully loads; false otherwise. */ - bool LoadScript(const string& Script, double deltaT=0.0, const string initfile=""); + bool LoadScript(const std::string& Script, double deltaT=0.0, + const std::string initfile=""); /** Sets the path to the engine config file directories. @param path path to the directory under which engine config files are kept, for instance "engine" */ - bool SetEnginePath(const string& path) { EnginePath = RootDir + path; return true; } + bool SetEnginePath(const std::string& path) { EnginePath = RootDir + path; return true; } /** Sets the path to the aircraft config file directories. @param path path to the aircraft directory. For instance: "aircraft". Under aircraft, then, would be directories for various modeled aircraft such as C172/, x15/, etc. */ - bool SetAircraftPath(const string& path) { AircraftPath = RootDir + path; return true; } + bool SetAircraftPath(const std::string& path) { AircraftPath = RootDir + path; return true; } /** Sets the path to the systems config file directories. @param path path to the directory under which systems config files are kept, for instance "systems" */ - bool SetSystemsPath(const string& path) { SystemsPath = RootDir + path; return true; } + bool SetSystemsPath(const std::string& path) { SystemsPath = RootDir + path; return true; } /// @name Top-level executive State and Model retrieval mechanism ///@{ @@ -381,29 +383,29 @@ public: ///@} /// Retrieves the engine path. - const string& GetEnginePath(void) {return EnginePath;} + const std::string& GetEnginePath(void) {return EnginePath;} /// Retrieves the aircraft path. - const string& GetAircraftPath(void) {return AircraftPath;} + const std::string& GetAircraftPath(void) {return AircraftPath;} /// Retrieves the systems path. - const string& GetSystemsPath(void) {return SystemsPath;} + const std::string& GetSystemsPath(void) {return SystemsPath;} /// Retrieves the full aircraft path name. - const string& GetFullAircraftPath(void) {return FullAircraftPath;} + const std::string& GetFullAircraftPath(void) {return FullAircraftPath;} /** Retrieves the value of a property. @param property the name of the property @result the value of the specified property */ - inline double GetPropertyValue(const string& property) + inline double GetPropertyValue(const std::string& property) { return instance->GetNode()->GetDouble(property); } /** Sets a property value. @param property the property to be set @param value the value to set the property to */ - inline void SetPropertyValue(const string& property, double value) { + inline void SetPropertyValue(const std::string& property, double value) { instance->GetNode()->SetDouble(property, value); } /// Returns the model name. - const string& GetModelName(void) const { return modelName; } + const std::string& GetModelName(void) const { return modelName; } /* /// Returns the current time. double GetSimTime(void); @@ -414,7 +416,7 @@ public: /// Returns a pointer to the property manager object. FGPropertyManager* GetPropertyManager(void); /// Returns a vector of strings representing the names of all loaded models (future) - vector EnumerateFDMs(void); + std::vector EnumerateFDMs(void); /// Gets the number of child FDMs. int GetFDMCount(void) const {return (int)ChildFDMList.size();} /// Gets a particular child FDM. @@ -437,7 +439,7 @@ public: be logged. @param fname the filename of an output directives file. */ - bool SetOutputDirectives(const string& fname) + bool SetOutputDirectives(const std::string& fname) {return Output->SetDirectivesFile(RootDir + fname);} /** Forces the specified output object to print its items once */ @@ -449,13 +451,13 @@ public: /** Sets (or overrides) the output filename @param fname the name of the file to output data to @return true if successful, false if there is no output specified for the flight model */ - bool SetOutputFileName(const int n, const string& fname) { return Output->SetOutputName(n, fname); } + bool SetOutputFileName(const int n, const std::string& fname) { return Output->SetOutputName(n, fname); } /** Retrieves the current output filename. @param n index of file @return the name of the output file for the output specified by the flight model. If none is specified, the empty string is returned. */ - string GetOutputFileName(int n) const { return Output->GetOutputName(n); } + std::string GetOutputFileName(int n) const { return Output->GetOutputName(n); } /** Executes trimming in the selected mode. * @param mode Specifies how to trim: @@ -495,7 +497,7 @@ public: struct PropertyCatalogStructure { /// Name of the property. - string base_string; + std::string base_string; /// The node for the property. FGPropertyNode_ptr node; }; @@ -512,19 +514,19 @@ public: * @param check The string to search for in the property catalog. * @return the carriage-return-delimited string containing all matching strings * in the catalog. */ - string QueryPropertyCatalog(const string& check); + std::string QueryPropertyCatalog(const std::string& check); // Print the contents of the property catalog for the loaded aircraft. void PrintPropertyCatalog(void); - vector& GetPropertyCatalog(void) {return PropertyCatalog;} + std::vector& GetPropertyCatalog(void) {return PropertyCatalog;} void SetTrimStatus(bool status){ trim_status = status; } bool GetTrimStatus(void) const { return trim_status; } void SetTrimMode(int mode){ ta_mode = mode; } int GetTrimMode(void) const { return ta_mode; } - string GetPropulsionTankReport(); + std::string GetPropulsionTankReport(); /// Returns the cumulative simulation time in seconds. double GetSimTime(void) const { return sim_time; } @@ -556,11 +558,11 @@ public: /** Sets the root directory where JSBSim starts looking for its system directories. @param rootDir the string containing the root directory. */ - void SetRootDir(const string& rootDir) {RootDir = rootDir;} + void SetRootDir(const std::string& rootDir) {RootDir = rootDir;} /** Retrieves the Root Directory. @return the string representing the root (base) JSBSim directory. */ - const string& GetRootDir(void) const {return RootDir;} + const std::string& GetRootDir(void) const {return RootDir;} /** Increments the simulation time if not in Holding mode. The Frame counter is also incremented. @@ -592,14 +594,14 @@ private: bool Constructing; bool modelLoaded; bool IsChild; - string modelName; - string AircraftPath; - string FullAircraftPath; - string EnginePath; - string SystemsPath; - string CFGVersion; - string Release; - string RootDir; + std::string modelName; + std::string AircraftPath; + std::string FullAircraftPath; + std::string EnginePath; + std::string SystemsPath; + std::string CFGVersion; + std::string Release; + std::string RootDir; // Standard Model pointers - shortcuts for internal executive use only. FGPropagate* Propagate; @@ -632,9 +634,9 @@ private: // The FDM counter is used to give each child FDM an unique ID. The root FDM has the ID 0 unsigned int* FDMctr; - vector PropertyCatalog; - vector ChildFDMList; - vector Models; + std::vector PropertyCatalog; + std::vector ChildFDMList; + std::vector Models; bool ReadFileHeader(Element*); bool ReadChild(Element*); diff --git a/src/FDM/JSBSim/initialization/FGInitialCondition.h b/src/FDM/JSBSim/initialization/FGInitialCondition.h index a0807421b..5b3c96896 100644 --- a/src/FDM/JSBSim/initialization/FGInitialCondition.h +++ b/src/FDM/JSBSim/initialization/FGInitialCondition.h @@ -650,7 +650,7 @@ public: @param rstname The name of an initial conditions file @param useStoredPath true if the stored path to the IC file should be used @return true if successful */ - bool Load(string rstname, bool useStoredPath = true ); + bool Load(std::string rstname, bool useStoredPath = true ); /** Get the number of engines running */ @@ -676,7 +676,7 @@ private: speedset lastSpeedSet; altitudeset lastAltitudeSet; - vector enginesRunning; + std::vector enginesRunning; FGFDMExec *fdmex; FGPropertyManager *PropertyManager; diff --git a/src/FDM/JSBSim/initialization/FGTrim.h b/src/FDM/JSBSim/initialization/FGTrim.h index 518077f38..d40eaf24b 100644 --- a/src/FDM/JSBSim/initialization/FGTrim.h +++ b/src/FDM/JSBSim/initialization/FGTrim.h @@ -131,7 +131,7 @@ class FGTrim : public FGJSBBase { private: - vector TrimAxes; + std::vector TrimAxes; unsigned int current_axis; int N, Nsub; TrimMode mode; diff --git a/src/FDM/JSBSim/initialization/FGTrimAxis.h b/src/FDM/JSBSim/initialization/FGTrimAxis.h index afd516782..e89825660 100644 --- a/src/FDM/JSBSim/initialization/FGTrimAxis.h +++ b/src/FDM/JSBSim/initialization/FGTrimAxis.h @@ -58,16 +58,16 @@ FORWARD DECLARATIONS namespace JSBSim { -const string StateNames[] = { "all","udot","vdot","wdot","qdot","pdot","rdot", - "hmgt","nlf" - }; -const string ControlNames[] = { "Throttle","Sideslip","Angle of Attack", - "Elevator","Ailerons","Rudder", - "Altitude AGL", "Pitch Angle", - "Roll Angle", "Flight Path Angle", - "Pitch Trim", "Roll Trim", "Yaw Trim", - "Heading" - }; +const std::string StateNames[] = { "all","udot","vdot","wdot","qdot","pdot", + "rdot","hmgt","nlf" + }; +const std::string ControlNames[] = { "Throttle","Sideslip","Angle of Attack", + "Elevator","Ailerons","Rudder", + "Altitude AGL", "Pitch Angle", + "Roll Angle", "Flight Path Angle", + "Pitch Trim", "Roll Trim", "Yaw Trim", + "Heading" + }; class FGInitialCondition; @@ -113,8 +113,8 @@ public: inline State GetStateType(void) { return state; } inline Control GetControlType(void) { return control; } - inline string GetStateName(void) { return StateNames[state]; } - inline string GetControlName(void) { return ControlNames[control]; } + inline std::string GetStateName(void) { return StateNames[state]; } + inline std::string GetControlName(void) { return ControlNames[control]; } inline double GetControlMin(void) { return control_min; } inline double GetControlMax(void) { return control_max; } diff --git a/src/FDM/JSBSim/initialization/FGTrimmer.h b/src/FDM/JSBSim/initialization/FGTrimmer.h index ad116f5da..66be2f02e 100644 --- a/src/FDM/JSBSim/initialization/FGTrimmer.h +++ b/src/FDM/JSBSim/initialization/FGTrimmer.h @@ -43,11 +43,11 @@ public: }; FGTrimmer(FGFDMExec * fdm, Constraints * constraints); ~FGTrimmer(); - std::vector constrain(const vector & v); - void printSolution(std::ostream & stream, const vector & v); + std::vector constrain(const std::vector & v); + void printSolution(std::ostream & stream, const std::vector & v); void printState(std::ostream & stream); double compute_cost(); - double eval(const vector & v); + double eval(const std::vector & v); static void limit(double min, double max, double &val) { if (val SetParam; - vector SetParamName; - vector NotifyProperties; - vector NotifyPropertyNames; - vector DisplayString; - vector Action; - vector Type; - vector SetValue; - vector TC; - vector newValue; - vector OriginalValue; - vector ValueSpan; - vector Transiting; - vector Functions; + std::string Name; + std::string Description; + std::vector SetParam; + std::vector SetParamName; + std::vector NotifyProperties; + std::vector NotifyPropertyNames; + std::vector DisplayString; + std::vector Action; + std::vector Type; + std::vector SetValue; + std::vector TC; + std::vector newValue; + std::vector OriginalValue; + std::vector ValueSpan; + std::vector Transiting; + std::vector Functions; event() { Triggered = false; @@ -256,18 +256,18 @@ private: struct LocalProps { double *value; - string title; + std::string title; LocalProps(double initial_value=0) { value = new double(initial_value); title = ""; } }; - string ScriptName; + std::string ScriptName; double StartTime; double EndTime; - vector Events; - vector local_properties; + std::vector Events; + std::vector local_properties; FGFDMExec* FDMExec; FGPropertyManager* PropertyManager; diff --git a/src/FDM/JSBSim/input_output/FGXMLParse.h b/src/FDM/JSBSim/input_output/FGXMLParse.h index 350e3e6a7..6367dbb93 100644 --- a/src/FDM/JSBSim/input_output/FGXMLParse.h +++ b/src/FDM/JSBSim/input_output/FGXMLParse.h @@ -83,7 +83,7 @@ public: private: bool first_element_read; - mutable string working_string; + mutable std::string working_string; Element *document; Element *current_element; }; diff --git a/src/FDM/JSBSim/math/FGStateSpace.h b/src/FDM/JSBSim/math/FGStateSpace.h index ffbf63f3e..df4e7bd24 100644 --- a/src/FDM/JSBSim/math/FGStateSpace.h +++ b/src/FDM/JSBSim/math/FGStateSpace.h @@ -172,7 +172,7 @@ public: { for (int i=0;igetDeriv(); } - void set(vector vals) + void set(std::vector vals) { for (int i=0;iset(vals[i]); m_stateSpace->run(); diff --git a/src/FDM/JSBSim/models/FGAerodynamics.h b/src/FDM/JSBSim/models/FGAerodynamics.h index 82e766323..5616a4779 100644 --- a/src/FDM/JSBSim/models/FGAerodynamics.h +++ b/src/FDM/JSBSim/models/FGAerodynamics.h @@ -232,7 +232,7 @@ private: typedef std::map AxisIndex; AxisIndex AxisIdx; FGFunction* AeroRPShift; - typedef vector AeroFunctionArray; + typedef std::vector AeroFunctionArray; AeroFunctionArray* AeroFunctions; FGColumnVector3 vFnative; FGColumnVector3 vFw; diff --git a/src/FDM/JSBSim/models/FGBuoyantForces.h b/src/FDM/JSBSim/models/FGBuoyantForces.h index 4b23841c7..098e9a49e 100644 --- a/src/FDM/JSBSim/models/FGBuoyantForces.h +++ b/src/FDM/JSBSim/models/FGBuoyantForces.h @@ -164,18 +164,18 @@ public: /** Gets the strings for the current set of gas cells. @param delimeter either a tab or comma string depending on output type @return a string containing the descriptive names for all parameters */ - string GetBuoyancyStrings(const string& delimeter); + std::string GetBuoyancyStrings(const std::string& delimeter); /** Gets the coefficient values. @param delimeter either a tab or comma string depending on output type @return a string containing the numeric values for the current set of parameters */ - string GetBuoyancyValues(const string& delimeter); + std::string GetBuoyancyValues(const std::string& delimeter); FGGasCell::Inputs in; private: - vector Cells; + std::vector Cells; // Buoyant forces and moments. Excluding the gas weight. FGColumnVector3 vTotalForces; // [lbs] FGColumnVector3 vTotalMoments; // [lbs ft] diff --git a/src/FDM/JSBSim/models/FGExternalForce.h b/src/FDM/JSBSim/models/FGExternalForce.h index 1b26e894a..5cfb5f02e 100644 --- a/src/FDM/JSBSim/models/FGExternalForce.h +++ b/src/FDM/JSBSim/models/FGExternalForce.h @@ -166,8 +166,8 @@ public: private: - string Frame; - string Name; + std::string Frame; + std::string Name; FGFunction* Magnitude_Function; FGColumnVector3 vDirection; double magnitude; diff --git a/src/FDM/JSBSim/models/FGFCS.h b/src/FDM/JSBSim/models/FGFCS.h index 316cd630a..d67aea408 100644 --- a/src/FDM/JSBSim/models/FGFCS.h +++ b/src/FDM/JSBSim/models/FGFCS.h @@ -246,14 +246,14 @@ public: @return throttle command in range from 0 - 1.0 for the given engine */ double GetThrottleCmd(int engine) const; - const vector& GetThrottleCmd() const {return ThrottleCmd;} + const std::vector& GetThrottleCmd() const {return ThrottleCmd;} /** Gets the mixture command. @param engine engine ID number @return mixture command in range from 0 - 1.0 for the given engine */ double GetMixtureCmd(int engine) const { return MixtureCmd[engine]; } - const vector& GetMixtureCmd() const {return MixtureCmd;} + const std::vector& GetMixtureCmd() const {return MixtureCmd;} /** Gets the prop pitch command. @param engine engine ID number @@ -325,20 +325,20 @@ public: @return throttle position for the given engine in range from 0 - 1.0 */ double GetThrottlePos(int engine) const; - const vector& GetThrottlePos() const {return ThrottlePos;} + const std::vector& GetThrottlePos() const {return ThrottlePos;} /** Gets the mixture position. @param engine engine ID number @return mixture position for the given engine in range from 0 - 1.0 */ double GetMixturePos(int engine) const { return MixturePos[engine]; } - const vector& GetMixturePos() const {return MixturePos;} + const std::vector& GetMixturePos() const {return MixturePos;} /** Gets the steering position. @return steering position in degrees */ double GetSteerPosDeg(int gear) const { return SteerPosDeg[gear]; } - const vector& GetSteerPosDeg() const {return SteerPosDeg;} + const std::vector& GetSteerPosDeg() const {return SteerPosDeg;} /** Gets the gear position (0 up, 1 down), defaults to down @return gear position (0 up, 1 down) */ @@ -357,14 +357,14 @@ public: @return prop pitch position for the given engine in range from 0 - 1.0 */ double GetPropAdvance(int engine) const { return PropAdvance[engine]; } - const vector& GetPropAdvance() const { return PropAdvance; } + const std::vector& GetPropAdvance() const { return PropAdvance; } /** Gets the prop feather position. @param engine engine ID number @return prop fether for the given engine (on / off)*/ bool GetPropFeather(int engine) const { return PropFeather[engine]; } - const vector& GetPropFeather() const { return PropFeather; } + const std::vector& GetPropFeather() const { return PropFeather; } //@} /** Retrieves all component names for inclusion in output stream @@ -531,7 +531,7 @@ public: @return the brake setting for the supplied brake group argument */ double GetBrake(FGLGear::BrakeGroup bg); - const vector& GetBrakePos() const {return BrakePos;} + const std::vector& GetBrakePos() const {return BrakePos;} /** Gets the left brake. @return the left brake setting. */ @@ -585,7 +585,7 @@ private: std::vector PropFeather; std::vector SteerPosDeg; double LeftBrake, RightBrake, CenterBrake; // Brake settings - vector BrakePos; // left, center, right - defined by FGLGear:: enum + std::vector BrakePos; // left, center, right - defined by FGLGear:: enum double GearCmd,GearPos; double TailhookPos, WingFoldPos; diff --git a/src/FDM/JSBSim/models/FGGasCell.h b/src/FDM/JSBSim/models/FGGasCell.h index a4851e9b9..df8cde022 100644 --- a/src/FDM/JSBSim/models/FGGasCell.h +++ b/src/FDM/JSBSim/models/FGGasCell.h @@ -244,9 +244,9 @@ private: double Xradius, Yradius, Zradius; // [ft] double Xwidth, Ywidth, Zwidth; // [ft] double ValveCoefficient; // [ft^4 sec / slug] - typedef vector CoeffArray; + typedef std::vector CoeffArray; CoeffArray HeatTransferCoeff; - typedef vector BallonetArray; + typedef std::vector BallonetArray; BallonetArray Ballonet; // Variables double Pressure; // [lbs/ft^2] @@ -350,7 +350,7 @@ private: double Xradius, Yradius, Zradius; // [ft] double Xwidth, Ywidth, Zwidth; // [ft] double ValveCoefficient; // [ft^4 sec / slug] - typedef vector CoeffArray; + typedef std::vector CoeffArray; CoeffArray HeatTransferCoeff; // [lbs ft / sec] FGFunction* BlowerInput; // [ft^3 / sec] FGGasCell* Parent; diff --git a/src/FDM/JSBSim/models/FGGroundReactions.h b/src/FDM/JSBSim/models/FGGroundReactions.h index 503f6bee6..8af49bda9 100644 --- a/src/FDM/JSBSim/models/FGGroundReactions.h +++ b/src/FDM/JSBSim/models/FGGroundReactions.h @@ -99,8 +99,8 @@ public: double GetForces(int idx) const {return vForces(idx);} const FGColumnVector3& GetMoments(void) const {return vMoments;} double GetMoments(int idx) const {return vMoments(idx);} - string GetGroundReactionStrings(string delimeter) const; - string GetGroundReactionValues(string delimeter) const; + std::string GetGroundReactionStrings(std::string delimeter) const; + std::string GetGroundReactionValues(std::string delimeter) const; bool GetWOW(void) const; int GetNumGearUnits(void) const { return (int)lGear.size(); } @@ -111,15 +111,15 @@ public: FGLGear* GetGearUnit(int gear) const { return lGear[gear]; } void RegisterLagrangeMultiplier(LagrangeMultiplier* lmult) { multipliers.push_back(lmult); } - vector * GetMultipliersList(void) { return &multipliers; } + std::vector * GetMultipliersList(void) { return &multipliers; } FGLGear::Inputs in; private: - vector lGear; + std::vector lGear; FGColumnVector3 vForces; FGColumnVector3 vMoments; - vector multipliers; + std::vector multipliers; void bind(void); void Debug(int from); diff --git a/src/FDM/JSBSim/models/FGLGear.h b/src/FDM/JSBSim/models/FGLGear.h index 7059ad2d8..83b039aae 100644 --- a/src/FDM/JSBSim/models/FGLGear.h +++ b/src/FDM/JSBSim/models/FGLGear.h @@ -252,7 +252,7 @@ public: double GetLocalGear(int idx) const { return vLocalGear(idx); } /// Gets the name of the gear - const string& GetName(void) const {return name; } + const std::string& GetName(void) const {return name; } /// Gets the Weight On Wheels flag value bool GetWOW(void) const {return WOW; } /// Gets the current compressed length of the gear in feet diff --git a/src/FDM/JSBSim/models/FGOutput.h b/src/FDM/JSBSim/models/FGOutput.h index dcbc8adc1..8336151fb 100644 --- a/src/FDM/JSBSim/models/FGOutput.h +++ b/src/FDM/JSBSim/models/FGOutput.h @@ -221,10 +221,10 @@ public: @param idx ID of the output instance from which the name identifier must be obtained @result the name identifier.*/ - string GetOutputName(unsigned int idx) const; + std::string GetOutputName(unsigned int idx) const; private: - vector OutputTypes; + std::vector OutputTypes; void Debug(int from); }; diff --git a/src/FDM/JSBSim/models/flight_control/FGAngles.h b/src/FDM/JSBSim/models/flight_control/FGAngles.h index 4a75bfecc..35098f511 100755 --- a/src/FDM/JSBSim/models/flight_control/FGAngles.h +++ b/src/FDM/JSBSim/models/flight_control/FGAngles.h @@ -98,7 +98,7 @@ private: double target_angle_unit; double source_angle_unit; double output_unit; - string unit; + std::string unit; void Debug(int from); }; diff --git a/src/FDM/JSBSim/models/flight_control/FGSensorOrientation.h b/src/FDM/JSBSim/models/flight_control/FGSensorOrientation.h index 4defe4f7a..99f5d1347 100644 --- a/src/FDM/JSBSim/models/flight_control/FGSensorOrientation.h +++ b/src/FDM/JSBSim/models/flight_control/FGSensorOrientation.h @@ -83,7 +83,7 @@ public: Element* axis_element = element->FindElement("axis"); if (axis_element) { - string sAxis = element->FindElementValue("axis"); + std::string sAxis = element->FindElementValue("axis"); if (sAxis == "X" || sAxis == "x") { axis = 1; } else if (sAxis == "Y" || sAxis == "y") { diff --git a/src/FDM/JSBSim/models/flight_control/FGSwitch.h b/src/FDM/JSBSim/models/flight_control/FGSwitch.h index 625bdb179..5dd2949ce 100644 --- a/src/FDM/JSBSim/models/flight_control/FGSwitch.h +++ b/src/FDM/JSBSim/models/flight_control/FGSwitch.h @@ -171,7 +171,7 @@ private: sign = 1.0; } - void setTestValue(string value, string Name, FGPropertyManager* propMan) { + void setTestValue(std::string value, std::string Name, FGPropertyManager* propMan) { if (value.empty()) { std::cerr << "No VALUE supplied for switch component: " << Name << std::endl; } else { @@ -197,7 +197,7 @@ private: }; - vector tests; + std::vector tests; void Debug(int from); }; diff --git a/src/FDM/JSBSim/models/flight_control/FGWaypoint.h b/src/FDM/JSBSim/models/flight_control/FGWaypoint.h index 272d1a384..bf7ba6626 100755 --- a/src/FDM/JSBSim/models/flight_control/FGWaypoint.h +++ b/src/FDM/JSBSim/models/flight_control/FGWaypoint.h @@ -121,7 +121,7 @@ private: double source_latitude_unit; double source_longitude_unit; double radius; - string unit; + std::string unit; enum {eNone=0, eDeg, eRad, eFeet, eMeters} eUnit; enum {eNoType=0, eHeading, eDistance} WaypointType; diff --git a/src/FDM/JSBSim/models/propulsion/FGEngine.h b/src/FDM/JSBSim/models/propulsion/FGEngine.h index de08492cc..aeb243f6e 100644 --- a/src/FDM/JSBSim/models/propulsion/FGEngine.h +++ b/src/FDM/JSBSim/models/propulsion/FGEngine.h @@ -143,12 +143,12 @@ public: FGColumnVector3 AeroUVW; FGColumnVector3 AeroPQR; FGColumnVector3 PQR; - vector ThrottleCmd; - vector MixtureCmd; - vector ThrottlePos; - vector MixturePos; - vector PropAdvance; - vector PropFeather; + std::vector ThrottleCmd; + std::vector MixtureCmd; + std::vector ThrottlePos; + std::vector MixturePos; + std::vector PropAdvance; + std::vector PropFeather; double TotalDeltaT; }; @@ -158,7 +158,7 @@ public: enum EngineType {etUnknown, etRocket, etPiston, etTurbine, etTurboprop, etElectric}; EngineType GetType(void) const { return Type; } - virtual const string& GetName(void) const { return Name; } + virtual const std::string& GetName(void) const { return Name; } // Engine controls virtual double GetThrottleMin(void) const { return MinThrottle; } @@ -178,7 +178,7 @@ public: virtual void SetStarved(void) { Starved = true; } virtual void SetRunning(bool bb) { Running=bb; } - virtual void SetName(const string& name) { Name = name; } + virtual void SetName(const std::string& name) { Name = name; } virtual void SetFuelFreeze(bool f) { FuelFreeze = f; } virtual void SetStarter(bool s) { Starter = s; } diff --git a/src/FDM/JSBSim/models/propulsion/FGNozzle.h b/src/FDM/JSBSim/models/propulsion/FGNozzle.h index 86576d57f..68f5d28f1 100644 --- a/src/FDM/JSBSim/models/propulsion/FGNozzle.h +++ b/src/FDM/JSBSim/models/propulsion/FGNozzle.h @@ -90,8 +90,8 @@ public: ~FGNozzle(); double Calculate(double vacThrust); - string GetThrusterLabels(int id, const string& delimeter); - string GetThrusterValues(int id, const string& delimeter); + std::string GetThrusterLabels(int id, const std::string& delimeter); + std::string GetThrusterValues(int id, const std::string& delimeter); private: // double PE; diff --git a/src/FDM/JSBSim/models/propulsion/FGPropeller.h b/src/FDM/JSBSim/models/propulsion/FGPropeller.h index 1b353d2cb..ceb4b326a 100644 --- a/src/FDM/JSBSim/models/propulsion/FGPropeller.h +++ b/src/FDM/JSBSim/models/propulsion/FGPropeller.h @@ -256,8 +256,8 @@ public: @return the thrust in pounds */ double Calculate(double EnginePower); FGColumnVector3 GetPFactor(void) const; - string GetThrusterLabels(int id, const string& delimeter); - string GetThrusterValues(int id, const string& delimeter); + std::string GetThrusterLabels(int id, const std::string& delimeter); + std::string GetThrusterValues(int id, const std::string& delimeter); void SetReverseCoef (double c) { Reverse_coef = c; } double GetReverseCoef (void) const { return Reverse_coef; } diff --git a/src/FDM/JSBSim/models/propulsion/FGRotor.h b/src/FDM/JSBSim/models/propulsion/FGRotor.h index 8bb4b743c..50c9072ff 100644 --- a/src/FDM/JSBSim/models/propulsion/FGRotor.h +++ b/src/FDM/JSBSim/models/propulsion/FGRotor.h @@ -318,16 +318,16 @@ public: void SetLongitudinalCtrl(double c) { LongitudinalCtrl = c; } // Stubs. Only main rotor RPM is returned - string GetThrusterLabels(int id, const string& delimeter); - string GetThrusterValues(int id, const string& delimeter); + std::string GetThrusterLabels(int id, const std::string& delimeter); + std::string GetThrusterValues(int id, const std::string& delimeter); private: // assist in parameter retrieval - double ConfigValueConv( Element* e, const string& ename, double default_val=0.0, - const string& unit = "", bool tell=false); + double ConfigValueConv( Element* e, const std::string& ename, double default_val=0.0, + const std::string& unit = "", bool tell=false); - double ConfigValue( Element* e, const string& ename, double default_val=0.0, + double ConfigValue( Element* e, const std::string& ename, double default_val=0.0, bool tell=false); double Configure(Element* rotor_element); diff --git a/src/FDM/JSBSim/models/propulsion/FGThruster.h b/src/FDM/JSBSim/models/propulsion/FGThruster.h index 2b8fac044..b783d4060 100644 --- a/src/FDM/JSBSim/models/propulsion/FGThruster.h +++ b/src/FDM/JSBSim/models/propulsion/FGThruster.h @@ -96,21 +96,21 @@ public: vFn(1) = Thrust; return Thrust; } - void SetName(string name) {Name = name;} + void SetName(std::string name) {Name = name;} virtual void SetRPM(double rpm) {}; virtual void SetEngineRPM(double rpm) {}; virtual double GetPowerRequired(void) {return 0.0;} virtual void SetdeltaT(double dt) {deltaT = dt;} double GetThrust(void) const {return Thrust;} eType GetType(void) {return Type;} - string GetName(void) {return Name;} + std::string GetName(void) {return Name;} void SetReverserAngle(double angle) {ReverserAngle = angle;} double GetReverserAngle(void) const {return ReverserAngle;} virtual double GetRPM(void) const { return 0.0; }; virtual double GetEngineRPM(void) const { return 0.0; }; double GetGearRatio(void) {return GearRatio; } - virtual string GetThrusterLabels(int id, const string& delimeter); - virtual string GetThrusterValues(int id, const string& delimeter); + virtual std::string GetThrusterLabels(int id, const std::string& delimeter); + virtual std::string GetThrusterValues(int id, const std::string& delimeter); struct Inputs { double TotalDeltaT; @@ -128,7 +128,7 @@ public: protected: eType Type; - string Name; + std::string Name; double Thrust; double PowerRequired; double deltaT; diff --git a/src/FDM/JSBSim/models/propulsion/FGTransmission.cpp b/src/FDM/JSBSim/models/propulsion/FGTransmission.cpp index afdd1f3fb..97bad3f81 100644 --- a/src/FDM/JSBSim/models/propulsion/FGTransmission.cpp +++ b/src/FDM/JSBSim/models/propulsion/FGTransmission.cpp @@ -44,6 +44,7 @@ INCLUDES using std::cout; using std::endl; +using std::string; namespace JSBSim { diff --git a/src/FDM/YASim/FGFDM.hpp b/src/FDM/YASim/FGFDM.hpp index 25aa1a67c..4601951bd 100644 --- a/src/FDM/YASim/FGFDM.hpp +++ b/src/FDM/YASim/FGFDM.hpp @@ -103,9 +103,9 @@ private: SGPropertyNode_ptr _turb_magnitude_norm, _turb_rate_hz; SGPropertyNode_ptr _gross_weight_lbs; - vector _tank_level_lbs; - vector _thrust_props; - vector _fuel_props; + std::vector _tank_level_lbs; + std::vector _thrust_props; + std::vector _fuel_props; }; }; // namespace yasim diff --git a/src/FDM/YASim/YASim.cxx b/src/FDM/YASim/YASim.cxx index 97c297cb7..d82d14398 100644 --- a/src/FDM/YASim/YASim.cxx +++ b/src/FDM/YASim/YASim.cxx @@ -32,6 +32,7 @@ #include "YASim.hxx" using namespace yasim; +using std::string; static const float YASIM_PI = 3.14159265358979323846; static const float RAD2DEG = 180/YASIM_PI; diff --git a/src/FDM/YASim/YASim.hxx b/src/FDM/YASim/YASim.hxx index 4948f5e28..5739032af 100644 --- a/src/FDM/YASim/YASim.hxx +++ b/src/FDM/YASim/YASim.hxx @@ -57,7 +57,7 @@ public: SGPropertyNode_ptr _catapult_launch_cmd, _tailhook_position_norm; SGPropertyNode_ptr _launchbar_position_norm, _launchbar_holdback_pos_norm; SGPropertyNode_ptr _launchbar_state, _launchbar_strop; - vector _gearProps; + std::vector _gearProps; }; #endif // _YASIM_HXX diff --git a/src/FDM/YASim/yasim-test.cpp b/src/FDM/YASim/yasim-test.cpp index 41ff55029..87b834e53 100644 --- a/src/FDM/YASim/yasim-test.cpp +++ b/src/FDM/YASim/yasim-test.cpp @@ -11,6 +11,7 @@ #include "Airplane.hpp" using namespace yasim; +using std::string; // Stubs. Not needed by a batch program, but required to link. bool fgSetFloat (const char * name, float val) { return false; } diff --git a/src/FDM/fdm_shell.cxx b/src/FDM/fdm_shell.cxx index 21a3b79df..cb3805d7b 100644 --- a/src/FDM/fdm_shell.cxx +++ b/src/FDM/fdm_shell.cxx @@ -59,6 +59,8 @@ #include #endif +using std::string; + FDMShell::FDMShell() : _tankProperties( fgGetNode("/consumables/fuel", true) ), _impl(NULL), diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index 0b3422472..caaf6a582 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -48,6 +48,8 @@ #include
using std::map; +using std::string; +using std::vector; void postinitNasalGUI(naRef globals, naContext c); diff --git a/src/Scripting/NasalSys_private.hxx b/src/Scripting/NasalSys_private.hxx index 225af03cf..4eca7776a 100644 --- a/src/Scripting/NasalSys_private.hxx +++ b/src/Scripting/NasalSys_private.hxx @@ -46,7 +46,7 @@ private: bool _dead; long _last_int; double _last_float; - string _last_string; + std::string _last_string; }; diff --git a/src/Traffic/SchedFlight.cxx b/src/Traffic/SchedFlight.cxx index 4dc29b519..228d67cbf 100644 --- a/src/Traffic/SchedFlight.cxx +++ b/src/Traffic/SchedFlight.cxx @@ -66,6 +66,7 @@ #include "SchedFlight.hxx" +using std::string; /****************************************************************************** * FGScheduledFlight stuff diff --git a/src/Traffic/Schedule.cxx b/src/Traffic/Schedule.cxx index 482727cb3..a47dfd2ca 100644 --- a/src/Traffic/Schedule.cxx +++ b/src/Traffic/Schedule.cxx @@ -55,6 +55,8 @@ #include "SchedFlight.hxx" #include "TrafficMgr.hxx" +using std::string; + /****************************************************************************** * the FGAISchedule class contains data members and code to maintain a * schedule of Flights for an artificially controlled aircraft. diff --git a/src/Traffic/TrafficMgr.cxx b/src/Traffic/TrafficMgr.cxx index 731687c68..22149877d 100644 --- a/src/Traffic/TrafficMgr.cxx +++ b/src/Traffic/TrafficMgr.cxx @@ -75,6 +75,8 @@ using std::sort; using std::strcmp; using std::endl; +using std::string; +using std::vector; /** * Thread encapsulating parsing the traffic schedules. -- 2.39.5