Timetabler
|
Class for a course. More...
#include <course.h>
Public Member Functions | |
Course (std::string, unsigned, int, int, MinorType) | |
Constructs the Course object. More... | |
Course (std::string, unsigned, int, int, MinorType, std::vector< int >) | |
Constructs the Course object. More... | |
void | setPrograms (std::vector< int >) |
Sets the programs for which the Course is applicable. More... | |
void | addProgram (int) |
Adds a program that is applicable to the Course. More... | |
void | addClassroom (int) |
Adds a classroom that is applicable to the Course. More... | |
void | addSlot (int) |
Adds a slot that is applicable to the Course. More... | |
bool | operator== (const Course &other) |
Checks if two Course objects are identical, i.e., if they represent the same Course. More... | |
std::string | getName () |
Gets the name of the Course. More... | |
int | getInstructor () |
Gets the instructor index of the Course. More... | |
std::vector< int > | getPrograms () |
Gets the indices of the programs of the Course. More... | |
int | getSegment () |
Gets the segment index of the Course. More... | |
MinorType | getIsMinor () |
Gets the 'is minor' index of the Course. More... | |
int | getClassroom () |
Gets the 'classroom' index of the Course. More... | |
int | getSlot () |
Gets the 'slot' index of the Course. More... | |
unsigned | getClassSize () |
Gets the class size of the Course. More... | |
Course::Course | ( | std::string | name, |
unsigned | classSize, | ||
int | instructor, | ||
int | segment, | ||
MinorType | isMinor | ||
) |
Constructs the Course object.
[in] | name | The name of the course |
[in] | classSize | The class size of the course |
[in] | instructor | The instructor index of the course |
[in] | segment | The segment index of the course |
[in] | isMinor | Indicates if the course is a minor course |
Definition at line 19 of file course.cpp.
Course::Course | ( | std::string | name, |
unsigned | classSize, | ||
int | instructor, | ||
int | segment, | ||
MinorType | isMinor, | ||
std::vector< int > | programs | ||
) |
Constructs the Course object.
[in] | name | The name of the course |
[in] | classSize | The class size of the course |
[in] | instructor | The instructor index of the course |
[in] | segment | The segment index of the course |
[in] | isMinor | Indicates if the course is a minor course |
[in] | programs | The indices of the programs for which the course is applicable |
Definition at line 39 of file course.cpp.
void Course::addClassroom | ( | int | cr | ) |
Adds a classroom that is applicable to the Course.
[in] | cr | The index of the classroom to be added |
Definition at line 71 of file course.cpp.
void Course::addProgram | ( | int | programs | ) |
Adds a program that is applicable to the Course.
[in] | programs | The index of the program to be added |
Definition at line 64 of file course.cpp.
void Course::addSlot | ( | int | s | ) |
Adds a slot that is applicable to the Course.
[in] | s | The index of the slot to be added |
Definition at line 78 of file course.cpp.
int Course::getClassroom | ( | ) |
Gets the 'classroom' index of the Course.
Definition at line 132 of file course.cpp.
unsigned Course::getClassSize | ( | ) |
Gets the class size of the Course.
Definition at line 146 of file course.cpp.
int Course::getInstructor | ( | ) |
Gets the instructor index of the Course.
Definition at line 104 of file course.cpp.
MinorType Course::getIsMinor | ( | ) |
Gets the 'is minor' index of the Course.
Definition at line 125 of file course.cpp.
std::string Course::getName | ( | ) |
Gets the name of the Course.
Definition at line 97 of file course.cpp.
std::vector< int > Course::getPrograms | ( | ) |
Gets the indices of the programs of the Course.
Definition at line 111 of file course.cpp.
int Course::getSegment | ( | ) |
Gets the segment index of the Course.
Definition at line 118 of file course.cpp.
int Course::getSlot | ( | ) |
Gets the 'slot' index of the Course.
Definition at line 139 of file course.cpp.
bool Course::operator== | ( | const Course & | other | ) |
Checks if two Course objects are identical, i.e., if they represent the same Course.
[in] | other | The Course with which the comparison is being made |
Definition at line 88 of file course.cpp.
void Course::setPrograms | ( | std::vector< int > | programs | ) |
Sets the programs for which the Course is applicable.
[in] | programs | The indices of the programs for which the Course is applicable |
Definition at line 55 of file course.cpp.