00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00026 #include <map>
00027 #include "agenda_class.h"
00028 #include "messages.h"
00029 #include "wsv_aux.h"
00030 #include "agenda_record.h"
00031 #include "workspace_ng.h"
00032
00033
00034
00035 void AgendaExecute(Workspace& ws,
00036
00037 const Agenda& this_agenda)
00038 {
00039 out3 << " Manual agenda execution\n";
00040 this_agenda.execute(ws);
00041 }
00042
00043
00044
00045 void AgendaSet(Workspace& ws,
00046
00047 Agenda& output_agenda,
00048
00049 const String& agenda_name,
00050
00051 const Agenda& input_agenda)
00052 {
00053 output_agenda = input_agenda;
00054 output_agenda.set_name(agenda_name);
00055
00056 output_agenda.check(ws);
00057 }
00058
00059
00060
00061 void AgendaAppend(Workspace& ws,
00062
00063 Agenda& output_agenda,
00064
00065 const String& output_agenda_name,
00066
00067 const Agenda& in_agenda _U_,
00068
00069 const String& in_agenda_name,
00070
00071 const Agenda& input_agenda)
00072 {
00073 if (output_agenda_name != in_agenda_name)
00074 {
00075 ostringstream os;
00076 os << "Output and input agenda must be the same!" << endl
00077 << "*" << output_agenda_name << "* and *" << in_agenda_name << "* "
00078 << "are not.";
00079 throw runtime_error (os.str());
00080 }
00081
00082 Array<MRecord> methods = output_agenda.Methods();
00083 for (Index i = 0; i < input_agenda.Methods().nelem(); i++)
00084 methods.push_back(input_agenda.Methods()[i]);
00085
00086 output_agenda.set_methods (methods);
00087 output_agenda.check(ws);
00088 }
00089
00090
00091
00092 void Arts(Workspace& ws,
00093
00094 const Agenda& input_agenda)
00095 {
00096 input_agenda.execute(ws);
00097 }
00098