avoiding "uses..." in header files.
# include <ieeefp.h>
#endif
-using std::string;
#include "AIAircraft.hxx"
#include "performancedata.hxx"
#include "performancedb.hxx"
#include <signal.h>
+using std::string;
+using std::cerr;
+using std::endl;
+
//#include <Airports/trafficcontroller.hxx>
FGAIAircraft::FGAIAircraft(FGAISchedule *ref) :
if (_fx && _refID != 0 && _refID != 1) {
SGSoundMgr *smgr = globals->get_soundmgr();
if (smgr) {
- stringstream name;
+ std::stringstream name;
name << "aifx:";
name << _refID;
smgr->remove(name.str());
props->setStringValue("sim/sound/path", fxpath.c_str());
// initialize the sound configuration
- stringstream name;
+ std::stringstream name;
name << "aifx:";
name << _refID;
_fx = new FGFX(name.str(), props);
enabled->setBoolValue(true);
// process all scenarios
- map<string, bool> scenarios;
+ std::map<string, bool> scenarios;
for (int i = 0 ; i < root->nChildren() ; i++) {
SGPropertyNode *n = root->getChild(i);
if (strcmp(n->getName(), "scenario"))
#include "AIManager.hxx"
#include "AIBallistic.hxx"
+using std::cout;
+using std::endl;
const double FGSubmodelMgr::lbs_to_slugs = 0.031080950172;
const char* _model_added = _model_added_node->getStringValue();
- basic_string <char>::size_type indexCh2b;
+ std::basic_string <char>::size_type indexCh2b;
string str2 = _model_added;
const char *cstr2b = "multiplayer";
using std::sort;
using std::string;
+using std::cout;
+using std::endl;
/***************************************************************************
* ActiveRunway
#include "positioninit.hxx"
using std::string;
+using std::endl;
+using std::cerr;
+using std::cout;
using namespace boost::algorithm;
#ifndef _FGSCHEDFLIGHT_HXX_
#define _FGSCHEDFLIGHT_HXX_
-
-using namespace std;
-
-using std::vector;
-
+class FGAirport;
class FGScheduledFlight
{
private:
- string callsign;
- string fltRules;
+ std::string callsign;
+ std::string fltRules;
FGAirport *departurePort;
FGAirport *arrivalPort;
- string depId;
- string arrId;
- string requiredAircraft;
+ std::string depId;
+ std::string arrId;
+ std::string requiredAircraft;
time_t departureTime;
time_t arrivalTime;
time_t repeatPeriod;
void setFlightRules(string val) { fltRules = val; };
};
-typedef vector<FGScheduledFlight*> FGScheduledFlightVec;
-typedef vector<FGScheduledFlight*>::iterator FGScheduledFlightVecIterator;
+typedef std::vector<FGScheduledFlight*> FGScheduledFlightVec;
+typedef std::vector<FGScheduledFlight*>::iterator FGScheduledFlightVecIterator;
typedef std::map < std::string, FGScheduledFlightVec > FGScheduledFlightMap;
class FGAISchedule
{
private:
- string modelPath;
- string homePort;
- string livery;
- string registration;
- string airline;
- string acType;
- string m_class;
- string flightType;
- string flightIdentifier;
- string currentDestination;
+ std::string modelPath;
+ std::string homePort;
+ std::string livery;
+ std::string registration;
+ std::string airline;
+ std::string acType;
+ std::string m_class;
+ std::string flightType;
+ std::string flightIdentifier;
+ std::string currentDestination;
bool heavy;
FGScheduledFlightVec flights;
SGGeod position;
#include <Airports/simple.hxx>
#include <Main/fg_init.hxx>
-
-
#include "TrafficMgr.hxx"
using std::sort;
using std::strcmp;
+using std::endl;
/**
* Thread encapsulating parsing the traffic schedules.
// Save the heuristics data
bool saveData = false;
- ofstream cachefile;
+ std::ofstream cachefile;
if (fgGetBool("/sim/traffic-manager/heuristics")) {
SGPath cacheData(globals->get_fg_home());
cacheData.append("ai");
cacheData.append(airport + "-cache.txt");
string revisionStr;
if (cacheData.exists()) {
- ifstream data(cacheData.c_str());
+ std::ifstream data(cacheData.c_str());
data >> revisionStr;
if (revisionStr != "[TrafficManagerCachedata:ref:2011:09:04]") {
SG_LOG(SG_GENERAL, SG_ALERT,"Traffic Manager Warning: discarding outdated cachefile " <<
string buffString;
vector <string> tokens, depTime,arrTime;
vector <string>::iterator it;
- ifstream infile(infileName.str().c_str());
+ std::ifstream infile(infileName.str().c_str());
while (1) {
infile.getline(buffer, 256);
if (infile.eof()) {