|
FERS 1.0.0
The Flexible Extensible Radar Simulator
|
Implementation file for parsing XML configuration files for simulation. More...
#include "xml_parser.h"#include <GeographicLib/UTMUPS.hpp>#include <cmath>#include <filesystem>#include <functional>#include <memory>#include <random>#include <span>#include <string_view>#include <utility>#include <vector>#include "antenna/antenna_factory.h"#include "core/config.h"#include "core/logging.h"#include "core/parameters.h"#include "core/world.h"#include "fers_xml_dtd.h"#include "fers_xml_xsd.h"#include "libxml_wrapper.h"#include "math/coord.h"#include "math/geometry_ops.h"#include "math/path.h"#include "math/rotation_path.h"#include "radar/platform.h"#include "radar/radar_obj.h"#include "radar/receiver.h"#include "radar/target.h"#include "radar/transmitter.h"#include "timing/prototype_timing.h"#include "timing/timing.h"#include "waveform_factory.h"
Include dependency graph for xml_parser.cpp:Go to the source code of this file.
Namespaces | |
| namespace | serial |
Functions | |
| template<typename T > | |
| void | parseElements (const XmlElement &root, const std::string &elementName, World *world, T parseFunction) |
| Parses elements with child iteration (e.g., waveforms, timings, antennas). | |
| void | serial::parseSimulation (const std::string &filename, core::World *world, bool validate, std::mt19937 &masterSeeder) |
| Parses a simulation configuration from an XML file. | |
| void | serial::parseSimulationFromString (const std::string &xmlContent, World *world, const bool validate, std::mt19937 &masterSeeder) |
Variables | |
| auto | get_child_real_type |
| Helper function to extract a RealType value from an element. | |
| auto | get_attribute_bool |
| Helper function to extract a boolean value from an attribute. | |
Implementation file for parsing XML configuration files for simulation.
Definition in file xml_parser.cpp.
| void parseElements | ( | const XmlElement & | root, |
| const std::string & | elementName, | ||
| World * | world, | ||
| T | parseFunction | ||
| ) |
Parses elements with child iteration (e.g., waveforms, timings, antennas).
| T | The type of the parsing function. |
| root | The root XmlElement to parse. |
| elementName | The name of the child elements to iterate over. |
| world | A pointer to the World object where parsed data is added. |
| parseFunction | The parsing function to call for each child element. |
Definition at line 74 of file xml_parser.cpp.
References XmlElement::childElement(), and XmlElement::isValid().
Here is the call graph for this function:| auto get_attribute_bool |
Helper function to extract a boolean value from an attribute.
| element | The XmlElement to extract the value from. |
| attributeName | The name of the attribute to extract the value from. |
| defaultVal | The default value to return if the attribute is empty or cannot be parsed. |
Definition at line 114 of file xml_parser.cpp.
| auto get_child_real_type |
Helper function to extract a RealType value from an element.
| element | The XmlElement to extract the value from. |
| elementName | The name of the child element to extract the value from. |
| XmlException | if the element is empty or cannot be parsed. |
Definition at line 96 of file xml_parser.cpp.