23 #include <basic/Tracer.hh>
31 #include <utility/vector0.hh>
34 #include <boost/foreach.hpp>
35 #define foreach BOOST_FOREACH
42 #include <utility/exit.hh>
43 #include <utility/vector1.hh>
46 namespace rotamer_recovery {
50 using std::stringstream;
54 static basic::Tracer
tr(
"protocols.rotamer_recovery.RotamerRecoveryFactory");
102 string const & type_name
104 tr.Trace <<
"get rotamer recovery protocol of type '" << type_name <<
"'" << endl;
105 RRProtocolCreatorMap::const_iterator iter =
protocol_types_.find( type_name );
107 return iter->second->create_protocol();
110 stringstream error_msg;
112 <<
"Attempting to create unrecognized rotamer recovery protocol "
113 <<
"'" << type_name <<
"'." << endl
114 <<
"check spelling or "
115 <<
"register a new RRProtocol with the RotamerRecoveryFactory" << endl
116 <<
"known RRProtocol types are:" << endl;
118 foreach(
const RRProtocolCreatorMap::value_type& type,
protocol_types_){
119 error_msg <<
"\t" << type.first << endl;
121 utility_exit_with_message(error_msg.str());
128 string const & type_name
130 tr.Trace <<
"get rotamer recovery comparer of type '" << type_name <<
"'" << endl;
131 RRComparerCreatorMap::const_iterator iter =
comparer_types_.find( type_name );
133 return iter->second->create_comparer();
136 stringstream error_msg;
138 <<
"Attempting to create unrecognized rotamer recovery comparer "
139 <<
"'" << type_name <<
"'." << endl
140 <<
"check spelling or "
141 <<
"register a new RRComparer with the RotamerRecoveryFactory" << endl
142 <<
"known RRComparer types are:" << endl;
144 foreach(
const RRComparerCreatorMap::value_type& type,
comparer_types_){
145 error_msg <<
"\t" << type.first << endl;
147 utility_exit_with_message(error_msg.str());
154 string const & type_name
156 tr.Trace <<
"get rotamer recovery reporter of type '" << type_name <<
"'" << endl;
157 RRReporterCreatorMap::const_iterator iter =
reporter_types_.find( type_name );
159 return iter->second->create_reporter();
162 stringstream error_msg;
164 <<
"Attempting to create unrecognized rotamer recovery reporter "
165 <<
"'" << type_name <<
"'." << endl
166 <<
"check spelling or "
167 <<
"register a new RRReporter with the RotamerRecoveryFactory" << endl
168 <<
"known RRReporter types are:" << endl;
170 foreach(
const RRReporterCreatorMap::value_type& type,
reporter_types_){
171 error_msg <<
"\t" << type.first << endl;
173 utility_exit_with_message(error_msg.str());
180 string const & protocol_name,
181 string const & comparer_name,
182 string const & reporter_name