Class for a program.
More...
#include <program.h>
Program::Program |
( |
std::string |
name, |
|
|
CourseType |
courseType |
|
) |
| |
Constructs the Program object.
- Parameters
-
[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 |
std::string Program::getCourseTypeName |
( |
| ) |
|
Gets the course type name as a string.
- Returns
- The string "Core", if the type is core, and "Elective" if the type is elective
std::string Program::getName |
( |
| ) |
|
std::string Program::getNameWithType |
( |
| ) |
|
Gets the name with type. The result is the program name, followed by a space, and followed by its type.
- Returns
- The name with type
Gets the type under the FieldType enum.
- Returns
- A member of the FieldType enum, which is FieldType::program
Implements Field.
std::string Program::getTypeName |
( |
| ) |
|
|
virtual |
Gets the type name, which is "Program".
- Returns
- The string "Program"
Implements Field.
bool Program::isCoreProgram |
( |
| ) |
|
Determines if the Program has a Course as core.
- Returns
- True if core program, False otherwise.
bool Program::operator== |
( |
const Program & |
other | ) |
|
Checks if two Program objects are identical, which is whether they have the same name and course type.
- Parameters
-
[in] | other | The Program object with which the comparison is being made |
- Returns
- True if identical, False otherwise
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/timetabler/checkouts/stable/include/fields/program.h
- /home/docs/checkouts/readthedocs.org/user_builds/timetabler/checkouts/stable/src/fields/program.cpp