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)
| 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 |