48 namespace OptionsFromStreamPack {
51 ,
int num_options,
const char* option_names[],
bool exists_optional )
52 : name_map_( options_group, num_options, option_names )
53 , exists_optional_(exists_optional)
62 ,
"SetOptionsFromStreamNode::set_options(...) : "
64 <<
" does not exist" );
70 for( ; itr != optgrp.
end(); ++itr ) {
Extracts options from a text stream and then allows convenient access to them.
option_to_value_map_t::const_iterator const_iterator
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
const std::string & option_name(OptionsGroup::const_iterator &itr)
void set_options(const OptionsFromStream &options)
Overridden from SetOptionsFromStream and calls setOption(...).
static bool options_group_exists(const options_group_t &options_group)
SetOptionsFromStreamNode(const std::string &options_group, int num_options, const char *option_names[], bool exists_optional=true)
Constructs with the name of the options group and the names of the options.
virtual void setOption(int option_num, const std::string &option_value)=0
To be overridden by the subclass to set an option given its integer position and the option value...
Class used to encapsulate options belonging an options group.
const OptionsFromStream::options_group_t options_group(OptionsFromStream::const_iterator &itr)
options_group_t options_group(const std::string &options_group_name)
const std::string & name() const
const std::string & option_value(OptionsGroup::const_iterator &itr)