tools/json_schema_compiler/h_generator.py
def _GenerateFields(self, props):
    """Generates the field declarations when declaring a type.
    """
    c = Code()
    needs_blank_line = False
    for prop in props:
      if needs_blank_line:
        c.Append()
      needs_blank_line = True
      if prop.description:
        c.Comment(prop.description)
      # ANY is a base::Value which is abstract and cannot be a direct member, so
      # we always need to wrap it in a scoped_ptr.
      is_ptr = prop.optional or prop.type_.property_type == PropertyType.ANY
      (c.Append('%s %s;' % (
           self._type_helper.GetCppType(prop.type_, is_ptr=is_ptr),
           prop.unix_name))
      )
    return c
Generates the field declarations when declaring a type.
    
Generates the field declarations when declaring a type.
Generates the field declarations when declaring a type .
def _GenerateFields(self, props):
    c = Code()
    needs_blank_line = False
    for prop in props:
      if needs_blank_line:
        c.Append()
      needs_blank_line = True
      if prop.description:
        c.Comment(prop.description)
      is_ptr = prop.optional or prop.type_.property_type == PropertyType.ANY
      (c.Append('%s %s;' % (
           self._type_helper.GetCppType(prop.type_, is_ptr=is_ptr),
           prop.unix_name))
      )
    return c
def _GenerateFields ( self , props ) : c = Code ( ) needs_blank_line = False for prop in props : if needs_blank_line : c . Append ( ) needs_blank_line = True if prop . description : c . Comment ( prop . description ) is_ptr = prop . optional or prop . type_ . property_type == PropertyType . ANY ( c . Append ( '%s %s;' % ( self . _type_helper . GetCppType ( prop . type_ , is_ptr = is_ptr ) , prop . unix_name ) ) ) return c
Generates the field declarations when declaring a type.
Generates the field declarations when declaring a type .
"""Generates the field declarations when declaring a type.
    """ # ANY is a base::Value which is abstract and cannot be a direct member, so # we always need to wrap it in a scoped_ptr.
self
props