![]() |
Connect++ 0.4.0
A fast, readable connection prover for first-order logic.
|
Wrap up the parsing process and the operation of a schedule in a single class. More...
#include <Schedule.hpp>
Public Member Functions | |
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. | |
void | read_schedule_from_file (fs::path) |
Self-explanatory. | |
pair< bool, unsigned int > | set_next_schedule () |
Apply the settings for the next step in the schedule. | |
Private Member Functions | |
void | apply_item (const pair< schedule_step, unsigned int > &) |
Apply the settings for a single step in a schedule. | |
Private Attributes | |
vector< vector< pair< schedule_step, unsigned int > > > | schedule |
Representation of a schedule. | |
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. | |
Friends | |
ostream & | operator<< (ostream &, const Schedule &) |
Wrap up the parsing process and the operation of a schedule in a single class.
This covers parsing, and also the sequencing, including manipulation of parameters for each step, of a schedule stored in a file.
The main elements of a file exactly mimic the command line options, so a single step in a schedule acts exactly as though the relevant options had been supplied to a single call from the command line.
Aside from that, a line ends with a semicolon, and there is a number at the start of the line specifying a percentage of the timeout. The last line should start with 0, specifying "all remaining".
Definition at line 107 of file Schedule.hpp.
|
inline |
You only need this constructor because everything will be filled in by the parser.
Definition at line 133 of file Schedule.hpp.
|
private |
Apply the settings for a single step in a schedule.
Definition at line 270 of file Schedule.cpp.
void schedule::Schedule::read_schedule_from_file | ( | fs::path | path | ) |
Self-explanatory.
Produces an empty schedule if parsing fails.
path | Path of file to read from. |
Definition at line 226 of file Schedule.cpp.
|
inline |
Go back to the beginning of the schedule but leave everything else intact.
Definition at line 138 of file Schedule.hpp.
pair< bool, unsigned int > schedule::Schedule::set_next_schedule | ( | ) |
Apply the settings for the next step in the schedule.
Definition at line 366 of file Schedule.cpp.
string schedule::Schedule::step_to_string | ( | size_t | n | ) | const |
Make a string representation of a line in the schedule.
n | Line to convert. |
Definition at line 386 of file Schedule.cpp.
|
friend |
Definition at line 401 of file Schedule.cpp.
|
private |
Representation of a schedule.
Each element is a vector of pairs. Each pair is an identifier for a step, and an integer. Times are dealt with elsewhere.
Definition at line 115 of file Schedule.hpp.
|
private |
Keep track of which step in the schedule we're on.
Definition at line 123 of file Schedule.hpp.
|
private |
Times for each member of a schedule.
Definition at line 119 of file Schedule.hpp.