| 72 | } |
| 73 | |
| 74 | void XmlRepository::saveGroup(const std::shared_ptr<AnnotationGroup>& group, pugi::xml_node* node) const |
| 75 | { |
| 76 | pugi::xml_node nodeGroup = node->append_child("Group"); |
| 77 | pugi::xml_attribute attributeName = nodeGroup.append_attribute("Name"); |
| 78 | attributeName.set_value(group->getName().c_str()); |
| 79 | pugi::xml_attribute attributeGroup = nodeGroup.append_attribute("PartOfGroup"); |
| 80 | if (group->getGroup()) { |
| 81 | attributeGroup.set_value(group->getGroup()->getName().c_str()); |
| 82 | } |
| 83 | else { |
| 84 | attributeGroup.set_value("None"); |
| 85 | } |
| 86 | pugi::xml_attribute attributeColor = nodeGroup.append_attribute("Color"); |
| 87 | attributeColor.set_value(group->getColor().c_str()); |
| 88 | |
| 89 | pugi::xml_node nodeAttributes = nodeGroup.append_child("Attributes"); |
| 90 | std::map<std::string, std::string> attributes = group->getAttributes(); |
| 91 | for (std::map<std::string, std::string>::const_iterator it = attributes.begin(); it != attributes.end(); ++it) { |
| 92 | pugi::xml_node nodeAttribute = nodeAttributes.append_child("Attribute"); |
| 93 | pugi::xml_attribute attribute = nodeAttribute.append_attribute(it->first.c_str()); |
| 94 | attribute.set_value(it->second.c_str()); |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | bool XmlRepository::loadFromRepo() |
| 99 | { |
nothing calls this directly
no test coverage detected