| 124 | } |
| 125 | |
| 126 | void HoRevision::FromXml(const IXmlNode& revision_node) { |
| 127 | IXmlNode::ChildList node_list; |
| 128 | revision_node.GetChildList(node_list); |
| 129 | for (const IXmlNode* node : node_list) { |
| 130 | if (node == nullptr) { |
| 131 | continue; |
| 132 | } |
| 133 | if (node->IsTagName("TEAM-MEMBER-REF")) { |
| 134 | if (team_member_ref_ = node->Attribute<std::string>("ID-REF", ""); |
| 135 | team_member_ref_.empty()) { |
| 136 | team_member_ref_ = node->Value<std::string>(); |
| 137 | } |
| 138 | } else if (node->IsTagName("REVISION-LABEL")) { |
| 139 | revision_label_ = node->Value<std::string>(); |
| 140 | } else if (node->IsTagName("STATE")) { |
| 141 | state_ = node->Value<std::string>(); |
| 142 | } else if (node->IsTagName("DATE")) { |
| 143 | date_ = node->Value<std::string>(); |
| 144 | } else if (node->IsTagName("COMPANY-REVISION-INFOS")) { |
| 145 | IXmlNode::ChildList company_list; |
| 146 | node->GetChildList(company_list); |
| 147 | for (const IXmlNode* company_node : company_list) { |
| 148 | if (company_node != nullptr |
| 149 | && company_node->IsTagName("COMPANY-REVISION-INFO")) { |
| 150 | HoCompanyRevision revision; |
| 151 | if (const auto* data_ref_node = company_node->GetNode("COMPANY-DATA-REF"); |
| 152 | data_ref_node != nullptr ) { |
| 153 | if (revision.DataReference = data_ref_node->Attribute<std::string>("ID-REF", ""); |
| 154 | revision.DataReference.empty() ) { |
| 155 | revision.DataReference = data_ref_node->Value<std::string>(); |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | revision.Label = |
| 160 | company_node->Property<std::string>("REVISION-LABEL", ""); |
| 161 | revision.State = |
| 162 | company_node->Property<std::string>("STATE", ""); |
| 163 | AddCompanyRevision(revision); |
| 164 | } |
| 165 | } |
| 166 | } else if (node->IsTagName("MODIFICATIONS")) { |
| 167 | IXmlNode::ChildList modification_list; |
| 168 | node->GetChildList(modification_list); |
| 169 | for (const IXmlNode* modification_node : modification_list) { |
| 170 | if (modification_node != nullptr |
| 171 | && modification_node->IsTagName("MODIFICATION")) { |
| 172 | HoModification modification; |
| 173 | modification.Change = |
| 174 | modification_node->Property<std::string>("CHANGE", ""); |
| 175 | modification.Reason = |
| 176 | modification_node->Property<std::string>("REASON", ""); |
| 177 | AddModification(modification); |
| 178 | } |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 |
nothing calls this directly
no test coverage detected