42 #include "OptionsFromStreamPack_StringToIntMap.hpp" 46 StringToIntMap::StringToIntMap(
const std::string& name,
int n,
const char* strings[] )
49 typedef map_t::value_type val_t;
50 for(
int i = 0; i < n; ++i ) {
51 const bool unique = map_.insert( val_t( strings[i], i ) ).second;
52 TEUCHOS_TEST_FOR_EXCEPTION(
54 ,
"StringToIntMap::StringToIntMap(...): " 55 <<
"Error, the option \"" << strings[i] <<
"\" is a duplicate for options_group \"" 62 map_t::const_iterator itr = map_.find( str );
63 TEUCHOS_TEST_FOR_EXCEPTION(
65 ,
"StringToIntMap::operator(...): " 66 <<
"Error, the option \"" << str <<
"\" is not recongnised for options_group \""
int operator()(const std::string &str) const