Changeset 472 for XIOS/trunk/src/group_parser.hpp
- Timestamp:
- 02/03/14 14:16:20 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/group_parser.hpp
r462 r472 80 80 } 81 81 } 82 83 /// ////////////////////// Définitions ////////////////////// /// 84 template <class U, class V, class W> 85 void CGroupTemplate<U, V, W>::parseChild(xml::CXMLNode & node) 86 { 82 87 88 89 // PARSING POUR GESTION DES ENFANTS 90 V* group_ptr = (this->hasId()) 91 ? V::get(this->getId()) 92 : boost::polymorphic_downcast<V*>(this); 93 94 StdString name = node.getElementName(); 95 attributes.clear(); 96 attributes = node.getAttributes(); 97 98 if (name.compare(V::GetName()) == 0) 99 { 100 if (attributes.end() == attributes.find("id")) 101 CGroupFactory::CreateGroup(group_ptr->getShared())->parse(node); 102 return ; 103 else 104 CGroupFactory::CreateGroup(group_ptr->getShared(), attributes["id"])->parse(node); 105 continue; 106 } 107 108 if (name.compare(U::GetName()) == 0) 109 { 110 if (attributes.end() == attributes.find("id")) 111 CGroupFactory::CreateChild(group_ptr->getShared())->parse(node); 112 return ; 113 else 114 CGroupFactory::CreateChild(group_ptr->getShared(), attributes["id"])->parse(node); 115 continue; 116 } 117 118 DEBUG(<< "Dans le contexte \'" << CContext::getCurrent()->getId() 119 << "\', un objet de type \'" << V::GetName() 120 << "\' ne peut contenir qu'un objet de type \'" << V::GetName() 121 << "\' ou de type \'" << U::GetName() 122 << "\' (reçu : " << name << ") !"); 123 124 } 83 125 } // namespace xios 84 126
Note: See TracChangeset
for help on using the changeset viewer.