mirror of https://gitlab.com/pamhyr/pamhyr2
add short dict and getter in HS
parent
d6561ab44d
commit
352c0beb27
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue