Skip to content
Snippets Groups Projects
Commit d2736ebd authored by Stefano Borini's avatar Stefano Borini
Browse files

Added slots abstract method

parent 9bc2218c
No related branches found
No related tags found
1 merge request!69Introduce slots and resolution of named variables
......@@ -37,3 +37,26 @@ class BaseDataSource(ABCHasStrictTraits):
List(DataValue)
A list containing the computed Data Values.
"""
@abc.abstractmethod
def slots(self, model):
"""Returns the input (and output) slots of the DataSource.
Slots are the entities that are needed (and produced) by this
DataSource.
The slots may depend on the configuration options, and thus the model.
This allows, for example, to change the slots depending if an option
is enabled or not.
Parameters
----------
model: BaseDataSourceModel
The model of the DataSource, instantiated through create_model()
Returns
-------
list[tuple, tuple]
A list containing two tuples, the first element is the input slots,
the second element is the output slots. Each slot must be an
instance of the Slot class.
"""
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment