Skip to content
Snippets Groups Projects
Commit c57c3939 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: make GetParameterInt GetParameterFloat and GetParameterString const

parent 0e324b29
No related branches found
No related tags found
No related merge requests found
......@@ -103,7 +103,7 @@ VectorClassifier
template<>
bool
VectorClassifier
::shouldComputeConfidenceMap()
::shouldComputeConfidenceMap() const
{
bool computeConfidenceMap(GetParameterInt("confmap") && m_Model->HasConfidenceIndex() );
......
......@@ -94,7 +94,7 @@ VectorRegression
template<>
bool
VectorRegression
::shouldComputeConfidenceMap()
::shouldComputeConfidenceMap() const
{
return false;
}
......
......@@ -100,7 +100,7 @@ private:
void DoExecute() override;
bool shouldComputeConfidenceMap();
bool shouldComputeConfidenceMap() const;
ModelPointerType m_Model;
};
......
......@@ -420,14 +420,14 @@ public:
* \li ParameterType_Radius
* \li ParameterType_Choice
*/
int GetParameterInt(std::string parameter);
int GetParameterInt(std::string parameter) const;
/* Get a floating parameter value
*
* Can be called for types :
* \li ParameterType_Float
*/
float GetParameterFloat(std::string parameter);
float GetParameterFloat(std::string parameter) const;
/* Get a string parameter value
*
......@@ -441,7 +441,7 @@ public:
* \li ParameterType_OutputImage
* \li ParameterType_OutputVectorData
*/
std::string GetParameterString(std::string parameter);
std::string GetParameterString(std::string parameter) const;
/* Get a string list parameter value
*
......
......@@ -1234,17 +1234,17 @@ void Application::SetParameterDescription(std::string parameter, std::string des
param->SetDescription(desc);
}
int Application::GetParameterInt(std::string key)
int Application::GetParameterInt(std::string key) const
{
return GetParameterByKey(key)->ToInt();
}
float Application::GetParameterFloat(std::string key)
float Application::GetParameterFloat(std::string key) const
{
return GetParameterByKey(key)->ToFloat();
}
std::string Application::GetParameterString(std::string key)
std::string Application::GetParameterString(std::string key) const
{
return GetParameterByKey(key)->ToString();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment