20 #include <basic/Tracer.hh>
21 #include <utility/tag/Tag.hh>
25 #include <utility/vector0.hh>
28 #include <boost/foreach.hpp>
29 #define foreach BOOST_FOREACH
35 #include <utility/vector1.hh>
42 namespace evaluation {
47 using std::stringstream;
55 static basic::Tracer
tr(
"protocols.evaluator.EvaluatorFactory");
83 types_.push_back(pair<string,EvaluatorCreatorCOP>(creator->type_name(), creator));
89 string const & type_name,
93 tr.Trace <<
"generate Evaluator of type " << type_name << std::endl;
97 for(EvaluatorCreatorMap::const_iterator type =
types_.begin(), type_end =
types_.end(); type != type_end; ++type) {
98 if(type->first == type_name){
99 type->second->add_evaluators(eval);
105 stringstream error_msg;
107 <<
"Attempting to create unrecognized Evaluator "
108 <<
"'" << type_name <<
"'." << endl
109 <<
"check spelling or "
110 <<
"register a new Evaluator in the EvaluatorFactory" << endl
111 <<
"known Evaluator types are:" << endl;
113 for(EvaluatorCreatorMap::const_iterator type =
types_.begin(), type_end =
types_.end(); type != type_end; ++type) {
114 error_msg <<
"\t" << type->first << endl;
116 utility_exit_with_message(error_msg.str());
124 for(EvaluatorCreatorMap::const_iterator type =
types_.begin(), type_end =
types_.end(); type != type_end; ++type) {
125 type->second->add_evaluators(eval);