1
0
Fork 0

Synchronized FG with the removal of 'using std::*' in simgear's easyxml

This commit is contained in:
bcoconni 2013-11-11 19:55:54 +01:00 committed by James Turner
parent 1db9d25f56
commit 139af0026f
39 changed files with 153 additions and 136 deletions

View file

@ -27,6 +27,8 @@
#include <Airports/dynamics.hxx>
#include <Airports/airport.hxx>
using std::string;
/*****************************************************************************
* Helper function for parsing position string
****************************************************************************/

View file

@ -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<int, PositionedID> _idMap;

View file

@ -35,6 +35,7 @@
using std::cerr;
using std::endl;
using std::string;
FGSidStar::FGSidStar(FGAirport *ap) {
id = ap->getId();

View file

@ -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 <string> EnumerateFDMs(void);
std::vector <std::string> 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<string>& GetPropertyCatalog(void) {return PropertyCatalog;}
std::vector<std::string>& 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 <string> PropertyCatalog;
vector <childData*> ChildFDMList;
vector <FGModel*> Models;
std::vector <std::string> PropertyCatalog;
std::vector <childData*> ChildFDMList;
std::vector <FGModel*> Models;
bool ReadFileHeader(Element*);
bool ReadChild(Element*);

View file

@ -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<int> enginesRunning;
std::vector<int> enginesRunning;
FGFDMExec *fdmex;
FGPropertyManager *PropertyManager;

View file

@ -131,7 +131,7 @@ class FGTrim : public FGJSBBase
{
private:
vector<FGTrimAxis*> TrimAxes;
std::vector<FGTrimAxis*> TrimAxes;
unsigned int current_axis;
int N, Nsub;
TrimMode mode;

View file

@ -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; }

View file

@ -43,11 +43,11 @@ public:
};
FGTrimmer(FGFDMExec * fdm, Constraints * constraints);
~FGTrimmer();
std::vector<double> constrain(const vector<double> & v);
void printSolution(std::ostream & stream, const vector<double> & v);
std::vector<double> constrain(const std::vector<double> & v);
void printSolution(std::ostream & stream, const std::vector<double> & v);
void printState(std::ostream & stream);
double compute_cost();
double eval(const vector<double> & v);
double eval(const std::vector<double> & v);
static void limit(double min, double max, double &val)
{
if (val<min) val=min;

View file

@ -184,7 +184,7 @@ public:
default. If a file name is passed in, it will override the
one present in the script.
@return true if successful */
bool LoadScript(string script, double deltaT, const string initfile);
bool LoadScript(std::string script, double deltaT, const std::string initfile);
/** This function is called each pass through the executive Run() method IF
scripting is enabled.
@ -219,22 +219,22 @@ private:
double Delay;
double StartTime;
double TimeSpan;
string Name;
string Description;
vector <FGPropertyNode_ptr> SetParam;
vector <std::string> SetParamName;
vector <FGPropertyNode_ptr> NotifyProperties;
vector <string> NotifyPropertyNames;
vector <string> DisplayString;
vector <eAction> Action;
vector <eType> Type;
vector <double> SetValue;
vector <double> TC;
vector <double> newValue;
vector <double> OriginalValue;
vector <double> ValueSpan;
vector <bool> Transiting;
vector <FGFunction*> Functions;
std::string Name;
std::string Description;
std::vector <FGPropertyNode_ptr> SetParam;
std::vector <std::string> SetParamName;
std::vector <FGPropertyNode_ptr> NotifyProperties;
std::vector <std::string> NotifyPropertyNames;
std::vector <std::string> DisplayString;
std::vector <eAction> Action;
std::vector <eType> Type;
std::vector <double> SetValue;
std::vector <double> TC;
std::vector <double> newValue;
std::vector <double> OriginalValue;
std::vector <double> ValueSpan;
std::vector <bool> Transiting;
std::vector <FGFunction*> 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 <struct event> Events;
vector <LocalProps*> local_properties;
std::vector <struct event> Events;
std::vector <LocalProps*> local_properties;
FGFDMExec* FDMExec;
FGPropertyManager* PropertyManager;

View file

@ -83,7 +83,7 @@ public:
private:
bool first_element_read;
mutable string working_string;
mutable std::string working_string;
Element *document;
Element *current_element;
};

View file

@ -172,7 +172,7 @@ public:
{
for (int i=0;i<getSize();i++) array[i] = m_components[i]->getDeriv();
}
void set(vector<double> vals)
void set(std::vector<double> vals)
{
for (int i=0;i<getSize();i++) m_components[i]->set(vals[i]);
m_stateSpace->run();

View file

@ -232,7 +232,7 @@ private:
typedef std::map<std::string,int> AxisIndex;
AxisIndex AxisIdx;
FGFunction* AeroRPShift;
typedef vector <FGFunction*> AeroFunctionArray;
typedef std::vector <FGFunction*> AeroFunctionArray;
AeroFunctionArray* AeroFunctions;
FGColumnVector3 vFnative;
FGColumnVector3 vFw;

View file

@ -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 <FGGasCell*> Cells;
std::vector <FGGasCell*> Cells;
// Buoyant forces and moments. Excluding the gas weight.
FGColumnVector3 vTotalForces; // [lbs]
FGColumnVector3 vTotalMoments; // [lbs ft]

View file

@ -166,8 +166,8 @@ public:
private:
string Frame;
string Name;
std::string Frame;
std::string Name;
FGFunction* Magnitude_Function;
FGColumnVector3 vDirection;
double magnitude;

View file

@ -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<double>& GetThrottleCmd() const {return ThrottleCmd;}
const std::vector<double>& 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<double>& GetMixtureCmd() const {return MixtureCmd;}
const std::vector<double>& 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<double>& GetThrottlePos() const {return ThrottlePos;}
const std::vector<double>& 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<double>& GetMixturePos() const {return MixturePos;}
const std::vector<double>& GetMixturePos() const {return MixturePos;}
/** Gets the steering position.
@return steering position in degrees */
double GetSteerPosDeg(int gear) const { return SteerPosDeg[gear]; }
const vector<double>& GetSteerPosDeg() const {return SteerPosDeg;}
const std::vector<double>& 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<double>& GetPropAdvance() const { return PropAdvance; }
const std::vector<double>& 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<bool>& GetPropFeather() const { return PropFeather; }
const std::vector<bool>& 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<double>& GetBrakePos() const {return BrakePos;}
const std::vector<double>& GetBrakePos() const {return BrakePos;}
/** Gets the left brake.
@return the left brake setting. */
@ -585,7 +585,7 @@ private:
std::vector <bool> PropFeather;
std::vector <double> SteerPosDeg;
double LeftBrake, RightBrake, CenterBrake; // Brake settings
vector <double> BrakePos; // left, center, right - defined by FGLGear:: enum
std::vector <double> BrakePos; // left, center, right - defined by FGLGear:: enum
double GearCmd,GearPos;
double TailhookPos, WingFoldPos;

View file

@ -244,9 +244,9 @@ private:
double Xradius, Yradius, Zradius; // [ft]
double Xwidth, Ywidth, Zwidth; // [ft]
double ValveCoefficient; // [ft^4 sec / slug]
typedef vector <FGFunction*> CoeffArray;
typedef std::vector <FGFunction*> CoeffArray;
CoeffArray HeatTransferCoeff;
typedef vector <FGBallonet*> BallonetArray;
typedef std::vector <FGBallonet*> 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 <FGFunction*> CoeffArray;
typedef std::vector <FGFunction*> CoeffArray;
CoeffArray HeatTransferCoeff; // [lbs ft / sec]
FGFunction* BlowerInput; // [ft^3 / sec]
FGGasCell* Parent;

View file

@ -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 <LagrangeMultiplier*>* GetMultipliersList(void) { return &multipliers; }
std::vector <LagrangeMultiplier*>* GetMultipliersList(void) { return &multipliers; }
FGLGear::Inputs in;
private:
vector <FGLGear*> lGear;
std::vector <FGLGear*> lGear;
FGColumnVector3 vForces;
FGColumnVector3 vMoments;
vector <LagrangeMultiplier*> multipliers;
std::vector <LagrangeMultiplier*> multipliers;
void bind(void);
void Debug(int from);

View file

@ -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

View file

@ -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<FGOutputType*> OutputTypes;
std::vector<FGOutputType*> OutputTypes;
void Debug(int from);
};

View file

@ -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);
};

View file

@ -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") {

View file

@ -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 <test*> tests;
std::vector <test*> tests;
void Debug(int from);
};

View file

@ -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;

View file

@ -143,12 +143,12 @@ public:
FGColumnVector3 AeroUVW;
FGColumnVector3 AeroPQR;
FGColumnVector3 PQR;
vector <double> ThrottleCmd;
vector <double> MixtureCmd;
vector <double> ThrottlePos;
vector <double> MixturePos;
vector <double> PropAdvance;
vector <bool> PropFeather;
std::vector <double> ThrottleCmd;
std::vector <double> MixtureCmd;
std::vector <double> ThrottlePos;
std::vector <double> MixturePos;
std::vector <double> PropAdvance;
std::vector <bool> 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; }

View file

@ -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;

View file

@ -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; }

View file

@ -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);

View file

@ -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;

View file

@ -44,6 +44,7 @@ INCLUDES
using std::cout;
using std::endl;
using std::string;
namespace JSBSim {

View file

@ -103,9 +103,9 @@ private:
SGPropertyNode_ptr _turb_magnitude_norm, _turb_rate_hz;
SGPropertyNode_ptr _gross_weight_lbs;
vector<SGPropertyNode_ptr> _tank_level_lbs;
vector<ThrusterProps> _thrust_props;
vector<FuelProps> _fuel_props;
std::vector<SGPropertyNode_ptr> _tank_level_lbs;
std::vector<ThrusterProps> _thrust_props;
std::vector<FuelProps> _fuel_props;
};
}; // namespace yasim

View file

@ -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;

View file

@ -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> _gearProps;
std::vector<GearProps> _gearProps;
};
#endif // _YASIM_HXX

View file

@ -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; }

View file

@ -59,6 +59,8 @@
#include <FDM/YASim/YASim.hxx>
#endif
using std::string;
FDMShell::FDMShell() :
_tankProperties( fgGetNode("/consumables/fuel", true) ),
_impl(NULL),

View file

@ -48,6 +48,8 @@
#include <Main/fg_props.hxx>
using std::map;
using std::string;
using std::vector;
void postinitNasalGUI(naRef globals, naContext c);

View file

@ -46,7 +46,7 @@ private:
bool _dead;
long _last_int;
double _last_float;
string _last_string;
std::string _last_string;
};

View file

@ -66,6 +66,7 @@
#include "SchedFlight.hxx"
using std::string;
/******************************************************************************
* FGScheduledFlight stuff

View file

@ -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.

View file

@ -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.