(self)
return "\n".join(lines)
Generates a Python class containing getter/setter methods for members.
Generates a Python class containing getter/setter methods for members.
Generates a Python class containing getter / setter methods for members .
def wrapper_class(self):
    """Generates a Python class containing getter/setter methods for members."""
    indent = codegen_util.Indenter()
    lines = [textwrap.dedent("""
    class {0.wrapper_name}(util.WrapperBase):
      \"\"\"{0.docstring}\"\"\"""".format(self))]
    with indent:
      for member in self.members.values():
        if isinstance(member, AnonymousUnion):
          for submember in member.members.values():
            lines.append(indent(submember.getters_setters))
        else:
          lines.append(indent(member.getters_setters))
    lines.append("")  # Add an extra newline at the end of the class definition.
    return "\n".join(lines)
def wrapper_class ( self ) : indent = codegen_util . Indenter ( ) lines = [ textwrap . dedent ( """
    class {0.wrapper_name}(util.WrapperBase):
      \"\"\"{0.docstring}\"\"\"""" . format ( self ) ) ] with indent : for member in self . members . values ( ) : if isinstance ( member , AnonymousUnion ) : for submember in member . members . values ( ) : lines . append ( indent ( submember . getters_setters ) ) else : lines . append ( indent ( member . getters_setters ) ) lines . append ( "" ) # Add an extra newline at the end of the class definition. return "\n" . join ( lines )