MCPcopy
hub / github.com/KhronosGroup/Vulkan-Docs / addMapping

Method addMapping

scripts/scriptgenerator.py:159–183  ·  view source on GitHub ↗

Add a mapping between types to mapDict. Only include API types, so we do not end up with a lot of useless uint32_t and void types.

(self, baseType, refType)

Source from the content-addressed store, hash-verified

157 dict[name] = value
158
159 def addMapping(self, baseType, refType):
160 """Add a mapping between types to mapDict.
161
162 Only include API types, so we do not end up with a lot of useless
163 uint32_t and void types."""
164 if not self.apiName(baseType) or not self.apiName(refType):
165 self.logMsg('diag', 'ScriptOutputGenerator::addMapping: IGNORE map from', baseType, '<->', refType)
166 return
167
168 self.logMsg('diag', 'ScriptOutputGenerator::addMapping: map from',
169 baseType, '<->', refType)
170
171 if baseType not in self.mapDict:
172 baseDict = {}
173 self.mapDict[baseType] = baseDict
174 else:
175 baseDict = self.mapDict[baseType]
176 if refType not in self.mapDict:
177 refDict = {}
178 self.mapDict[refType] = refDict
179 else:
180 refDict = self.mapDict[refType]
181
182 baseDict[refType] = None
183 refDict[baseType] = None
184
185 def breakCheck(self, procname, name):
186 """Debugging aid - call from procname to break on API 'name' if it

Callers 3

genTypeMethod · 0.95
genStructMethod · 0.95
genCmdMethod · 0.95

Calls 2

apiNameMethod · 0.95
logMsgMethod · 0.80

Tested by

no test coverage detected