tools/json_schema_compiler/cpp_type_generator.py
def _NamespaceTypeDependencies(self):
    """Returns a dict ordered by namespace name containing a mapping of
    model.Namespace to every _TypeDependency for |self._default_namespace|,
    sorted by the type's name.
    """
    dependencies = set()
    for function in self._default_namespace.functions.values():
      for param in function.params:
        dependencies |= self._TypeDependencies(param.type_,
                                               hard=not param.optional)
      if function.returns_async:
        for param in function.returns_async.params:
          dependencies |= self._TypeDependencies(param.type_,
                                                 hard=not param.optional)
    for type_ in self._default_namespace.types.values():
      for prop in type_.properties.values():
        dependencies |= self._TypeDependencies(prop.type_,
                                               hard=not prop.optional)
    for event in self._default_namespace.events.values():
      for param in event.params:
        dependencies |= self._TypeDependencies(param.type_,
                                               hard=not param.optional)

    # Make sure that the dependencies are returned in alphabetical order.
    dependency_namespaces = OrderedDict()
    for dependency in sorted(dependencies, key=_TypeDependency.GetSortKey):
      namespace = dependency.type_.namespace
      if namespace is self._default_namespace:
        continue
      if namespace not in dependency_namespaces:
        dependency_namespaces[namespace] = []
      dependency_namespaces[namespace].append(dependency)

    return dependency_namespaces
Returns a dict ordered by namespace name containing a mapping of
    model.Namespace to every _TypeDependency for |self._default_namespace|,
    sorted by the type's name.
    
Returns a dict ordered by namespace name containing a mapping of
model.Namespace to every _TypeDependency for |self._default_namespace|,
sorted by the type's name.
Returns a dict ordered by namespace name containing a mapping of model . Namespace to every _TypeDependency for |self . _default_namespace| sorted by the type ' s name .
def _NamespaceTypeDependencies(self):
    dependencies = set()
    for function in self._default_namespace.functions.values():
      for param in function.params:
        dependencies |= self._TypeDependencies(param.type_,
                                               hard=not param.optional)
      if function.returns_async:
        for param in function.returns_async.params:
          dependencies |= self._TypeDependencies(param.type_,
                                                 hard=not param.optional)
    for type_ in self._default_namespace.types.values():
      for prop in type_.properties.values():
        dependencies |= self._TypeDependencies(prop.type_,
                                               hard=not prop.optional)
    for event in self._default_namespace.events.values():
      for param in event.params:
        dependencies |= self._TypeDependencies(param.type_,
                                               hard=not param.optional)
    dependency_namespaces = OrderedDict()
    for dependency in sorted(dependencies, key=_TypeDependency.GetSortKey):
      namespace = dependency.type_.namespace
      if namespace is self._default_namespace:
        continue
      if namespace not in dependency_namespaces:
        dependency_namespaces[namespace] = []
      dependency_namespaces[namespace].append(dependency)
    return dependency_namespaces
def _NamespaceTypeDependencies ( self ) : dependencies = set ( ) for function in self . _default_namespace . functions . values ( ) : for param in function . params : dependencies |= self . _TypeDependencies ( param . type_ , hard = not param . optional ) if function . returns_async : for param in function . returns_async . params : dependencies |= self . _TypeDependencies ( param . type_ , hard = not param . optional ) for type_ in self . _default_namespace . types . values ( ) : for prop in type_ . properties . values ( ) : dependencies |= self . _TypeDependencies ( prop . type_ , hard = not prop . optional ) for event in self . _default_namespace . events . values ( ) : for param in event . params : dependencies |= self . _TypeDependencies ( param . type_ , hard = not param . optional ) dependency_namespaces = OrderedDict ( ) for dependency in sorted ( dependencies , key = _TypeDependency . GetSortKey ) : namespace = dependency . type_ . namespace if namespace is self . _default_namespace : continue if namespace not in dependency_namespaces : dependency_namespaces [ namespace ] = [ ] dependency_namespaces [ namespace ] . append ( dependency ) return dependency_namespaces
Returns a dict ordered by namespace name containing a mapping of
model.Namespace to every _TypeDependency for |self._default_namespace|,
sorted by the type's name.
Returns a dict ordered by namespace name containing a mapping of model . Namespace to every _TypeDependency for |self . _default_namespace| sorted by the type ' s name .
"""Returns a dict ordered by namespace name containing a mapping of
    model.Namespace to every _TypeDependency for |self._default_namespace|,
    sorted by the type's name.
    """ # Make sure that the dependencies are returned in alphabetical order.
self