|
|
This class provides different methods to parse and save scenario data in XML-Files. More...
#include <ArmarXCore/util/ScenarioManagerCommon/parser/XMLScenarioParser.h>
Static Public Member Functions | |
| static ScenarioManager::Data_Structure::ScenarioPtr | createNewScenario (const std::string &name, ScenarioManager::Data_Structure::PackagePtr package) |
| Creates a new scenario with the given name within the given package. | |
| static std::string | getPackageNameFromScx (const std::string &path) |
| static ScenarioManager::Data_Structure::PackagePtr | getScenarioPackage (const ScenarioManager::Data_Structure::ScenarioPtr &scenario, const ScenarioManager::Data_Structure::PackageVectorPtr &packages) |
| parseScenarioByFile parses an scenario file and returns the curresponding ScenarioPtr. | |
| static std::vector< std::string > | getScenariosFromFolder (const std::string &folder) |
| Finds all .xml scenario files in a folder and returns a list of paths to them. | |
| static bool | isScenarioexistent (const std::string &name, ScenarioManager::Data_Structure::PackagePtr package, const std::string &subPath="") |
| isScenarioexistent | |
| static ScenarioManager::Data_Structure::ScenarioPtr | parseScenario (Data_Structure::PackagePtr package, std::string name, std::string subfolder="") |
| Parses a .xml scenario file and creates a Scenario object out of it. | |
| static ScenarioManager::Data_Structure::ScenarioPtr | parseScenario (ScenarioManager::Data_Structure::ScenarioPtr scenario) |
| static void | saveScenario (const Data_Structure::ScenarioWPtr &scenario, bool saveApplications) |
| Saves a Scenario by recreating its .xml file based on its data. | |
This class provides different methods to parse and save scenario data in XML-Files.
To save Scenario data between sessions, scenarios should be saved in XML-Files using the following format:
<scenario name="name" lastChange="YYYY-MM-DD.hh:mm:ss" creation="YYYY-MM-DD.hh:mm:ss"> ... </application> ... </scenario>
This class only parses XML-Files of the specified format.
Definition at line 58 of file XMLScenarioParser.h.
|
static |
Creates a new scenario with the given name within the given package.
| name | name of the new scenario |
| package | package the new scenario is created in |
Definition at line 309 of file XMLScenarioParser.cpp.
Here is the call graph for this function:
|
static |
Definition at line 404 of file XMLScenarioParser.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
parseScenarioByFile parses an scenario file and returns the curresponding ScenarioPtr.
(Used for CLI, it is possible to create an scenario without an package pointer. Warning Scenario without PackagePtr need to have an dependencie.config of the package in the CacheFolder)
| path | path to scx file |
| package | (optional else nullptr) |
| scenario | Scenario whose package is to be searched |
| packages | list of packages which are searched for the scenario |
Definition at line 388 of file XMLScenarioParser.cpp.
Here is the call graph for this function:
|
static |
Finds all .xml scenario files in a folder and returns a list of paths to them.
| folder | path to the folder |
Definition at line 86 of file XMLScenarioParser.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
isScenarioexistent
| name | name of the scenario |
| package | package the scenario is located in |
Definition at line 299 of file XMLScenarioParser.cpp.
Here is the call graph for this function:
|
static |
Parses a .xml scenario file and creates a Scenario object out of it.
| path | to the scenario file |
Definition at line 113 of file XMLScenarioParser.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
|
static |
Saves a Scenario by recreating its .xml file based on its data.
| scenario | Scenario which is to be saved |
Definition at line 354 of file XMLScenarioParser.cpp.
Here is the call graph for this function: