MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / loadSubtreeModel

Method loadSubtreeModel

src/xml_parsing.cpp:321–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321void BT::XMLParser::PImpl::loadSubtreeModel(const XMLElement* xml_root)
322{
323 for(auto models_node = xml_root->FirstChildElement("TreeNodesModel");
324 models_node != nullptr; models_node = models_node->NextSiblingElement("TreeNodesMo"
325 "del"))
326 {
327 for(auto sub_node = models_node->FirstChildElement("SubTree"); sub_node != nullptr;
328 sub_node = sub_node->NextSiblingElement("SubTree"))
329 {
330 auto subtree_id = sub_node->Attribute("ID");
331 if(subtree_id == nullptr)
332 {
333 throw RuntimeError("Missing attribute 'ID' in SubTree element "
334 "within TreeNodesModel");
335 }
336 parseSubtreeModelPorts(sub_node, subtree_models[subtree_id]);
337 }
338 }
339}
340
341void XMLParser::PImpl::loadDocImpl(XMLDocument* doc, bool add_includes)
342{

Callers

nothing calls this directly

Calls 5

RuntimeErrorClass · 0.85
parseSubtreeModelPortsFunction · 0.85
FirstChildElementMethod · 0.80
NextSiblingElementMethod · 0.80
AttributeMethod · 0.80

Tested by

no test coverage detected