tools/json_schema_compiler/cpp_type_generator.py
def GenerateForwardDeclarations(self):
    """Returns the forward declarations for self._default_namespace.
    """
    c = Code()
    for namespace, deps in self._NamespaceTypeDependencies().items():
      filtered_deps = [
        dep for dep in deps
        # Add more ways to forward declare things as necessary.
        if (not dep.hard and
            dep.type_.property_type in (PropertyType.CHOICES,
                                        PropertyType.OBJECT))]
      if not filtered_deps:
        continue

      cpp_namespace = cpp_util.GetCppNamespace(
          namespace.environment.namespace_pattern,
          namespace.unix_name)
      c.Concat(cpp_util.OpenNamespace(cpp_namespace))
      for dep in filtered_deps:
        c.Append('struct %s;' % dep.type_.name)
      c.Concat(cpp_util.CloseNamespace(cpp_namespace))
    return c
Returns the forward declarations for self._default_namespace.
    
Returns the forward declarations for self._default_namespace.
Returns the forward declarations for self . _default_namespace .
def GenerateForwardDeclarations(self):
    c = Code()
    for namespace, deps in self._NamespaceTypeDependencies().items():
      filtered_deps = [
        dep for dep in deps
        if (not dep.hard and
            dep.type_.property_type in (PropertyType.CHOICES,
                                        PropertyType.OBJECT))]
      if not filtered_deps:
        continue
      cpp_namespace = cpp_util.GetCppNamespace(
          namespace.environment.namespace_pattern,
          namespace.unix_name)
      c.Concat(cpp_util.OpenNamespace(cpp_namespace))
      for dep in filtered_deps:
        c.Append('struct %s;' % dep.type_.name)
      c.Concat(cpp_util.CloseNamespace(cpp_namespace))
    return c
def GenerateForwardDeclarations ( self ) : c = Code ( ) for namespace , deps in self . _NamespaceTypeDependencies ( ) . items ( ) : filtered_deps = [ dep for dep in deps if ( not dep . hard and dep . type_ . property_type in ( PropertyType . CHOICES , PropertyType . OBJECT ) ) ] if not filtered_deps : continue cpp_namespace = cpp_util . GetCppNamespace ( namespace . environment . namespace_pattern , namespace . unix_name ) c . Concat ( cpp_util . OpenNamespace ( cpp_namespace ) ) for dep in filtered_deps : c . Append ( 'struct %s;' % dep . type_ . name ) c . Concat ( cpp_util . CloseNamespace ( cpp_namespace ) ) return c
Returns the forward declarations for self._default_namespace.
Returns the forward declarations for self . _default_namespace .
"""Returns the forward declarations for self._default_namespace.
    """ # Add more ways to forward declare things as necessary.
self