JSBSim Flight Dynamics Model 1.2.2 (22 Mar 2025)
An Open Source Flight Dynamics and Control Software Library in C++
Loading...
Searching...
No Matches
XMLFile Class Reference

Detailed Description

This class is solely for the purpose of determining what type of file is given on the command line.

Definition at line 155 of file JSBSim.cpp.

+ Inheritance diagram for XMLFile:
+ Collaboration diagram for XMLFile:

Public Member Functions

bool IsAircraftFile (const SGPath &filename)
 
bool IsInitFile (const SGPath &filename)
 
bool IsLogDirectiveFile (const SGPath &filename)
 
bool IsScriptFile (const SGPath &filename)
 
- Public Member Functions inherited from FGXMLFileRead
ElementLoadXMLDocument (const SGPath &XML_filename, bool verbose=true)
 
ElementLoadXMLDocument (const SGPath &XML_filename, FGXMLParse &fparse, bool verbose=true)
 
void ResetParser (void)
 

Member Function Documentation

◆ IsAircraftFile()

bool IsAircraftFile ( const SGPath &  filename)
inline

Definition at line 171 of file JSBSim.cpp.

171 {
172 bool result=false;
173 Element* document = LoadXMLDocument(filename, false);
174 if (document && document->GetName() == "fdm_config") result = true;
175 ResetParser();
176 return result;
177 }
const std::string & GetName(void) const
Retrieves the element name.

◆ IsInitFile()

bool IsInitFile ( const SGPath &  filename)
inline

Definition at line 178 of file JSBSim.cpp.

178 {
179 bool result=false;
180 Element *document = LoadXMLDocument(filename, false);
181 if (document && document->GetName() == "initialize") result = true;
182 ResetParser();
183 return result;
184 }

◆ IsLogDirectiveFile()

bool IsLogDirectiveFile ( const SGPath &  filename)
inline

Definition at line 164 of file JSBSim.cpp.

164 {
165 bool result=false;
166 Element *document = LoadXMLDocument(filename, false);
167 if (document && document->GetName() == "output") result = true;
168 ResetParser();
169 return result;
170 }

◆ IsScriptFile()

bool IsScriptFile ( const SGPath &  filename)
inline

Definition at line 157 of file JSBSim.cpp.

157 {
158 bool result=false;
159 Element *document = LoadXMLDocument(filename, false);
160 if (document && document->GetName() == "runscript") result = true;
161 ResetParser();
162 return result;
163 }

The documentation for this class was generated from the following file: