[docs]
class Action:
def __init__(self, line_name):
'''
Initializes the Action class
'''
self._line_name = str(line_name)
@property
def line_name(self):
'''
Returns the line name
'''
return self._line_name
def __eq__(self, other):
'''
Equal function: Checks if the type of the given object is the same as the current object
Returns True if the type and line name are the same, and False otherwise
'''
if type(other) is type(self):
return self._line_name == other._line_name
return False
def __hash__(self):
'''
Returns a hash (string) of the line name
'''
return hash(self._line_name)
[docs]
class Shoot(Action):
'''
Depends on Action class
passes
'''
pass
[docs]
class Deploy(Action):
'''
Depends on Action class
passes
'''
pass
[docs]
class Recover(Action):
'''
Depends on Action class
passes
'''
pass
[docs]
class AdditionalDelay(Action):
'''
Depends on Action class
'''
def __init__(self, line_name, duration):
super().__init__(line_name)
self._duration = duration
@property
def duration(self):
'''
Returns the duration, which is the delay (extra hours)
'''
return self._duration