original_docstring: Writes the gles2 auto generated utility implementation.
docstring: Writes the gles2 auto generated utility implementation.
docstring_tokens: Writes the gles2 auto generated utility implementation .
code: def WriteServiceUtilsImplementation(self, filename):
      """Writes the gles2 auto generated utility implementation."""
      file = CHeaderWriter(filename)
      names = sorted(_NAMED_TYPE_INFO.keys())
      for name in names:
        named_type = NamedType(_NAMED_TYPE_INFO[name])
        if named_type.IsConstant():
          continue
        if named_type.GetValidValues():
          file.Write("static const %s valid_%s_table[] = {\n" %
                     (named_type.GetType(), ToUnderscore(name)))
          for value in named_type.GetValidValues():
            file.Write("  %s,\n" % value)
          file.Write("};\n")
          file.Write("\n")
      file.Write("Validators::Validators()")
      pre = '    : '
      for count, name in enumerate(names):
        named_type = NamedType(_NAMED_TYPE_INFO[name])
        if named_type.IsConstant():
          continue
        if named_type.GetValidValues():
          code = """%(pre)s%(name)s(
            valid_%(name)s_table, arraysize(valid_%(name)s_table))"""
        else:
          code = "%(pre)s%(name)s()"
        file.Write(code % {
          'name': ToUnderscore(name),
          'pre': pre,
        })
        pre = ',\n    '
      file.Write(" {\n");
      file.Write("}\n\n");
      file.Close()
      self.generated_cpp_filenames.append(file.filename)
code_tokens: def WriteServiceUtilsImplementation ( self , filename ) : file = CHeaderWriter ( filename ) names = sorted ( _NAMED_TYPE_INFO . keys ( ) ) for name in names : named_type = NamedType ( _NAMED_TYPE_INFO [ name ] ) if named_type . IsConstant ( ) : continue if named_type . GetValidValues ( ) : file . Write ( "static const %s valid_%s_table[] = {\n" % ( named_type . GetType ( ) , ToUnderscore ( name ) ) ) for value in named_type . GetValidValues ( ) : file . Write ( "  %s,\n" % value ) file . Write ( "};\n" ) file . Write ( "\n" ) file . Write ( "Validators::Validators()" ) pre = '    : ' for count , name in enumerate ( names ) : named_type = NamedType ( _NAMED_TYPE_INFO [ name ] ) if named_type . IsConstant ( ) : continue if named_type . GetValidValues ( ) : code = """%(pre)s%(name)s(
            valid_%(name)s_table, arraysize(valid_%(name)s_table))""" else : code = "%(pre)s%(name)s()" file . Write ( code % { 'name' : ToUnderscore ( name ) , 'pre' : pre , } ) pre = ',\n    ' file . Write ( " {\n" ) ; file . Write ( "}\n\n" ) ; file . Close ( ) self . generated_cpp_filenames . append ( file . filename )
short_docstring: Writes the gles2 auto generated utility implementation.
short_docstring_tokens: Writes the gles2 auto generated utility implementation .
comment: """Writes the gles2 auto generated utility implementation."""