FERS
1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
xml_serializer.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-2.0-only
2
//
3
// Copyright (c) 2025-present FERS Contributors (see AUTHORS.md).
4
//
5
// See the GNU GPLv2 LICENSE file in the FERS project root for more information.
6
7
/**
8
* @file xml_serializer.h
9
* @brief Provides functions to serialize the simulation world back into the FERS XML format.
10
*/
11
12
#pragma once
13
14
#include <string>
15
16
namespace
core
17
{
18
class
World;
19
}
20
21
namespace
serial
22
{
23
/**
24
* @brief Serializes the entire simulation world into an XML formatted string.
25
*
26
* This function serves as the reverse of the XML parser. It is essential for allowing
27
* users to modify a scenario in a UI and then export their changes back into a valid
28
* FERS XML file that can be used by the CLI or shared. It iterates through the
29
* in-memory `core::World` object and reconstructs the corresponding XML structure.
30
*
31
* @param world The world object to serialize.
32
* @return A string containing the XML representation of the world.
33
*/
34
std::string
world_to_xml_string
(
const
core::World
& world);
35
}
core::World
The World class manages the simulator environment.
Definition
world.h:38
core
Definition
portable_utils.h:21
serial
Definition
antenna_factory.h:27
serial::world_to_xml_string
std::string world_to_xml_string(const core::World &world)
Serializes the entire simulation world into an XML formatted string.
Definition
xml_serializer.cpp:489
packages
libfers
src
serial
xml_serializer.h
Generated by
1.9.8