42 #include "OptionsFromStreamPack_StringToIntMap.hpp"
44 namespace OptionsFromStreamPack {
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;
54 ,
"StringToIntMap::StringToIntMap(...): "
55 <<
"Error, the option \"" << strings[i] <<
"\" is a duplicate for options_group \""
62 map_t::const_iterator itr = map_.find( str );
65 ,
"StringToIntMap::operator(...): "
66 <<
"Error, the option \"" << str <<
"\" is not recongnised for options_group \""
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
int operator()(const std::string &str) const