Changeset 347 for XIOS/trunk/src/group_factory_impl.hpp
- Timestamp:
- 05/21/12 17:57:22 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/group_factory_impl.hpp
r335 r347 30 30 << " pgroup or cgroup NULL !"); 31 31 if (!child->hasId()) 32 group->childList.insert(group->childList.end(), child );32 group->childList.insert(group->childList.end(), child.get()); 33 33 else 34 34 { 35 group->childList.insert(group->childList.end(), child );36 group->childMap.insert(std::make_pair(child->getId(), child ));35 group->childList.insert(group->childList.end(), child.get()); 36 group->childMap.insert(std::make_pair(child->getId(), child.get())); 37 37 } 38 38 } … … 47 47 { 48 48 boost::shared_ptr<U> value = CObjectFactory::CreateObject<U>(CObjectFactory::GenUId<U>()); 49 group->groupList.insert(group->groupList.end(), value );50 group->groupMap.insert(std::make_pair(value->getId(), value ));49 group->groupList.insert(group->groupList.end(), value.get()); 50 group->groupMap.insert(std::make_pair(value->getId(), value.get())); 51 51 return (value); 52 52 } … … 56 56 { 57 57 boost::shared_ptr<U> value = CObjectFactory::CreateObject<U>(id); 58 group->groupList.insert(group->groupList.end(), value );59 group->groupMap.insert(std::make_pair(id, value ));58 group->groupList.insert(group->groupList.end(), value.get()); 59 group->groupMap.insert(std::make_pair(id, value.get())); 60 60 return (value); 61 61 } … … 72 72 boost::shared_ptr<typename U::RelChild> value = 73 73 CObjectFactory::CreateObject<typename U::RelChild>(); 74 group->childList.insert(group->childList.end(), value );75 group->childMap.insert(std::make_pair(value->getId(), value ));74 group->childList.insert(group->childList.end(), value.get()); 75 group->childMap.insert(std::make_pair(value->getId(), value.get())); 76 76 return (value); 77 77 } … … 82 82 boost::shared_ptr<typename U::RelChild> value = 83 83 CObjectFactory::CreateObject<typename U::RelChild>(id); 84 group->childList.insert(group->childList.end(), value );85 group->childMap.insert(std::make_pair(id, value ));84 group->childList.insert(group->childList.end(), value.get()); 85 group->childMap.insert(std::make_pair(id, value.get())); 86 86 return (value); 87 87 } … … 120 120 << "[ id = " << id << ", U = " << U::GetName() << " ] " 121 121 << " group is not referenced !"); 122 return (group->groupMap[id] );122 return (group->groupMap[id]->getShared()); 123 123 } 124 124 … … 131 131 << "[ id = " << id << ", U = " << U::GetName() << " ] " 132 132 << " child is not referenced !"); 133 return (group->childMap[id] );133 return (group->childMap[id]->getShared()); 134 134 } 135 135
Note: See TracChangeset
for help on using the changeset viewer.