Skip to content

Commit

Permalink
Re #8710 Added doc headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Leal committed Jan 16, 2014
1 parent f089fdc commit 1ce9736
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
Expand Up @@ -274,8 +274,8 @@ namespace Geometry
void saveNexus(::NeXus::File * file, const std::string & group) const;
// void loadNexus(::NeXus::File * file, const std::string & group, Instrument_const_sptr instr);

void copyFromParameterMap(const IComponent* oldComp,
const IComponent* newComp, const ParameterMap *oldPMap);
/// Copy pairs (oldComp->id,Parameter) to the m_map assigning the new newComp->id
void copyFromParameterMap(const IComponent* oldComp,const IComponent* newComp, const ParameterMap *oldPMap);

private:
///Assignment operator
Expand Down
38 changes: 19 additions & 19 deletions Code/Mantid/Framework/Geometry/src/Instrument/ParameterMap.cpp
Expand Up @@ -860,6 +860,25 @@ namespace Mantid
return m_boundingBoxMap.getCache(comp->getComponentID(),box);
}

/**
* Copy pairs (oldComp->id,Parameter) to the m_map
* assigning the new newComp->id
* @param oldComp :: Old component
* @param newComp :: New component
* @param oldPMap :: Old map corresponding to the Old component
*/
void ParameterMap::copyFromParameterMap(const IComponent* oldComp,
const IComponent* newComp, const ParameterMap *oldPMap) {

std::set<std::string> oldParameterNames = oldPMap->names(oldComp);

for(auto it = oldParameterNames.begin(); it != oldParameterNames.end(); ++it) {
Parameter_sptr thisParameter = oldPMap->get(oldComp,*it);
// Insert the fecthed parameter in the m_map
m_map.insert(std::make_pair(newComp->getComponentID(),thisParameter));
}
}

//--------------------------------------------------------------------------
// Private methods
//--------------------------------------------------------------------------
Expand Down Expand Up @@ -972,25 +991,6 @@ namespace Mantid
// }


/**
* Copy pairs (oldComp->id,Parameter) to the m_map
* assigning the new newComp->id
*
*/
void ParameterMap::copyFromParameterMap(const IComponent* oldComp,
const IComponent* newComp, const ParameterMap *oldPMap) {

std::set<std::string> oldParameterNames = oldPMap->names(oldComp);

for(auto it = oldParameterNames.begin(); it != oldParameterNames.end(); ++it) {
Parameter_sptr thisParameter = oldPMap->get(oldComp,*it);
// Insert the fecthed parameter in the m_map
m_map.insert(std::make_pair(newComp->getComponentID(),thisParameter));
}
}



} // Namespace Geometry
} // Namespace Mantid

0 comments on commit 1ce9736

Please sign in to comment.