parameters: (self, typeinfo, name, alias)
docstring: Generate type.
docstring_summary: Generate type.
docstring_tokens: Generate type .
function: def genType(self, typeinfo, name, alias):
          "Generate type."
          OutputGenerator.genType(self, typeinfo, name, alias)
          typeElem = typeinfo.elem
  
          # Vulkan:
          # Determine the category of the type, and the type section to add
          # its definition to.
          # 'funcpointer' is added to the 'struct' section as a workaround for
          # internal issue #877, since structures and function pointer types
          # can have cross-dependencies.
          category = typeElem.get('category')
          if category == 'funcpointer':
              section = 'struct'
          else:
              section = category
  
          if category in ('struct', 'union'):
              # If the type is a struct type, generate it using the
              # special-purpose generator.
              self.genStruct(typeinfo, name, alias)
          else:
              # OpenXR: this section was not under 'else:' previously, just fell through
              if alias:
                  # If the type is an alias, just emit a typedef declaration
                  body = 'typedef ' + alias + ' ' + name + ';\n'
              else:
                  # Replace <apientry /> tags with an APIENTRY-style string
                  # (from self.genOpts). Copy other text through unchanged.
                  # If the resulting text is an empty string, do not emit it.
                  body = noneStr(typeElem.text)
                  for elem in typeElem:
                      if elem.tag == 'apientry':
                          body += self.genOpts.apientry + noneStr(elem.tail)
                      else:
                          body += noneStr(elem.text) + noneStr(elem.tail)
              if body:
                  # Add extra newline after multi-line entries.
                  if '\n' in body[0:-1]:
                      body += '\n'
                  self.appendSection(section, body)
function_tokens: def genType ( self , typeinfo , name , alias ) : OutputGenerator . genType ( self , typeinfo , name , alias ) typeElem = typeinfo . elem # Vulkan: # Determine the category of the type, and the type section to add # its definition to. # 'funcpointer' is added to the 'struct' section as a workaround for # internal issue #877, since structures and function pointer types # can have cross-dependencies. category = typeElem . get ( 'category' ) if category == 'funcpointer' : section = 'struct' else : section = category if category in ( 'struct' , 'union' ) : # If the type is a struct type, generate it using the # special-purpose generator. self . genStruct ( typeinfo , name , alias ) else : # OpenXR: this section was not under 'else:' previously, just fell through if alias : # If the type is an alias, just emit a typedef declaration body = 'typedef ' + alias + ' ' + name + ';\n' else : # Replace <apientry /> tags with an APIENTRY-style string # (from self.genOpts). Copy other text through unchanged. # If the resulting text is an empty string, do not emit it. body = noneStr ( typeElem . text ) for elem in typeElem : if elem . tag == 'apientry' : body += self . genOpts . apientry + noneStr ( elem . tail ) else : body += noneStr ( elem . text ) + noneStr ( elem . tail ) if body : # Add extra newline after multi-line entries. if '\n' in body [ 0 : - 1 ] : body += '\n' self . appendSection ( section , body )