%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include <string>
-#ifdef FGFS
-# include <simgear/props/props.hxx>
-# include <simgear/debug/logstream.hxx>
-# define JSBDEBUG sglog() << loglevel(SG_FLIGHT, SG_ALERT)
-#else
-# include <iostream>
-# include "simgear/props/props.hxx"
-# define JSBDEBUG std::cout
-#endif
+#include <iostream>
+#include "simgear/props/props.hxx"
#include "FGJSBBase.h"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
- // Yuck - shouldn't be using in header files
+ using std::cout;
using std::string;
using std::endl;
Tie (const string &name, V (*getter)(), void (*setter)(V) = 0, bool useDefault = true)
{
if (!tie(name.c_str(), SGRawValueFunctions<V>(getter, setter), useDefault))
- JSBDEBUG << "Failed to tie property " << name << " to functions" << endl;
+ cout << "Failed to tie property " << name << " to functions" << endl;
else if (debug_lvl & 0x20)
- JSBDEBUG << name << endl;
+ cout << name << endl;
}
void (*setter)(int, V) = 0, bool useDefault = true)
{
if (!tie(name.c_str(), SGRawValueFunctionsIndexed<V>(index, getter, setter), useDefault))
- JSBDEBUG << "Failed to tie property " << name << " to indexed functions" << endl;
+ cout << "Failed to tie property " << name << " to indexed functions" << endl;
else if (debug_lvl & 0x20)
- JSBDEBUG << name << endl;
+ cout << name << endl;
}
void (T::*setter)(V) = 0, bool useDefault = true)
{
if (!tie(name.c_str(), SGRawValueMethods<T,V>(*obj, getter, setter), useDefault))
- JSBDEBUG << "Failed to tie property " << name << " to object methods" << endl;
+ cout << "Failed to tie property " << name << " to object methods" << endl;
else if (debug_lvl & 0x20)
- JSBDEBUG << name << endl;
+ cout << name << endl;
}
/**
void (T::*setter)(int, V) = 0, bool useDefault = true)
{
if (!tie(name.c_str(), SGRawValueMethodsIndexed<T,V>(*obj, index, getter, setter), useDefault))
- JSBDEBUG << "Failed to tie property " << name << " to indexed object methods" << endl;
+ cout << "Failed to tie property " << name << " to indexed object methods" << endl;
else if (debug_lvl & 0x20)
- JSBDEBUG << name << endl;
+ cout << name << endl;
}
};
}
#include <stdlib.h>
#include <math.h>
-#include <iostream>
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_XMLELEMENT;
-using std::cerr;
-using std::cout;
-using std::endl;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
# ifdef SG_HAVE_STD_INCLUDES
# include <string>
# include <vector>
+# include <iostream>
# include <map>
# else
# include <vector.h>
# include <string>
+# include <iostream.h>
# include <map.h>
# endif
#else
# include <string>
# include <map>
+# include <iostream>
# include <vector>
+ using std::string;
+ using std::map;
+ using std::vector;
+ using std::cout;
+ using std::endl;
#endif
+ using std::string;
+ using std::map;
+ using std::vector;
+ using std::cout;
+ using std::endl;
#include <math/FGColumnVector3.h>
/** Constructor
@param nm the name of this element (if given)
*/
- Element(std::string nm);
+ Element(string nm);
/// Destructor
~Element(void);
@param key specifies the attribute key to retrieve the value of.
@return the key value (as a string), or the empty string if no such
attribute exists. */
- std::string GetAttributeValue(std::string key);
+ string GetAttributeValue(string key);
/** Retrieves an attribute value as a double precision real number.
@param key specifies the attribute key to retrieve the value of.
@return the key value (as a number), or the HUGE_VAL if no such
attribute exists. */
- double GetAttributeValueAsNumber(std::string key);
+ double GetAttributeValueAsNumber(string key);
/** Retrieves the element name.
@return the element name, or the empty string if no name has been set.*/
- std::string GetName(void) {return name;}
+ string GetName(void) {return name;}
/** Gets a line of data belonging to an element.
@param i the index of the data line to return (0 by default).
@return a string representing the data line requested, or the empty string
if none exists.*/
- std::string GetDataLine(unsigned int i=0);
+ string GetDataLine(unsigned int i=0);
/// Returns the number of lines of data stored
unsigned int GetNumDataLines(void) {return (unsigned int)data_lines.size();}
unsigned int GetNumElements(void) {return (unsigned int)children.size();}
/// Returns the number of named child elements for this element.
- unsigned int GetNumElements(std::string);
+ unsigned int GetNumElements(string);
/** Converts the element data to a number.
This function attempts to convert the first (and presumably only) line of
Element* GetParent(void) {return parent;}
/** Searches for a specified element.
- Finds the first element that matches the supplied std::string, or simply the first
- element if no search std::string is supplied. This function call resets the internal
+ Finds the first element that matches the supplied string, or simply the first
+ element if no search string is supplied. This function call resets the internal
element counter to the first element.
- @param el the search std::string (empty std::string by default).
- @return a pointer to the first element that matches the supplied search std::string. */
- Element* FindElement(std::string el="");
+ @param el the search string (empty string by default).
+ @return a pointer to the first element that matches the supplied search string. */
+ Element* FindElement(string el="");
/** Searches for the next element as specified.
This function would be called after FindElement() is first called (in order to
@param el the name of the next element to find.
@return the pointer to the found element, or 0 if no appropriate element us
found.*/
- Element* FindNextElement(std::string el="");
+ Element* FindNextElement(string el="");
/** Searches for the named element and returns the string data belonging to it.
This function allows the data belonging to a named element to be returned
default)
@return the data value for the named element as a string, or the empty
string if the element cannot be found. */
- std::string FindElementValue(std::string el="");
+ string FindElementValue(string el="");
/** Searches for the named element and returns the data belonging to it as a number.
This function allows the data belonging to a named element to be returned
default)
@return the data value for the named element as a double, or HUGE_VAL if the
data is missing. */
- double FindElementValueAsNumber(std::string el="");
+ double FindElementValueAsNumber(string el="");
/** Searches for the named element and converts and returns the data belonging to it.
This function allows the data belonging to a named element to be returned
to which the value returned will be converted.
@return the unit-converted data value for the named element as a double,
or HUGE_VAL if the data is missing. */
- double FindElementValueAsNumberConvertTo(std::string el, std::string target_units);
+ double FindElementValueAsNumberConvertTo(string el, string target_units);
/** Searches for the named element and converts and returns the data belonging to it.
This function allows the data belonging to a named element to be returned
to which the value returned will be converted.
@return the unit-converted data value for the named element as a double,
or HUGE_VAL if the data is missing. */
- double FindElementValueAsNumberConvertFromTo( std::string el,
- std::string supplied_units,
- std::string target_units);
+ double FindElementValueAsNumberConvertFromTo( string el,
+ string supplied_units,
+ string target_units);
/** Composes a 3-element column vector for the supplied location or orientation.
This function processes a LOCATION or ORIENTATION construct, returning a
@param target_units the string representing the native units used by JSBSim
to which the value returned will be converted.
@return a column vector object built from the LOCATION or ORIENT components. */
- FGColumnVector3 FindElementTripletConvertTo( std::string target_units);
+ FGColumnVector3 FindElementTripletConvertTo( string target_units);
/** This function sets the value of the parent class attribute to the supplied
Element pointer.
/** Stores an attribute belonging to this element.
* @param name The string name of the attribute.
* @param value The string value of the attribute. */
- void AddAttribute(std::string name, std::string value);
+ void AddAttribute(string name, string value);
/** Stores data belonging to this element.
* @param d the data to store. */
- void AddData(std::string d);
+ void AddData(string d);
/** Prints the element.
* Prints this element and calls the Print routine for child elements.
void Print(unsigned int level=0);
private:
- std::string name;
- std::map <std::string, std::string> attributes;
- std::vector <std::string> data_lines;
- std::vector <Element*> children;
- std::vector <std::string> attribute_key;
+ string name;
+ map <string, string> attributes;
+ vector <string> data_lines;
+ vector <Element*> children;
+ vector <string> attribute_key;
Element *parent;
unsigned int element_index;
- typedef std::map <std::string, std::map <std::string, double> > tMapConvert;
+ typedef map <string, map <string, double> > tMapConvert;
tMapConvert convert;
};
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <fstream>
#include <input_output/FGXMLParse.h>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Element* document;
Element* LoadXMLDocument(string XML_filename)
{
- std::ifstream infile;
+ ifstream infile;
if ( !XML_filename.empty() ) {
if (XML_filename.find(".xml") == string::npos) XML_filename += ".xml";
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include <cstring>
-#include <iostream>
#include "FGfdmSocket.h"
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FDMSOCKET;
-using std::cerr;
-using std::cout;
-using std::endl;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifdef FGFS
# include <simgear/compiler.h>
# include STL_STRING
+# include STL_IOSTREAM
+# include STL_FSTREAM
+ SG_USING_STD(cout);
+ SG_USING_STD(endl);
#else
# include <string>
+# if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
+# include <iostream.h>
+# include <fstream.h>
+# else
+# include <iostream>
+# include <fstream>
+ using std::cout;
+ using std::endl;
+# endif
#endif
#include <sys/types.h>
#include "FGColumnVector3.h"
#include <stdio.h>
-#include <iostream>
namespace JSBSim {
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_COLUMNVECTOR3;
-using std::ostream;
-using std::cerr;
-using std::cout;
-using std::endl;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
# include <math.h>
# include <simgear/compiler.h>
# include STL_STRING
-# include <iosfwd>
# include STL_FSTREAM
+# include STL_IOSTREAM
+ SG_USING_STD(string);
+ SG_USING_STD(ostream);
+ SG_USING_STD(istream);
+ SG_USING_STD(cerr);
+ SG_USING_STD(cout);
+ SG_USING_STD(endl);
#else
# include <string>
# if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
# else
# include <cmath>
# endif
+ using std::ostream;
+ using std::istream;
+ using std::cerr;
+ using std::cout;
+ using std::endl;
# if !(defined(_MSC_VER) && _MSC_VER <= 1200)
using std::sqrt;
# endif
# endif
+ using std::string;
#endif
#include "FGJSBBase.h"
/** Prints the contents of the vector
@param delimeter the item separator (tab or comma)
@return a string with the delimeter-separated contents of the vector */
- std::string Dump(std::string delimeter) const;
+ string Dump(string delimeter) const;
/** Assignment operator.
@param b source vector.
@param os Stream to write to.
@param M Matrix to write.
Write the matrix to a stream.*/
-std::ostream& operator<<(std::ostream& os, const FGColumnVector3& col);
+ostream& operator<<(ostream& os, const FGColumnVector3& col);
} // namespace JSBSim
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <iostream>
-
#include "FGCondition.h"
namespace JSBSim {
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_CONDITION;
-using std::cerr;
-using std::cout;
-using std::endl;
-using std::vector;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include <map>
-#include <string>
-
#include <FGJSBBase.h>
#include <input_output/FGXMLElement.h>
#include <input_output/FGPropertyManager.h>
{
public:
FGCondition(Element* element, FGPropertyManager* PropertyManager);
- FGCondition(std::string test, FGPropertyManager* PropertyManager);
+ FGCondition(string test, FGPropertyManager* PropertyManager);
~FGCondition(void);
bool Evaluate(void);
private:
enum eComparison {ecUndef=0, eEQ, eNE, eGT, eGE, eLT, eLE};
enum eLogic {elUndef=0, eAND, eOR};
- std::map <std::string, eComparison> mComparison;
+ map <string, eComparison> mComparison;
eLogic Logic;
FGPropertyManager *TestParam1, *TestParam2, *PropertyManager;
double TestValue;
eComparison Comparison;
bool isGroup;
- std::string conditional;
+ string conditional;
- static std::string indent;
+ static string indent;
- std::vector <FGCondition> conditions;
+ vector <FGCondition> conditions;
void InitializeConditionals(void);
void Debug(int from);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include <stdio.h>
-#include <iostream>
#include "FGFunction.h"
#include "FGTable.h"
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FUNCTION;
-using std::cerr;
-using std::cout;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
void cacheValue(bool shouldCache);
private:
- std::vector <FGParameter*> Parameters;
+ vector <FGParameter*> Parameters;
FGPropertyManager* const PropertyManager;
bool cached;
string Prefix;
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_MATRIX33;
-using std::cout;
-using std::endl;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-std::ostream& operator<<(std::ostream& os, const FGMatrix33& M)
+ostream& operator<<(ostream& os, const FGMatrix33& M)
{
for (unsigned int i=1; i<=M.Rows(); i++) {
for (unsigned int j=1; j<=M.Cols(); j++) {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-std::istream& operator>>(std::istream& is, FGMatrix33& M)
+istream& operator>>(istream& is, FGMatrix33& M)
{
for (unsigned int i=1; i<=M.Rows(); i++) {
for (unsigned int j=1; j<=M.Cols(); j++) {
# include <math.h>
# include <simgear/compiler.h>
# include STL_STRING
-# include <iosfwd>
+# include STL_FSTREAM
+# include STL_IOSTREAM
+ SG_USING_STD(string);
+ SG_USING_STD(ostream);
+ SG_USING_STD(istream);
+ SG_USING_STD(cerr);
+ SG_USING_STD(cout);
+ SG_USING_STD(endl);
#else
# include <string>
# if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
# include <math.h>
# else
# include <fstream>
-# include <iosfwd>
+# include <iostream>
# if defined(sgi) && !defined(__GNUC__)
# include <math.h>
# else
# include <cmath>
# endif
+ using std::ostream;
+ using std::istream;
+ using std::cerr;
+ using std::cout;
+ using std::endl;
# endif
+ using std::string;
#endif
#include "FGColumnVector3.h"
class MatrixException : public FGJSBBase
{
public:
- std::string Message;
+ string Message;
};
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Write the matrix to a stream.
*/
-std::ostream& operator<<(std::ostream& os, const FGMatrix33& M);
+ostream& operator<<(ostream& os, const FGMatrix33& M);
/** Read matrix from a stream.
Read matrix from a stream.
*/
-std::istream& operator>>(std::istream& is, FGMatrix33& M);
+istream& operator>>(istream& is, FGMatrix33& M);
} // namespace JSBSim
/** Gets the strings for the current set of coefficients.
@param delimeter either a tab or comma string depending on output type
@return a string containing the descriptive names for all coefficients */
- std::string GetCoefficientStrings(std::string delimeter);
+ string GetCoefficientStrings(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
coefficients */
- std::string GetCoefficientValues(std::string delimeter);
+ string GetCoefficientValues(string delimeter);
private:
- typedef std::map<std::string,int> AxisIndex;
+ typedef map<string,int> AxisIndex;
AxisIndex AxisIdx;
FGFunction* AeroRPShift;
- std::vector <FGFunction*> variables;
- typedef std::vector <FGFunction*> CoeffArray;
+ vector <FGFunction*> variables;
+ typedef vector <FGFunction*> CoeffArray;
CoeffArray* Coeff;
FGColumnVector3 vFs;
FGColumnVector3 vForces;
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_GROUNDREACTIONS;
-using std::ostringstream;
-using std::setprecision;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
string FGGroundReactions::GetGroundReactionStrings(string delimeter)
{
- ostringstream buf;
+ std::ostringstream buf;
for (unsigned int i=0;i<lGear.size();i++) {
if (lGear[i].IsBogey()) {
#ifdef FGFS
# include <simgear/compiler.h>
+# include STL_IOSTREAM
+# include STL_FSTREAM
+#else
+# if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
+# include <iostream.h>
+# include <fstream.h>
+# else
+# include <iostream>
+# include <fstream>
+# endif
#endif
#include <input_output/FGfdmSocket.h>
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <algorithm>
-
#include "FGLGear.h"
namespace JSBSim {
} else {
dampForce = -compressSpeed * bDampRebound;
}
- vLocalForce(eZ) = std::min(springForce + dampForce, (double)0.0);
+ vLocalForce(eZ) = min(springForce + dampForce, (double)0.0);
// Remember these values for reporting
- MaximumStrutForce = std::max(MaximumStrutForce, fabs(vLocalForce(eZ)));
- MaximumStrutTravel = std::max(MaximumStrutTravel, fabs(compressLength));
+ MaximumStrutForce = max(MaximumStrutForce, fabs(vLocalForce(eZ)));
+ MaximumStrutTravel = max(MaximumStrutTravel, fabs(compressLength));
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
double Weight;
};
- std::vector <struct PointMass> PointMasses;
+ vector <struct PointMass> PointMasses;
void Debug(int from);
};
#ifdef FGFS
# include <simgear/compiler.h>
+# ifdef SG_HAVE_STD_INCLUDES
+# include <iostream>
+# else
+# include <iostream.h>
+# endif
+#else
+# if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
+# include <iostream.h>
+# else
+# include <iostream>
+# endif
#endif
#include <string>
#define ID_MODEL "$Id$"
+using namespace std;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
virtual bool Load(Element* el) {return true;}
FGModel* NextModel;
- std::string Name;
+ string Name;
/** Runs the model; called by the Executive
@see JSBSim.cpp documentation
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_OUTPUT;
-using std::setprecision;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifdef FGFS
# include <simgear/compiler.h>
+# include STL_IOSTREAM
# include STL_FSTREAM
#else
# if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
+# include <iostream.h>
# include <fstream.h>
# else
+# include <iostream>
# include <fstream>
# endif
#endif
-#include <string>
-#include <vector>
-
#include <input_output/FGfdmSocket.h>
#include <input_output/FGXMLFileRead.h>
enum {otNone, otCSV, otTab, otSocket, otTerminal, otUnknown} Type;
bool sFirstPass, dFirstPass, enabled;
int SubSystems;
- std::string output_file_name, delimeter, Filename, DirectivesFile;
- std::ofstream datafile;
+ string output_file_name, delimeter, Filename, DirectivesFile;
+ ofstream datafile;
FGfdmSocket* socket;
- std::vector <FGPropertyManager*> OutputProperties;
+ vector <FGPropertyManager*> OutputProperties;
void Debug(int from);
};
extern short debug_lvl;
-using std::ifstream;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION
be done before calling this (i.e. magnetos, starter engage, etc.) */
bool ICEngineStart(void);
- std::string GetPropulsionStrings(std::string delimeter);
- std::string GetPropulsionValues(std::string delimeter);
+ string GetPropulsionStrings(string delimeter);
+ string GetPropulsionValues(string delimeter);
inline FGColumnVector3& GetForces(void) {return vForces; }
inline double GetForces(int n) const { return vForces(n);}
FGColumnVector3& GetTanksMoment(void);
double GetTanksWeight(void);
- std::ifstream* FindEngineFile(std::string filename);
- std::string FindEngineFullPathname(std::string engine_filename);
+ ifstream* FindEngineFile(string filename);
+ string FindEngineFullPathname(string engine_filename);
inline int GetActiveEngine(void) const {return ActiveEngine;}
inline bool GetFuelFreeze(void) {return fuel_freeze;}
double GetTotalFuelQuantity(void) const {return TotalFuelQuantity;}
void unbind();
private:
- std::vector <FGEngine*> Engines;
- std::vector <FGTank*> Tanks;
- std::vector <FGTank*>::iterator iTank;
+ vector <FGEngine*> Engines;
+ vector <FGTank*> Tanks;
+ vector <FGTank*>::iterator iTank;
unsigned int numSelectedFuelTanks;
unsigned int numSelectedOxiTanks;
unsigned int numFuelTanks;
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <algorithm>
-
#include "FGActuator.h"
namespace JSBSim {
double input = Output;
if (input > PreviousHystOutput) {
- Output = std::max(PreviousHystOutput, input-0.5*hysteresis_width);
+ Output = max(PreviousHystOutput, input-0.5*hysteresis_width);
} else if (input < PreviousHystOutput) {
- Output = std::min(PreviousHystOutput, input+0.5*hysteresis_width);
+ Output = min(PreviousHystOutput, input+0.5*hysteresis_width);
}
PreviousHystOutput = Output;
#define ID_FCSCOMPONENT "$Id$"
+using std::string;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
virtual void SetOutput(void);
inline double GetOutput (void) const {return Output;}
inline FGPropertyManager* GetOutputNode(void) { return OutputNode; }
- inline std::string GetName(void) const {return Name;}
- inline std::string GetType(void) const { return Type; }
+ inline string GetName(void) const {return Name;}
+ inline string GetType(void) const { return Type; }
virtual double GetOutputPct(void) const { return 0; }
protected:
FGPropertyManager* OutputNode;
FGPropertyManager* ClipMinPropertyNode;
FGPropertyManager* ClipMaxPropertyNode;
- std::vector <FGPropertyManager*> InputNodes;
- std::vector <float> InputSigns;
- std::string Type;
- std::string Name;
+ vector <FGPropertyManager*> InputNodes;
+ vector <float> InputSigns;
+ string Type;
+ string Name;
double Input;
double Output;
double clipmax, clipmin;
double P_Factor = 0, Sense = 0.0;
string enginePath = FDMExec->GetEnginePath();
string aircraftPath = FDMExec->GetFullAircraftPath();
- std::ifstream thruster_file;
+ ifstream thruster_file;
FGColumnVector3 location, orientation;
string separator = "/";