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.

Definition at line 59 of file slot.h.

Constructor & Destructor Documentation

◆ SlotElement()

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

Constructs the SlotElement object.

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

Definition at line 137 of file slot.cpp.

Member Function Documentation

◆ isIntersecting()

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.

Definition at line 152 of file slot.cpp.

◆ isMorningSlotElement()

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.

Definition at line 171 of file slot.cpp.

References Time::isMorningTime().


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