mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
add short dict and getter in HS
This commit is contained in:
1 parent
d6561ab44d
commit
352c0beb27
2 files changed
+8
No files matched your search
@@ -35,3 +35,8 @@ class NotDefined(BasicHS):
|
|||||||
BHSValue("bar", float, 42.0),
|
BHSValue("bar", float, 42.0),
|
||||||
BHSValue("baz", int, 13),
|
BHSValue("baz", int, 13),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
BHS_types = {
|
||||||
|
"ND": NotDefined,
|
||||||
|
}
|
||||||
@@ -233,6 +233,9 @@ class HydraulicStructure(SQLSubModel):
|
|||||||
def basic_structures(self):
|
def basic_structures(self):
|
||||||
return self._data.copy()
|
return self._data.copy()
|
||||||
|
|
||||||
|
def basic_structure(self, index: int):
|
||||||
|
return self._data[index]
|
||||||
|
|
||||||
def add(self, index: int):
|
def add(self, index: int):
|
||||||
value = NotDefined(status=self._status)
|
value = NotDefined(status=self._status)
|
||||||
self._data.insert(index, value)
|
self._data.insert(index, value)
|
||||||
|
|||||||
Reference in new issue
Block a user