Ignore:
Timestamp:
05/21/12 17:57:22 (12 years ago)
Author:
ymipsl
Message:
  • Supress lot of shared_ptr
  • instrument code for vampir-trace and timer diagnostic

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/group_factory_impl.hpp

    r335 r347  
    3030               << " pgroup or cgroup NULL !"); 
    3131      if (!child->hasId()) 
    32          group->childList.insert(group->childList.end(), child); 
     32         group->childList.insert(group->childList.end(), child.get()); 
    3333      else 
    3434      { 
    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())); 
    3737      } 
    3838   } 
     
    4747      { 
    4848         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())); 
    5151         return (value); 
    5252      } 
     
    5656      { 
    5757         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())); 
    6060         return (value); 
    6161      } 
     
    7272         boost::shared_ptr<typename U::RelChild> value = 
    7373               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())); 
    7676         return (value); 
    7777      } 
     
    8282         boost::shared_ptr<typename U::RelChild> value = 
    8383               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())); 
    8686         return (value); 
    8787      } 
     
    120120               << "[ id = " << id << ", U = " << U::GetName() << " ] " 
    121121               << " group is not referenced !"); 
    122       return (group->groupMap[id]); 
     122      return (group->groupMap[id]->getShared()); 
    123123   } 
    124124 
     
    131131               << "[ id = " << id << ", U = " << U::GetName() << " ] " 
    132132               << " child is not referenced !"); 
    133       return (group->childMap[id]); 
     133      return (group->childMap[id]->getShared()); 
    134134   } 
    135135 
Note: See TracChangeset for help on using the changeset viewer.