nitc :: MEntity :: collect_children
self
children (direct descendants)The concept of child is abstract at this stage.
# Collect `self` children (direct descendants)
#
# The concept of child is abstract at this stage.
fun collect_children(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY] is abstract
src/model/model_collect.nit:83,2--86,98
# Collect all direct children of `self`
redef fun collect_children(mainmodule, filter) do
var res = new HashSet[MENTITY]
if not mainmodule.flatten_mclass_hierarchy.has(self) then return res
for mclass in in_hierarchy(mainmodule).direct_smallers do
if mclass == self then continue
if filter == null or filter.accept_mentity(mclass) then res.add mclass
end
return res
end
src/model/model_collect.nit:674,2--683,4
redef fun collect_children(mainmodule, filter) do
var res = new HashSet[MENTITY]
var hierarchy = self.in_hierarchy
if hierarchy == null then return res
for child in hierarchy.direct_smallers do
if child == self then continue
if filter == null or filter.accept_mentity(child) then res.add child
end
return res
end
src/model/model_collect.nit:1003,2--1012,4
# Collect all packages that directly depends on `self`
redef fun collect_children(mainmodule, filter) do
var res = new HashSet[MENTITY]
for mpackage in model.collect_mpackages(filter) do
if mpackage.collect_parents(mainmodule, filter).has(self) then res.add mpackage
end
return res
end
src/model/model_collect.nit:283,2--290,4
# Collect all group that directly import `self`
redef fun collect_children(mainmodule, filter) do
var res = new HashSet[MENTITY]
for mgroup in model.collect_mgroups(filter) do
if mgroup == self then continue
if filter != null and not filter.accept_mentity(mgroup) then continue
if mgroup.collect_parents(mainmodule, filter).has(self) then res.add mgroup
end
return res
end
src/model/model_collect.nit:436,2--445,4
# Collection all definitions that have `self` as a direct super definition
redef fun collect_children(mainmodule, filter) do
var res = new HashSet[MENTITY]
for mpropdef in mpropdefs do
for child in mpropdef.collect_parents(mainmodule, filter) do
var mprop = child.mproperty
if filter == null or filter.accept_mentity(mprop) then res.add mprop
end
end
return res
end
src/model/model_collect.nit:1104,2--1114,4
# Collect all children definitions that directly depend on `self`
redef fun collect_children(mainmodule, filter) do
var res = new HashSet[MENTITY]
for mpropdef in mproperty.collect_mpropdefs(filter) do
if mpropdef.collect_parents(mainmodule, filter).has(self) then res.add mpropdef
end
return res
end
src/model/model_collect.nit:1171,2--1178,4
# Collect all modules that directly import `self`
redef fun collect_children(mainmodule, filter) do
var res = new HashSet[MENTITY]
for mentity in in_importation.direct_smallers do
if mentity == self then continue
if filter == null or filter.accept_mentity(mentity) then res.add mentity
end
return res
end
src/model/model_collect.nit:499,2--507,4