42 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();
71 ARMARX_DEBUG_S <<
"StatechartProfiles File not found for project " <<
project <<
": " << profilesFile.string();
80 std::vector<StatechartProfilePtr> profiles;
87 std::set<std::string> result;
91 result.insert(leaf->getName());
103 return rootProfile->findByNameRecursive(name);
113 if (currentProfile->children.size() == 0)
115 profiles.push_back(currentProfile);
130 this->parent = parent;
137 std::string packageName = packageNode.attribute_value(
"name");
139 if (std::find(packages.begin(), packages.end(), packageName) == packages.end())
141 packages.push_back(packageName);
152 std::string name = profileNode.attribute_value(
"name");
161 profile.reset(
new StatechartProfile(profileNode.attribute_value(
"name"), shared_from_this()));
162 children.push_back(profile);
164 profile->readFromXml(profileNode);
170 return children.size() == 0;
175 return !parent.lock();
180 std::vector<std::string> packages;
185 packages = parent->getAllPackages();
188 for (std::string package : this->packages)
190 if (std::find(packages.begin(), packages.end(), package) == packages.end())
192 packages.push_back(package);
213 if (parent->isRoot())
218 return parent->getFullName() +
"::" + name;
223 if (this->name == name)
261 return parent.lock();
276 return additionalProperties;