Lines Matching refs:name
34 def apiName(self, name):
35 """Return True if name is in the reserved API namespace.
38 return self.genOpts.conventions.is_api_name(name)
56 # Dictionaries are keyed by the name of the entity (e.g.
74 # Dictionary containing the type of a type name
75 # (e.g. the string name of the dictionary with its contents).
83 - api - name of the API
84 - feature - name of the feature requiring it
103 - feature - name of the feature being generated
125 - feature - name of the feature being generated"""
154 def addName(self, dict, name, value):
157 dict[name] = value
185 def breakCheck(self, procname, name):
186 """Debugging aid - call from procname to break on API 'name' if it
190 if name[0:len(pat)] == pat:
191 print('{}(name = {}) matches {}'.format(procname, name, pat))
195 def genType(self, typeinfo, name, alias):
200 - For 'bitmask' types, add the type name to the 'flags' dictionary,
201 with the value being the corresponding 'enums' name defining
203 - For 'enum' types, add the type name to the 'enums' dictionary,
206 - For 'funcpointer' types, add the type name to the 'funcpointers'
208 - For 'handle' and 'define' types, add the handle or #define name
211 OutputGenerator.genType(self, typeinfo, name, alias)
219 self.addName(self.typeCategory, name, category)
222 self.genStruct(typeinfo, name, alias)
225 # Add name -> alias mapping
226 self.addName(self.alias, name, alias)
233 # Extract the type name
243 self.addName(self.flags, name, requiredEnum)
248 self.addMapping(name, requiredEnum)
252 # <type name="Something" category="enum"/>,
254 self.logMsg('warn', 'ScriptOutputGenerator::genType: invalid \'enum\' category for name:', name)
256 self.funcpointers[name] = None
258 self.handles[name] = None
260 self.defines[name] = None
262 self.basetypes[name] = None
263 self.addName(self.typeCategory, name, 'basetype')
265 self.logMsg('diag', 'ScriptOutputGenerator::genType: unprocessed type:', name)
270 Add the struct name to the 'structs' dictionary, with the
275 # Add name -> alias mapping
281 members = [member.text for member in typeinfo.elem.findall('.//member/name')]
292 - Add the enum type name to the 'enums' dictionary, with
294 - Add each enumerant name to the 'consts' dictionary, with
303 # Add name -> alias mapping
310 enumerants = [elem.get('name') for elem in groupElem.findall('enum')]
311 for name in enumerants:
312 self.addName(self.consts, name, groupName)
317 def genEnum(self, enuminfo, name, alias):
320 - Add the constant name to the 'consts' dictionary, with the
323 OutputGenerator.genEnum(self, enuminfo, name, alias)
325 if name not in self.consts:
327 self.addName(self.typeCategory, name, 'consts')
328 self.consts[name] = None
331 # Add name -> alias mapping
332 self.addName(self.alias, name, alias)
343 def genCmd(self, cmdinfo, name, alias):
346 - Add the command name to the 'protos' dictionary, with the
348 OutputGenerator.genCmd(self, cmdinfo, name, alias)
351 self.addName(self.typeCategory, name, 'protos')
354 # Add name -> alias mapping
355 self.addName(self.alias, name, alias)
360 params = [param.text for param in cmdinfo.elem.findall('param/name')]
361 self.protos[name] = params
364 self.addMapping(name, param_type)