Timetabler
|
Class for a program. More...
#include <program.h>
Public Member Functions | |
Program (std::string, CourseType) | |
Constructs the Program object. More... | |
bool | operator== (const Program &other) |
Checks if two Program objects are identical, which is whether they have the same name and course type. More... | |
FieldType | getType () |
Gets the type under the FieldType enum. More... | |
std::string | getName () |
Gets the name of the Program. More... | |
bool | isCoreProgram () |
Determines if the Program has a Course as core. More... | |
std::string | getTypeName () |
Gets the type name, which is "Program". More... | |
std::string | getCourseTypeName () |
Gets the course type name as a string. More... | |
std::string | getNameWithType () |
Gets the name with type. The result is the program name, followed by a space, and followed by its type. More... | |
Program::Program | ( | std::string | name, |
CourseType | courseType | ||
) |
Constructs the Program object.
[in] | name | The name of the Program, which uniquely identifies it. For example, it could be "B Tech 1". |
[in] | courseType | The course type, which could be core or elective |
Definition at line 13 of file program.cpp.
std::string Program::getCourseTypeName | ( | ) |
Gets the course type name as a string.
Definition at line 64 of file program.cpp.
References core.
Referenced by getNameWithType().
std::string Program::getName | ( | ) |
Gets the name of the Program.
Definition at line 42 of file program.cpp.
std::string Program::getNameWithType | ( | ) |
Gets the name with type. The result is the program name, followed by a space, and followed by its type.
Definition at line 77 of file program.cpp.
References getCourseTypeName().
|
virtual |
Gets the type under the FieldType enum.
Implements Field.
Definition at line 35 of file program.cpp.
|
virtual |
Gets the type name, which is "Program".
Implements Field.
Definition at line 56 of file program.cpp.
bool Program::isCoreProgram | ( | ) |
Determines if the Program has a Course as core.
Definition at line 49 of file program.cpp.
References core.
bool Program::operator== | ( | const Program & | other | ) |
Checks if two Program objects are identical, which is whether they have the same name and course type.
[in] | other | The Program object with which the comparison is being made |
Definition at line 26 of file program.cpp.