Connect++ 0.1
A fast, readable connection prover for first-order logic.
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
schedule::Schedule Class Reference

Wrap up the parsing process and the operation of a schedule in a single class. More...

#include <Schedule-16-10-23.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.
 
 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.
 

Friends

ostream & operator<< (ostream &, const Schedule &)
 
ostream & operator<< (ostream &, const Schedule &)
 

Detailed Description

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".

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".

Member Function Documentation

◆ read_schedule_from_file() [1/2]

void schedule::Schedule::read_schedule_from_file ( fs::path  path)

Self-explanatory.

Produces an empty schedule if parsing fails.

Parameters
pathPath of file to read from.

◆ read_schedule_from_file() [2/2]

void schedule::Schedule::read_schedule_from_file ( fs::path  )

Self-explanatory.

Produces an empty schedule if parsing fails.

Parameters
pathPath of file to read from.

◆ set_next_schedule() [1/2]

pair< bool, unsigned int > schedule::Schedule::set_next_schedule ( )

Apply the settings for the next step in the schedule.

Returns
True and the percentage of time to run for if successful, false and 0 otherwise.

◆ set_next_schedule() [2/2]

pair< bool, unsigned int > schedule::Schedule::set_next_schedule ( )

Apply the settings for the next step in the schedule.

Returns
True and the percentage of time to run for if successful, false and 0 otherwise.

◆ step_to_string() [1/2]

string schedule::Schedule::step_to_string ( size_t  n) const

Make a string representation of a line in the schedule.

Parameters
nLine to convert.
Returns
String representation.

◆ step_to_string() [2/2]

string schedule::Schedule::step_to_string ( size_t  ) const

Make a string representation of a line in the schedule.

Parameters
nLine to convert.
Returns
String representation.

The documentation for this class was generated from the following files: