43 rootProfile->readFromXml(node);
51 for (std::string
project : packages)
55 profilesFile /=
"StatechartProfiles-" +
project +
".xml";
57 if (std::filesystem::exists(profilesFile))
62 profiles->readStatechartProfiles(xmlReader);
64 catch (std::exception& e)
66 ARMARX_ERROR_S <<
"Reading " << profilesFile.string() <<
" failed: " << e.what();
72 << profilesFile.string();
79 std::vector<StatechartProfilePtr>
82 std::vector<StatechartProfilePtr> profiles;
90 std::set<std::string> result;
94 result.insert(leaf->getName());
107 return rootProfile->findByNameRecursive(name);
118 std::vector<StatechartProfilePtr>& profiles)
const
120 if (currentProfile->children.size() == 0)
122 profiles.push_back(currentProfile);
136 this->parent = parent;
144 std::string packageName = packageNode.attribute_value(
"name");
146 if (std::find(packages.begin(), packages.end(), packageName) == packages.end())
148 packages.push_back(packageName);
153 additionalProperties +=
"#Properties from Statechart profile file: " +
161 std::string name = profileNode.attribute_value(
"name");
173 children.push_back(profile);
175 profile->readFromXml(profileNode);
182 return children.size() == 0;
188 return !parent.lock();
191 std::vector<std::string>
194 std::vector<std::string> packages;
199 packages = parent->getAllPackages();
202 for (std::string package : this->packages)
204 if (std::find(packages.begin(), packages.end(), package) == packages.end())
206 packages.push_back(package);
229 if (parent->isRoot())
234 return parent->getFullName() +
"::" + name;
240 if (this->name == name)
258 const std::vector<StatechartProfilePtr>&
281 return parent.lock();
299 return additionalProperties;