Definition at line 202 of file structure.py.
◆ __init__()
None python.iconfTool.models.structure.ComponentsStructureFilter.__init__ |
( |
|
self, |
|
|
Dict[str, str] |
structure_dict |
|
) |
| |
Definition at line 203 of file structure.py.
203 def __init__(self, structure_dict: Dict[str, str]) ->
None:
204 self.structure_dict: Dict[str, str] = structure_dict
205 self.comps_to_save: List[str] = []
◆ browse_and_save_by_text()
None python.iconfTool.models.structure.ComponentsStructureFilter.browse_and_save_by_text |
( |
|
self, |
|
|
Sequence[Element] |
elements, |
|
|
Callable
|
filter_lambda |
|
) |
| |
Definition at line 242 of file structure.py.
242 def browse_and_save_by_text(
243 self, elements: Sequence[Element], filter_lambda: Callable
245 filtered =
list(
filter(filter_lambda, elements))
246 self.filter_children(filtered)
◆ filter_children()
None python.iconfTool.models.structure.ComponentsStructureFilter.filter_children |
( |
Sequence[Element] |
filtered | ) |
|
|
static |
Definition at line 249 of file structure.py.
249 def filter_children(filtered: Sequence[Element]) ->
None:
250 if len(filtered) > 0:
253 first.parent.children =
list(filtered)
◆ find_text_in_dict()
List[Tuple[str, str]] python.iconfTool.models.structure.ComponentsStructureFilter.find_text_in_dict |
( |
str |
filter_text, |
|
|
Dict
|
structure_dict |
|
) |
| |
|
static |
Definition at line 227 of file structure.py.
227 def find_text_in_dict(
228 filter_text: str, structure_dict: Dict
229 ) -> List[Tuple[str, str]]:
231 filter(
lambda el: filter_text
in str(el), structure_dict.items())
◆ generate_by_text()
None python.iconfTool.models.structure.ComponentsStructureFilter.generate_by_text |
( |
|
self, |
|
|
str |
filter_text |
|
) |
| |
Definition at line 210 of file structure.py.
210 def generate_by_text(self, filter_text: str) ->
None:
212 found_elements: List[str] = []
213 self.search_elements(filter_text, found_elements)
214 if not found_elements:
216 found_elements.extend(
218 "Algorithms and Sequences",
220 "Application Settings and Services",
223 self.comps_to_save = found_elements
224 logger.debug(f
"SEARCH - found elements: {found_elements}")
◆ reset()
None python.iconfTool.models.structure.ComponentsStructureFilter.reset |
( |
|
self | ) |
|
Definition at line 207 of file structure.py.
207 def reset(self) -> None:
208 self.comps_to_save = []
◆ search_elements()
None python.iconfTool.models.structure.ComponentsStructureFilter.search_elements |
( |
|
self, |
|
|
str |
filter_text, |
|
|
List[str]
|
found_elements |
|
) |
| |
Definition at line 234 of file structure.py.
235 self, filter_text: str, found_elements: List[str]
237 for el
in self.find_text_in_dict(filter_text, self.structure_dict):
238 if el[0]
not in found_elements:
239 found_elements.append(el[0])
240 self.search_elements(el[0], found_elements)
◆ comps_to_save
python.iconfTool.models.structure.ComponentsStructureFilter.comps_to_save |
The documentation for this class was generated from the following file:
constexpr std::enable_if_t< is_bitmask_v< E >, E & > reset(E &lhs, E rhs)
Convenience function to clear bits in a class enum bitmask.