-
- Downloads
Fix #906, various enhancements for Schedule parsing (#907)
This additions modify the IRATools::getNextToken function in the following way: - a std::vector<char> can be passed as delimiter (function override). The function checks if any of them is present in the string and behaves according to the old implementation; - the behavior has been enhanced so that a boolean (which defaults to false) tells the function to keep cycling through the string if multiple occurrencies of one of the delimiters is found one after the other. This allows the function to behave in the same manner whether a string contains one or more '\t' characters or a series of whitespaces ' '. The Schedule class has been modified according to these additions so that it can now parse a schedule with multiple tabs as well as whitespaces as token separators. A test has been introduced in such a way that checks if the 2 schedule.tmpl and schedule_ws.tmpl files produce the same output when checked with the `testSched` executable. ScheduleChecker now also checks whether the caller user is the same as the PROJECT keyword. This alerts the observers that copied a schedule from a previous project to be aware that DISCOS will reject the given schedule when trying to launch it, saving time.
Showing
- Common/Libraries/IRALibrary/include/IRATools.h 15 additions, 2 deletionsCommon/Libraries/IRALibrary/include/IRATools.h
- Common/Libraries/IRALibrary/src/IRATools.cpp 82 additions, 75 deletionsCommon/Libraries/IRALibrary/src/IRATools.cpp
- Common/Servers/Scheduler/include/Schedule.h 1 addition, 1 deletionCommon/Servers/Scheduler/include/Schedule.h
- Common/Servers/Scheduler/src/Makefile 4 additions, 1 deletionCommon/Servers/Scheduler/src/Makefile
- Common/Servers/Scheduler/src/Schedule.cpp 19 additions, 19 deletionsCommon/Servers/Scheduler/src/Schedule.cpp
- Common/Servers/Scheduler/src/ScheduleChecker.cpp 8 additions, 0 deletionsCommon/Servers/Scheduler/src/ScheduleChecker.cpp
- Common/Servers/Scheduler/src/Schedule_ScanList.cpp 21 additions, 21 deletionsCommon/Servers/Scheduler/src/Schedule_ScanList.cpp
- Common/Servers/Scheduler/src/testSchedule.cpp 5 additions, 2 deletionsCommon/Servers/Scheduler/src/testSchedule.cpp
- Common/Servers/Scheduler/src/testSchedules.cpp 38 additions, 0 deletionsCommon/Servers/Scheduler/src/testSchedules.cpp
- Common/Servers/Scheduler/templates/schedule.tmpl 1 addition, 1 deletionCommon/Servers/Scheduler/templates/schedule.tmpl
- Common/Servers/Scheduler/templates/schedule_ws.tmpl 88 additions, 0 deletionsCommon/Servers/Scheduler/templates/schedule_ws.tmpl
Loading
Please register or sign in to comment