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

Class for a program. More...

#include <program.h>

Inheritance diagram for Program:
Inheritance graph
[legend]
Collaboration diagram for Program:
Collaboration graph
[legend]

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...
 

Detailed Description

Class for a program.

Constructor & Destructor Documentation

Program::Program ( std::string  name,
CourseType  courseType 
)

Constructs the Program object.

Parameters
[in]nameThe name of the Program, which uniquely identifies it. For example, it could be "B Tech 1".
[in]courseTypeThe course type, which could be core or elective

Member Function Documentation

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 ( )

Gets the name of the Program.

Returns
The name of the Program
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
FieldType Program::getType ( )
virtual

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]otherThe 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: