40 using namespace Parser;
41 using namespace Data_Structure;
43 std::map<std::string, DependencyTree> PackageBuilder::cachedTrees;
54 for (
auto scenario : scenarios)
56 scenario.append(
"::Package::" + name);
57 scenarios[i] = scenario;
62 return parsePackage(name, scenarios);
79 for (
auto executable : executables)
81 auto application = std::make_shared<Data_Structure::Application>(executable, pFinder.
getBinaryDir(), result->getName());
82 result->addApplication(application);
87 std::vector<std::string> packageScenarios =
parser.getScenariosFromFolder(scenarioDir);
89 for (
auto scenarioName : packageScenarios)
91 for (
unsigned int i = 0; i < openedScenarios.size(); i++)
95 auto pos = openedScenarios[i].find(
"::Package::");
96 stringSplit.push_back(openedScenarios[i].substr(0, pos));
97 stringSplit.push_back(openedScenarios[i].substr(pos + 11));
99 if (scenarioName.compare(stringSplit.at(0)) == 0 && result->getName().compare(stringSplit.at(1)) == 0)
103 auto subfolderPos = scenarioName.find(
"/");
104 if (subfolderPos != std::string::npos)
106 scenario =
parser.parseScenario(result, scenarioName.substr(subfolderPos + 1), scenarioName.substr(0, subfolderPos));
110 scenario =
parser.parseScenario(result, scenarioName);
113 if (scenario.get() !=
nullptr)
115 scenario->reloadAppInstances();
116 result->addScenario(scenario);
120 ARMARX_INFO_S <<
"Could not find / parse Scenario at " + scenarioDir +
" despite CMake knows it.";
129 ARMARX_INFO <<
"Package '" << name <<
"' not found!";
138 for (
auto package : packages)
145 if (std::find(scenarios.begin(), scenarios.end(), scenario) != scenarios.end())
147 result.push_back(package);