PyShift Work Schedule
Work Schedule for Python
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
rotation.RotationSegment Class Reference

This class represents part of an entire rotation. More...

Public Member Functions

 __init__ (self, Shift startingShift, int daysOn, int daysOff, rotation)
 Construct a segment of a rotation.
 
int compareTo (self, other)
 Compare two rotation segments.
 

Public Attributes

 startingShift
 
 daysOn
 
 daysOff
 
 rotation
 
 sequence
 

Detailed Description

This class represents part of an entire rotation.

The segment starts with a shift and includes a count of the number of days on followed by the number of days off.

Constructor & Destructor Documentation

◆ __init__()

rotation.RotationSegment.__init__ ( self,
Shift startingShift,
int daysOn,
int daysOff,
rotation )

Construct a segment of a rotation.

Parameters
startingShiftShift that starts the segment
daysOnNumber of days working the shift
daysOffNumber of days not working
rotationRotation

Member Function Documentation

◆ compareTo()

int rotation.RotationSegment.compareTo ( self,
other )

Compare two rotation segments.

Parameters
otherRotationSegment
Returns
-1 if starts before other, 0 is same starting times, else 1

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