Previous topic

stalker.core.models.mixin.ReferenceMixin

Next topic

stalker.core.models.pipelineStep

This Page

stalker.core.models.mixin.StatusMixin

Inheritance diagram of stalker.core.models.mixin.StatusMixin

class stalker.core.models.mixin.StatusMixin(status=0, status_list=None)[source]

Bases: object

Adds statusabilities to the object.

This mixin adds status and statusList variables to the list. Any object that needs a status and a corresponding status list can include this mixin.

When mixed with a class which don’t have an __init__ method, the mixin supplies one, and in this case the parameters below must be defined.

Parameters:
  • status_list – this attribute holds a status list object, which shows the possible statuses that this entity could be in. This attribute can not be empty or None. Giving a StatusList object, the StatusList.target_type should match the current class.
  • status – an integer value which is the index of the status in the status_list attribute. So the value of this attribute couldn’t be lower than 0 and higher than the length-1 of the status_list object and nothing other than an integer
__init__(status=0, status_list=None)[source]

Methods

__init__([status, status_list])

Attributes

status this is the property that sets and returns the status
status_list this is the property that sets and returns the status_list
status[source]

this is the property that sets and returns the status attribute

status_list[source]

this is the property that sets and returns the status_list attribute