Skip to content

Commit

Permalink
Remove unused private method ParameterMap::retrieveParameter.
Browse files Browse the repository at this point in the history
Refs #9802
  • Loading branch information
martyngigg committed Jul 2, 2014
1 parent b2fb511 commit 626b4b3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
Expand Up @@ -293,9 +293,6 @@ namespace Geometry
private:
///Assignment operator
ParameterMap& operator=(ParameterMap * rhs);
/// Retrieve a parameter by either creating a new one of getting an existing one
Parameter_sptr retrieveParameter(bool &created, const std::string & type, const IComponent* comp,
const std::string & name);
/// internal function to get position of the parameter in the parameter map
component_map_it positionOf(const IComponent* comp,const char *name, const char * type);
///const version of the internal function to get position of the parameter in the parameter map
Expand Down
32 changes: 0 additions & 32 deletions Code/Mantid/Framework/Geometry/src/Instrument/ParameterMap.cpp
Expand Up @@ -936,38 +936,6 @@ namespace Mantid
file->closeGroup();
}

//--------------------------------------------------------------------------
// Private methods
//--------------------------------------------------------------------------
/**
* Retrieve a parameter by either creating a new one of getting an existing one
* @param[out] created Set to true if the named parameter was newly created, false otherwise
* @param type :: A string denoting the type, e.g. double, string, fitting
* @param comp :: A pointer to the component that this parameter is attached to
* @param name :: The name of the parameter
*/
Parameter_sptr ParameterMap::retrieveParameter(bool & created, const std::string & type,
const IComponent* comp, const std::string & name)
{
boost::shared_ptr<Parameter> param;
if( this->contains(comp, name) )
{
param = this->get(comp, name);
if( param->type() != type )
{
throw std::runtime_error("ParameterMap::add - Type mismatch on parameter replacement");
}
created = false;
}
else
{
// Create a new one
param = ParameterFactory::create(type,name);
created = true;
}
return param;
}

} // Namespace Geometry
} // Namespace Mantid

0 comments on commit 626b4b3

Please sign in to comment.