Timetabler
custom_parser.h
Go to the documentation of this file.
1 
3 #ifndef CUSTOM_PARSER_H
4 #define CUSTOM_PARSER_H
5 
6 #include "constraint_adder.h"
7 #include "time_tabler.h"
8 #include <string>
9 #include <vector>
10 
14 enum class FieldValuesType {
15  COURSE,
16  INSTRUCTOR,
17  PROGRAM,
18  ISMINOR,
19  SEGMENT,
20  CLASSROOM,
21  SLOT
22 };
23 
27 struct Object {
28  bool isNot;
29  bool classSame;
30  bool slotSame;
31  bool classNotSame;
32  bool slotNotSame;
33  int integer;
34  TimeTabler *timeTabler;
35  ConstraintAdder *constraintAdder;
36  ConstraintEncoder *constraintEncoder;
37 
38  FieldValuesType fieldType;
39  std::vector<int> courseValues;
40  std::vector<int> instructorValues;
41  std::vector<int> programValues;
42  std::vector<int> isMinorValues;
43  std::vector<int> segmentValues;
44  std::vector<int> classValues;
45  std::vector<int> slotValues;
46 
47  Clauses constraint;
48  std::vector<Clauses> constraintAnds;
49  std::vector<Clauses> constraintVals;
50 };
51 
60 void parseCustomConstraints(std::string file,
61  ConstraintEncoder *constraintEncoder,
62  TimeTabler *timeTabler);
63 
64 #endif
void parseCustomConstraints(std::string file, ConstraintEncoder *constraintEncoder, TimeTabler *timeTabler)
Parses custom constraints given in a file and adds them to the solver.
Class for constraint adder.
Definition: constraint_adder.h:26
Class for constraint encoder.
Definition: constraint_encoder.h:26
Struct for the type used by actions in the parser.
Definition: custom_parser.h:27
FieldValuesType
Class for field values types.
Definition: custom_parser.h:14
Class for representing a set of clauses.
Definition: clauses.h:23
Class for time tabler.
Definition: time_tabler.h:44