50 const int local_num_options = 1;
56 const char* local_SOptions[local_num_options] = {
61 std::string remove_quotes(
const std::string &
option_name,
const std::string &str )
64 str[0]!=
'\"' || str[str.length()-1]!=
'\"', std::logic_error
65 ,
"Error, the option \'" << option_name <<
"\' must have a single set of quotes around it!"
68 return std::string(
"");
69 return str.substr(1,str.length()-2);
74 namespace IterationPack {
78 ,
const char opt_grp_name[] )
79 : OptionsFromStreamPack::SetOptionsFromStreamNode(
80 opt_grp_name, local_num_options, local_SOptions )
81 , OptionsFromStreamPack::SetOptionsToTargetBase<
90 case INTERRUPT_FILE_NAME :
91 target().interrupt_file_name(remove_quotes(
"interrupt_file_name",option_value));
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
const std::string & option_name(OptionsGroup::const_iterator &itr)
AlgorithmSetOptions(Algorithm *target=0, const char opt_grp_name[]="IterationPack_Algorithm")
Acts as the central hub for an iterative algorithm.
void setOption(int option_num, const std::string &option_value)
Overridden from SetOptionsFromStreamNode.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
const std::string & option_value(OptionsGroup::const_iterator &itr)