Commit 269e8baf authored by Christophe Palmann's avatar Christophe Palmann

ENH: extendedfilename, check if values are set

parent ebf9b215
......@@ -40,20 +40,26 @@ ExtendedFilenameHelper
{
boost::split(tmp2, tmp1[1], boost::is_any_of("&"), boost::token_compress_on);
for (unsigned int i=0; i<tmp2.size(); i++)
if (tmp2[i].length() >0)
{
std::vector<std::string> tmp;
boost::split(tmp, tmp2[i], boost::is_any_of("="), boost::token_compress_on);
if (tmp.size()>1)
{
if (m_OptionMap[tmp[0]].empty())
{
m_OptionMap[tmp[0]]=tmp[1];
}
else
{
itkWarningMacro("Duplicated option detected: " << tmp[0] << ". Using value " << tmp[1] << ".");
}
}
std::vector<std::string> tmp;
boost::split(tmp, tmp2[i], boost::is_any_of("="), boost::token_compress_on);
if (tmp.size()>1)
{
if (tmp[1].length()>0)
{
if (m_OptionMap[tmp[0]].empty())
{
m_OptionMap[tmp[0]]=tmp[1];
}
else
{
itkWarningMacro("Duplicated option detected: " << tmp[0] << ". Using value " << tmp[1] << ".");
}
}
else
itkGenericExceptionMacro( << "Value for option '" << tmp[0] << "' is not set.");
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment