18 #include <utility/exit.hh>
19 #include <utility/vector1.hh>
25 namespace frag_picker {
32 std::map< std::string, ContactType > n2t;
42 std::map< std::string, ContactType > &
name2type() {
44 static std::map< std::string, ContactType > * name2contacttype_ =
new std::map< std::string, ContactType >(
setup_name2type() );
45 return *name2contacttype_;
51 for ( std::map< std::string, ContactType >::const_iterator iter =
name2type().begin(),
52 iter_end =
name2type().
end(); iter != iter_end; ++iter ) {
53 t2n[ iter->second ] = iter->first;
63 return *contacttype2name_;
73 std::map< std::string, ContactType >::const_iterator iter =
name2type().find( name );
75 utility_exit_with_message(
"unrecognized contact type " + name );