Timetabler
Public Member Functions | List of all members
Parser Class Reference

Class for parser. More...

#include <parser.h>

Public Member Functions

 Parser (Timetabler *)
 Constructs the Parser object. More...
 
void parseFields (std::string file)
 Parse the fields given in a file. More...
 
void parseInput (std::string file)
 Parses the input given in a file. More...
 
void addVars ()
 Requests for variables to be added to the solver and stores the data.
 
bool verify ()
 Verifies if the input is valid. More...
 

Detailed Description

Class for parser.

This class is responsible for parsing the field and inputs given by the user, and populating the corresponding data members.

Definition at line 18 of file parser.h.

Constructor & Destructor Documentation

◆ Parser()

Parser::Parser ( Timetabler timetabler)

Constructs the Parser object.

Parameters
timetablerThe time tabler

Definition at line 12 of file parser.cpp.

References timetabler.

Member Function Documentation

◆ parseFields()

void Parser::parseFields ( std::string  file)

Parse the fields given in a file.

Parameters
[in]fileThe file containing the fields

Definition at line 19 of file parser.cpp.

◆ parseInput()

void Parser::parseInput ( std::string  file)

Parses the input given in a file.

Parameters
[in]fileThe file containig the input

Definition at line 129 of file parser.cpp.

References Timetabler::data, Data::existingAssignmentVars, Global::FIELD_COUNT, and timetabler.

◆ verify()

bool Parser::verify ( )

Verifies if the input is valid.

Returns
True, if the input is valid.

Definition at line 246 of file parser.cpp.

References Data::courses, Timetabler::data, isMinorCourse, Data::predefinedClausesWeights, Data::slots, and timetabler.


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