def __init__(self, class_, bases, info, codeunit): self.class_ = copy.deepcopy(class_) self.bases = bases[:] self.info = info self.wrapper_name = makeid(class_.FullName()) + "_Wrapper" self.virtual_methods = None self._method_count = {} self.codeunit = codeunit self.GenerateVirtualMethods()
def __init__(self, class_, bases, info, codeunit): self.class_ = copy.deepcopy(class_) self.bases = bases[:] self.info = info self.wrapper_name = makeid(class_.FullName()) + '_Wrapper' self.virtual_methods = None self._method_count = {} self.codeunit = codeunit self.GenerateVirtualMethods()
def ConverterMethodName(converter): result_fullname = converter.result.getFullCPlusPlusName() result_name = converter.result.name for regex, method_name in self.SPECIAL_CONVERTERS.items(): if regex.match(result_fullname): return method_name else: # extract the last name from the full name result_name = makeid(result_name) return "to_" + result_name
def ConverterMethodName(converter): result_fullname = converter.result.FullName() result_name = converter.result.name for regex, method_name in self.SPECIAL_CONVERTERS.items(): if regex.match(result_fullname): return method_name else: # extract the last name from the full name result_name = makeid(result_name) return 'to_' + result_name
def _FunctionName(self, interface_file): name = os.path.splitext(interface_file)[0] return 'Export_%s' % utils.makeid(name)
def ScopeName(self): return makeid(self.class_.getFullCPlusPlusName()) + "_scope"
def OverloadName(self, method): "Returns the name of the overloads struct for the given method" name = makeid(method.getFullCPlusPlusName()) overloads = "_overloads_%i_%i" % (method.minArgs, method.maxArgs) return name + overloads
def GenerateName(name, type_list): name = name.replace('::', '_') names = [name] + type_list return makeid('_'.join(names))
def ScopeName(self): return makeid(self.class_.FullName()) + '_scope'
def OverloadName(self, method): 'Returns the name of the overloads struct for the given method' name = makeid(method.FullName()) overloads = '_overloads_%i_%i' % (method.minArgs, method.maxArgs) return name + overloads
def ScopeName(self): return makeid(self.class_.FullName()) + "_scope"
def GenerateName(name, type_list): name = name.replace('::', '_') names = [name] + type_list return utils.makeid('_'.join(names))
def getClassName(self): return utils.makeid(self.class_.getFullCPlusPlusName())