2from __future__
import annotations
4from typing
import Any, List, Optional, Sequence
6logger = logging.getLogger(__name__)
12 def __init__(self, name: str, x_pos: int, parent=
None) ->
None:
15 self.
parent: GroupingElement = parent
25 self.
parent.show_children =
True
43 if parent.get_name() == name_string:
45 parent = parent.parent
51 base = self.
parent.hash + base
58 while parent
and parent.marked:
61 parent = parent.parent
77 return " " if not self.
checked else "X"
89class GroupingElement(Element):
91 self, name: str, x_pos: int, parent: GroupingElement =
None
93 super().
__init__(name, x_pos, parent)
97 return [el.name
for el
in self.
children]
100 matched = list(filter(
lambda el: el.name == name, self.
children))
109 if child.check_filter(filter_text):
120 child.update_xpos(new_xpos + INDENT)
130 if isinstance(child, GroupingElement):
131 child.sort_children()
137 return f
"[{self.get_mark_character()}] {self.get_name()}"
142 return filter_text
in self.
get_name()
148 return "-" if not self.
checked else "*"
151 return f
" {self.get_mark_character()} {self.get_name()}"
156 self, name: str, x_pos: int, value: Any, parent: Element =
None
158 """Value must be initialized first as it is used in hash generating"""
160 super().
__init__(name, x_pos, parent)
163 return f
"{self.name} = {self.value}"
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
std::vector< std::string > split(const std::string &s, const std::string &t=":")