hpcflow.sdk.persistence.base.StoreElement#
- class hpcflow.sdk.persistence.base.StoreElement(id_, is_pending, index, es_idx, seq_idx, src_idx, task_ID, iteration_IDs)#
Bases:
Generic
[SerFormT
,ContextT
]Represents an element in a persistent store.
- Parameters:
id (int) – The ID of the element.
is_pending (bool) – Whether the element has changes not yet persisted.
index (int) – Index of the element within its parent task.
es_idx (int) – Index of the element set containing this element.
task_ID (int) – ID of the task that contains this element.
iteration_IDs (list[int]) – IDs of element-iterations that belong to this element.
id_ (int) –
Methods
Return a copy, with additional iteration IDs.
Initialise a StoreElement from store element data
Prepare store element data for the persistent store.
Prepare data for the user-facing Element object.
Attributes
The ID of the element.
Whether the element has changes not yet persisted.
Index of the element within its parent task.
Index of the element set containing this element.
Value sequence index map.
Data source index map.
ID of the task that contains this element.
IDs of element-iterations that belong to this element.
- append_iteration_IDs(pend_IDs)#
Return a copy, with additional iteration IDs.
- Parameters:
pend_IDs (Iterable[int]) –
- Return type:
Self
- abstract classmethod decode(elem_dat, context)#
Initialise a StoreElement from store element data
- Parameters:
elem_dat (SerFormT) –
context (ContextT) –
- Return type:
Self
- abstract encode(context)#
Prepare store element data for the persistent store.
- Parameters:
context (ContextT) –
- Return type:
SerFormT