MCPcopy Index your code
hub / github.com/KhronosGroup/Vulkan-Docs / genCmd

Method genCmd

scripts/scriptgenerator.py:370–391  ·  view source on GitHub ↗

Generate command. - Add the command name to the 'protos' dictionary, with the value being an ordered list of the parameter names.

(self, cmdinfo, name, alias)

Source from the content-addressed store, hash-verified

368 # came from.
369
370 def genCmd(self, cmdinfo, name, alias):
371 """Generate command.
372
373 - Add the command name to the 'protos' dictionary, with the
374 value being an ordered list of the parameter names."""
375 OutputGenerator.genCmd(self, cmdinfo, name, alias)
376
377 # Add a typeCategory{} entry for the category of this type.
378 self.addName(self.typeCategory, name, 'protos')
379
380 if alias:
381 # Add name -> alias mapping
382 self.addName(self.alias, name, alias)
383 else:
384 # May want to only emit definition on this branch
385 True
386
387 params = [param.text for param in cmdinfo.elem.findall('param/name')]
388 self.protos[name] = params
389 paramTypes = [param.text for param in cmdinfo.elem.findall('param/type')]
390 for param_type in paramTypes:
391 self.addMapping(name, param_type)
392
393 def createInverseMap(self):
394 """This creates the inverse mapping of nonexistent APIs in this

Callers

nothing calls this directly

Calls 2

addNameMethod · 0.95
addMappingMethod · 0.95

Tested by

no test coverage detected