21 #include <basic/Tracer.hh>
24 #include <utility/tag/Tag.hh>
27 #include <boost/foreach.hpp>
30 #include <utility/vector0.hh>
31 #include <utility/vector1.hh>
33 #define foreach BOOST_FOREACH
39 static basic::Tracer
TR(
"protocols.jd2.parser.TaskOperationLoader" );
50 using namespace core::pack::task::operation;
55 if ( ! tag->hasOption(
"name") ) {
56 utility_exit_with_message(
"Can't create unnamed TaskOperation (type: " + type +
")" );
59 if ( data.
has(
"task_operations", name ) ) {
60 TR.Error <<
"Error TaskOperation of name \"" << name
61 <<
"\" (with type " << type <<
") already exists. \n" << tag << std::endl;
62 utility_exit_with_message(
"Duplicate definition of TaskOperation with name " + name);
65 runtime_assert( new_t_o );
66 data.
add(
"task_operations", name, new_t_o );
67 TR <<
"Defined TaskOperation named \"" << name <<
"\" of type " << type << std::endl;