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 <string>
7 #include <vector>
8 #include "constraint_adder.h"
9 #include "timetabler.h"
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  bool courseExcept;
34  int integer;
36  ConstraintAdder *constraintAdder;
37  ConstraintEncoder *constraintEncoder;
38 
39  FieldValuesType fieldType;
40  std::vector<int> courseValues;
41  std::vector<int> instructorValues;
42  std::vector<int> programValues;
43  std::vector<int> isMinorValues;
44  std::vector<int> segmentValues;
45  std::vector<int> classValues;
46  std::vector<int> slotValues;
47 
48  Clauses constraint;
49  std::vector<Clauses> constraintAnds;
50  std::vector<Clauses> constraintVals;
51 
52  Object();
53 };
54 
55 void parseCustomConstraints(std::string file,
56  ConstraintEncoder *constraintEncoder,
58 
59 #endif
Class for constraint adder.
Class for time tabler.
Definition: timetabler.h:44
Class for constraint encoder.
Struct for the type used by actions in the parser.
Definition: custom_parser.h:27
Timetabler * timetabler
Definition: main.cpp:90
FieldValuesType
Class for field values types.
Definition: custom_parser.h:14
Class for representing a set of clauses.
Definition: clauses.h:23
void parseCustomConstraints(std::string file, ConstraintEncoder *constraintEncoder, Timetabler *timetabler)
Parses custom constraints given in a file and adds them to the solver.