gpu/command_buffer/build_cmd_buffer_lib.py
def WriteServiceUtilsHeader(self, filename):
    """Writes the gles2 auto generated utility header."""
    with CHeaderWriter(filename, self.year) as f:
      for name in sorted(self.named_type_info.keys()):
        named_type = NamedType(self.named_type_info[name])
        if not named_type.CreateValidator():
          continue
        class_name = ValidatorClassName(name)
        if named_type.IsComplete():
          f.write("""class %(class_name)s {
                      public:
                       bool IsValid(const %(type)s value) const;"""% {
            'class_name': class_name,
            'type': named_type.GetType()
          })
          if named_type.HasES3Values():
            f.write("""%s();
                       void SetIsES3(bool is_es3) { is_es3_ = is_es3; }
                      private:
                       bool is_es3_;""" % class_name)
          f.write("};\n")
          f.write("%s %s;\n\n" %
                     (class_name, ToUnderscore(name)))
        else:
          f.write("ValueValidator<%s> %s;\n" %
                     (named_type.GetType(), ToUnderscore(name)))
      f.write("\n")
    self.generated_cpp_filenames.append(filename)
Writes the gles2 auto generated utility header.
Writes the gles2 auto generated utility header.
Writes the gles2 auto generated utility header .
def WriteServiceUtilsHeader(self, filename):
    with CHeaderWriter(filename, self.year) as f:
      for name in sorted(self.named_type_info.keys()):
        named_type = NamedType(self.named_type_info[name])
        if not named_type.CreateValidator():
          continue
        class_name = ValidatorClassName(name)
        if named_type.IsComplete():
          f.write("""class %(class_name)s {
                      public:
                       bool IsValid(const %(type)s value) const;"""% {
            'class_name': class_name,
            'type': named_type.GetType()
          })
          if named_type.HasES3Values():
            f.write("""%s();
                       void SetIsES3(bool is_es3) { is_es3_ = is_es3; }
                      private:
                       bool is_es3_;""" % class_name)
          f.write("};\n")
          f.write("%s %s;\n\n" %
                     (class_name, ToUnderscore(name)))
        else:
          f.write("ValueValidator<%s> %s;\n" %
                     (named_type.GetType(), ToUnderscore(name)))
      f.write("\n")
    self.generated_cpp_filenames.append(filename)
def WriteServiceUtilsHeader ( self , filename ) : with CHeaderWriter ( filename , self . year ) as f : for name in sorted ( self . named_type_info . keys ( ) ) : named_type = NamedType ( self . named_type_info [ name ] ) if not named_type . CreateValidator ( ) : continue class_name = ValidatorClassName ( name ) if named_type . IsComplete ( ) : f . write ( """class %(class_name)s {
                      public:
                       bool IsValid(const %(type)s value) const;""" % { 'class_name' : class_name , 'type' : named_type . GetType ( ) } ) if named_type . HasES3Values ( ) : f . write ( """%s();
                       void SetIsES3(bool is_es3) { is_es3_ = is_es3; }
                      private:
                       bool is_es3_;""" % class_name ) f . write ( "};\n" ) f . write ( "%s %s;\n\n" % ( class_name , ToUnderscore ( name ) ) ) else : f . write ( "ValueValidator<%s> %s;\n" % ( named_type . GetType ( ) , ToUnderscore ( name ) ) ) f . write ( "\n" ) self . generated_cpp_filenames . append ( filename )
Writes the gles2 auto generated utility header.
Writes the gles2 auto generated utility header .
"""Writes the gles2 auto generated utility header."""
self
filename