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

Class for a course. More...

#include <course.h>

Public Member Functions

 Course (std::string, unsigned, int, int, int)
 Constructs the Course object. More...
 
 Course (std::string, unsigned, int, int, int, 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)
 
void addSlot (int)
 
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...
 
int getIsMinor ()
 Gets the 'is minor' index of the Course. More...
 
int getClassroom ()
 
int getSlot ()
 
unsigned getClassSize ()
 Gets the class size of the Course. More...
 

Detailed Description

Class for a course.

Constructor & Destructor Documentation

Course::Course ( std::string  name,
unsigned  classSize,
int  instructor,
int  segment,
int  isMinor 
)

Constructs the Course object.

Parameters
[in]nameThe name of the course
[in]classSizeThe class size of the course
[in]instructorThe instructor index of the course
[in]segmentThe segment index of the course
[in]isMinorIndicates if the course is a minor course
Course::Course ( std::string  name,
unsigned  classSize,
int  instructor,
int  segment,
int  isMinor,
std::vector< int >  programs 
)

Constructs the Course object.

Parameters
[in]nameThe name of the course
[in]classSizeThe class size of the course
[in]instructorThe instructor index of the course
[in]segmentThe segment index of the course
[in]isMinorIndicates if the course is a minor course
[in]programsThe indices of the programs for which the course is applicable

Member Function Documentation

void Course::addProgram ( int  programs)

Adds a program that is applicable to the Course.

Parameters
[in]programsThe index of the program to be added
unsigned Course::getClassSize ( )

Gets the class size of the Course.

Returns
The class size.
int Course::getInstructor ( )

Gets the instructor index of the Course.

Returns
The instructor index in the list of instructors
int Course::getIsMinor ( )

Gets the 'is minor' index of the Course.

Returns
The isMinor index in the list of isMinors
std::string Course::getName ( )

Gets the name of the Course.

Returns
The name.of the Course
std::vector< int > Course::getPrograms ( )

Gets the indices of the programs of the Course.

Returns
The indices of the programs in the list of programs
int Course::getSegment ( )

Gets the segment index of the Course.

Returns
The segment index in the list of segments
bool Course::operator== ( const Course other)

Checks if two Course objects are identical, i.e., if they represent the same Course.

Parameters
[in]otherThe Course with which the comparison is being made
Returns
true if identical, false otherwise
void Course::setPrograms ( std::vector< int >  programs)

Sets the programs for which the Course is applicable.

Parameters
[in]programsThe indices of the programs for which the Course is applicable

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