33#include <boost/spirit/include/qi.hpp>
35#include "Parameters.hpp"
36#include "Exceptions.hpp"
45using namespace boost::spirit;
46using Iter = string::const_iterator;
48namespace fs = std::filesystem;
108 vector<vector<pair<schedule_step,unsigned int>>>
schedule;
112 vector<unsigned int> times;
116 size_t schedule_step_number;
120 void apply_item(
const pair<schedule_step,unsigned int>&);
155 friend ostream& operator<<(ostream&,
const Schedule&);
161 void operator()(
unsigned int, qi::unused_type, qi::unused_type)
const;
167 void operator()(
unsigned int, qi::unused_type, qi::unused_type)
const;
173 void operator()(
string, qi::unused_type, qi::unused_type)
const;
179 void operator()(qi::unused_type, qi::unused_type)
const;
184struct next_settings {
185 void operator()(qi::unused_type, qi::unused_type)
const;
Wrap up the parsing process and the operation of a schedule in a single class.
Definition Schedule-16-10-23.hpp:90
void read_schedule_from_file(fs::path)
Self-explanatory.
Schedule()
You only need this constructor because everything will be filled in by the parser.
Definition Schedule.hpp:126
void reset_schedule()
Go back to the beginning of the schedule but leave everything else intact.
Definition Schedule.hpp:131
string step_to_string(size_t) const
Make a string representation of a line in the schedule.
pair< bool, unsigned int > set_next_schedule()
Apply the settings for the next step in the schedule.
Hide all the global stuff in this namespace.
Definition Schedule-16-10-23.cpp:27
schedule_step
Possible kinds of schedule step.
Definition Schedule-16-10-23.hpp:62
Semantic action for parser.
Definition Schedule-16-10-23.hpp:150