67 vector<FGInputType*>::iterator it;
68 for (it = InputTypes.begin(); it != InputTypes.end(); ++it)
86 if (!element)
return false;
90 size_t idx = InputTypes.size();
94 if (
debug_lvl > 0) cout << endl <<
" Input data set: " << idx <<
" " << endl;
98 if (type.empty() || type ==
"SOCKET") {
100 }
else if (type ==
"QTJSBSIM") {
102 }
else if (type !=
string(
"NONE")) {
104 <<
"Unknown type of input specified in config file" << endl;
107 if (!Input)
return false;
110 Input->
Load(element);
113 InputTypes.push_back(Input);
127 vector<FGInputType*>::iterator it;
128 for (it = InputTypes.begin(); it != InputTypes.end(); ++it)
129 ret &= (*it)->InitModel();
138 if (
FDMExec->GetTrimStatus())
return true;
140 if (!enabled)
return true;
142 vector<FGInputType*>::iterator it;
143 for (it = InputTypes.begin(); it != InputTypes.end(); ++it)
157 s <<
"Could not read directive file: " << fname;
160 bool result =
Load(document);
163 cerr << endl <<
"Aircraft input element has problems in file " << fname << endl;
172 if (idx >= (
int)0 && idx < (
int)InputTypes.size())
173 return InputTypes[idx]->Toggle();
182 if (idx >= InputTypes.size())
return false;
184 InputTypes[idx]->SetInputName(
name);
194 if (idx < InputTypes.size())
195 name = InputTypes[idx]->GetInputName();
219void FGInput::Debug(
int from)
232 if (from == 0) cout <<
"Instantiated: FGInput" << endl;
233 if (from == 1) cout <<
"Destroyed: FGInput" << endl;
std::string ReadFrom(void) const
Return a string that contains a description of the location where the current XML element was read fr...
std::string GetAttributeValue(const std::string &key)
Retrieves an attribute.
void PostLoad(Element *el, FGFDMExec *fdmex, std::string prefix="")
void PreLoad(Element *el, FGFDMExec *fdmex, std::string prefix="")
Element_ptr Open(Element *el)
bool InitModel(void) override
FGModel(FGFDMExec *)
Constructor.
virtual bool Run(bool Holding)
Runs the model; called by the Executive.
Element * LoadXMLDocument(const SGPath &XML_filename, bool verbose=true)
This class is solely for the purpose of determining what type of file is given on the command line.
std::string & to_upper(std::string &str)