69    std::string 
const& docString,
 
  123  double convertStringToDouble(std::string 
str)
 const 
  125    #ifdef HAVE_TEUCHOSCORE_CXX11 
  128      if(idx != 
str.length()) { 
 
  129        throw std::invalid_argument( 
"String: '" + 
str + 
"' had bad formatting for converting to a double." );
 
  133      return std::atof(str.c_str());
 
  137  int convertStringToInt(std::string str)
 const 
  139    #ifdef HAVE_TEUCHOSCORE_CXX11 
  141      int result = std::stoi(str, &idx); 
 
  142      if(idx != str.length()) { 
 
  143        throw std::invalid_argument( 
"String: '" + str + 
"' had bad formatting for converting to an int." );
 
  147      return std::atoi(str.c_str());
 
  151  int convertStringToLongLong(std::string str)
 const 
  154    long long result = std::stoll(str, &idx); 
 
  155    if(idx != str.length()) { 
 
  156      throw std::invalid_argument( 
"String: '" + str + 
"' had bad formatting for converting to a long long." );
 
 
Abstract interface for an object that can validate a ParameterEntry's value.
 
virtual void printDoc(std::string const &docString, std::ostream &out) const =0
Print documentation for this parameter.
 
virtual ValidStringsList validStringValues() const =0
Return an array of strings of valid values if applicable.
 
virtual void validate(ParameterEntry const &entry, std::string const ¶mName, std::string const &sublistName) const =0
Validate a parameter entry value and throw std::exception (with a great error message) if validation ...
 
virtual void validateAndModify(std::string const ¶mName, std::string const &sublistName, ParameterEntry *entry) const
Validate and perhaps modify a parameter entry's value.
 
virtual const std::string getXMLTypeName() const =0
Get a string that should be used as a value of the type attribute when serializing it to XML.
 
RCP< const Array< std::string > > ValidStringsList
 
ParameterEntryValidator()
Default Constructor.
 
This object is held as the "value" in the Teuchos::ParameterList std::map.