33#include <boost/spirit/include/qi.hpp> 
   35#include "Parameters.hpp" 
   36#include "Exceptions.hpp" 
   46using namespace boost::spirit;
 
   47using Iter = string::const_iterator;
 
   49namespace fs = std::filesystem;
 
  115    vector<vector<pair<schedule_step,unsigned int>>> 
schedule;
 
  127    void apply_item(
const pair<schedule_step,unsigned int>&);
 
  162    friend ostream& operator<<(ostream&, 
const Schedule&);
 
 
  168    void operator()(
unsigned int, qi::unused_type, qi::unused_type) 
const;
 
 
  174    void operator()(
unsigned int, qi::unused_type, qi::unused_type) 
const;
 
 
  180    void operator()(
string, qi::unused_type, qi::unused_type) 
const;
 
 
  186    void operator()(qi::unused_type, qi::unused_type) 
const;
 
 
  192    void operator()(qi::unused_type, qi::unused_type) 
const;
 
 
Wrap up the parsing process and the operation of a schedule in a single class.
vector< vector< pair< schedule_step, unsigned int > > > schedule
Representation of a schedule.
void read_schedule_from_file(fs::path)
Self-explanatory.
vector< unsigned int > times
Times for each member of a schedule.
size_t schedule_step_number
Keep track of which step in the schedule we're on.
void apply_item(const pair< schedule_step, unsigned int > &)
Apply the settings for a single step in a schedule.
Schedule()
You only need this constructor because everything will be filled in by the parser.
void reset_schedule()
Go back to the beginning of the schedule but leave everything else intact.
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.
schedule_step
Possible kinds of schedule step.
Semantic action for parser.
Semantic action for parser.
Semantic action for parser.
Semantic action for parser.
Semantic action for parser.