|
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: 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. More... | |
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) |
Finds the package that contains the given scenario. More... | |
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. More... | |
static bool | isScenarioexistent (const std::string &name, ScenarioManager::Data_Structure::PackagePtr package, const std::string &subPath="") |
isScenarioexistent More... | |
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. More... | |
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. More... | |
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 instance="instanceName" name="applicationName" execPath="./pathToExec"></application> ... </scenario>
This class only parses XML-Files of the specified format.
Definition at line 56 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 280 of file XMLScenarioParser.cpp.
|
static |
|
static |
Finds the package that contains the given scenario.
scenario | Scenario whose package is to be searched |
packages | list of packages which are searched for the scenario |
Definition at line 355 of file XMLScenarioParser.cpp.
|
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 84 of file XMLScenarioParser.cpp.
|
static |
isScenarioexistent
name | name of the scenario |
package | package the scenario is located in |
Definition at line 273 of file XMLScenarioParser.cpp.
|
static |
Parses a .xml scenario file and creates a Scenario object out of it.
path | to the scenario file |
|
static |
|
static |
Saves a Scenario by recreating its .xml file based on its data.
scenario | Scenario which is to be saved |
Definition at line 322 of file XMLScenarioParser.cpp.