mojo/public/tools/bindings/generators/mojom_mojolpm_generator.py
def _GetAllTypemaps(self):
    """Returns the typemaps for types needed in this module.
    """
    all_typemaps = []
    seen_types = set()

    def AddKind(kind):
      if (mojom.IsIntegralKind(kind) or mojom.IsStringKind(kind)
          or mojom.IsDoubleKind(kind) or mojom.IsFloatKind(kind)
          or mojom.IsAnyHandleKind(kind) or mojom.IsInterfaceKind(kind)
          or mojom.IsInterfaceRequestKind(kind) or mojom.IsAssociatedKind(kind)
          or mojom.IsPendingRemoteKind(kind)
          or mojom.IsPendingReceiverKind(kind)):
        pass
      elif mojom.IsArrayKind(kind):
        AddKind(kind.kind)
      elif mojom.IsMapKind(kind):
        AddKind(kind.key_kind)
        AddKind(kind.value_kind)
      else:
        name = self._GetFullMojomNameForKind(kind)
        if name in seen_types:
          return
        seen_types.add(name)

        typemap = self.typemap.get(name, None)
        if typemap:
          all_typemaps.append(typemap)
        if mojom.IsStructKind(kind) or mojom.IsUnionKind(kind):
          for field in kind.fields:
            AddKind(field.kind)

    for kind in self.module.enums + self.module.structs + self.module.unions:
      AddKind(kind)

    return all_typemaps
Returns the typemaps for types needed in this module.
    
Returns the typemaps for types needed in this module.
Returns the typemaps for types needed in this module .
def _GetAllTypemaps(self):
    all_typemaps = []
    seen_types = set()
    def AddKind(kind):
      if (mojom.IsIntegralKind(kind) or mojom.IsStringKind(kind)
          or mojom.IsDoubleKind(kind) or mojom.IsFloatKind(kind)
          or mojom.IsAnyHandleKind(kind) or mojom.IsInterfaceKind(kind)
          or mojom.IsInterfaceRequestKind(kind) or mojom.IsAssociatedKind(kind)
          or mojom.IsPendingRemoteKind(kind)
          or mojom.IsPendingReceiverKind(kind)):
        pass
      elif mojom.IsArrayKind(kind):
        AddKind(kind.kind)
      elif mojom.IsMapKind(kind):
        AddKind(kind.key_kind)
        AddKind(kind.value_kind)
      else:
        name = self._GetFullMojomNameForKind(kind)
        if name in seen_types:
          return
        seen_types.add(name)
        typemap = self.typemap.get(name, None)
        if typemap:
          all_typemaps.append(typemap)
        if mojom.IsStructKind(kind) or mojom.IsUnionKind(kind):
          for field in kind.fields:
            AddKind(field.kind)
    for kind in self.module.enums + self.module.structs + self.module.unions:
      AddKind(kind)
    return all_typemaps
def _GetAllTypemaps ( self ) : all_typemaps = [ ] seen_types = set ( ) def AddKind ( kind ) : if ( mojom . IsIntegralKind ( kind ) or mojom . IsStringKind ( kind ) or mojom . IsDoubleKind ( kind ) or mojom . IsFloatKind ( kind ) or mojom . IsAnyHandleKind ( kind ) or mojom . IsInterfaceKind ( kind ) or mojom . IsInterfaceRequestKind ( kind ) or mojom . IsAssociatedKind ( kind ) or mojom . IsPendingRemoteKind ( kind ) or mojom . IsPendingReceiverKind ( kind ) ) : pass elif mojom . IsArrayKind ( kind ) : AddKind ( kind . kind ) elif mojom . IsMapKind ( kind ) : AddKind ( kind . key_kind ) AddKind ( kind . value_kind ) else : name = self . _GetFullMojomNameForKind ( kind ) if name in seen_types : return seen_types . add ( name ) typemap = self . typemap . get ( name , None ) if typemap : all_typemaps . append ( typemap ) if mojom . IsStructKind ( kind ) or mojom . IsUnionKind ( kind ) : for field in kind . fields : AddKind ( field . kind ) for kind in self . module . enums + self . module . structs + self . module . unions : AddKind ( kind ) return all_typemaps
Returns the typemaps for types needed in this module.
Returns the typemaps for types needed in this module .
"""Returns the typemaps for types needed in this module.
    """
self