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

Class for a slot element. More...

#include <slot.h>

Public Member Functions

 SlotElement (Time &, Time &, Day)
 Constructs the SlotElement object. More...
 
bool isIntersecting (SlotElement &other)
 Determines if two slot elements are intersecting. More...
 
bool isMorningSlotElement ()
 Determines if the SlotElement is a morning slot element. More...
 

Detailed Description

Class for a slot element.

A slot element consists of a Day, a starting Time, and an ending Time.

Constructor & Destructor Documentation

SlotElement::SlotElement ( Time startTime,
Time endTime,
Day  day 
)

Constructs the SlotElement object.

Parameters
startTimeThe start time
endTimeThe end time
[in]dayThe day

Member Function Documentation

bool SlotElement::isIntersecting ( SlotElement other)

Determines if two slot elements are intersecting.

Two slot elements are said to be intersecting if the Day is identical and there is an intersection in the start and end Times.

Parameters
otherThe SlotElement with which the comparison is being made
Returns
True if intersecting, False otherwise.
bool SlotElement::isMorningSlotElement ( )

Determines if the SlotElement is a morning slot element.

A SlotElement is a morning SlotElement if the start time is in the morning.

Returns
True if morning slot element, False otherwise.

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