def children(self, unroll=False, skip_not_present=True):
        """
        Returns an iterator that provides nodes for all immediate children of
        this component.

        Parameters
        ----------
        unroll : bool
            If True, any children that are arrays are unrolled.

        skip_not_present : bool
            If True, skips children whose 'ispresent' property is set to False

        Yields
        ------
        :class:`~Node`
            All immediate children
        """
        for child_inst in self.inst.children:
            if skip_not_present:
                # Check if property ispresent == False
                if not child_inst.properties.get('ispresent', True):
                    # ispresent was explicitly set to False. Skip it
                    continue

            if unroll and isinstance(child_inst, comp.AddressableComponent) and child_inst.is_array:
                # Unroll the array
                range_list = [range(n) for n in child_inst.array_dimensions]
                for idxs in itertools.product(*range_list):
                    N = Node._factory(child_inst, self.env, self)
                    N.current_idx = idxs # pylint: disable=attribute-defined-outside-init
                    yield N
            else:
                yield Node._factory(child_inst, self.env, self)
def children ( self , unroll = False , skip_not_present = True ) : for child_inst in self . inst . children : if skip_not_present : if not child_inst . properties . get ( 'ispresent' , True ) : continue if unroll and isinstance ( child_inst , comp . AddressableComponent ) and child_inst . is_array : range_list = [ range ( n ) for n in child_inst . array_dimensions ] for idxs in itertools . product ( * range_list ) : N = Node . _factory ( child_inst , self . env , self ) N . current_idx = idxs yield N else : yield Node . _factory ( child_inst , self . env , self )
Returns an iterator that provides nodes for all immediate children of
        this component.

        Parameters
        ----------
        unroll : bool
            If True, any children that are arrays are unrolled.

        skip_not_present : bool
            If True, skips children whose 'ispresent' property is set to False

        Yields
        ------
        :class:`~Node`
            All immediate children