class Function:
- # 0-3 are reserved to memcpy, malloc, free, and realloc
- __id = 4
-
def __init__(self, type, name, args, call = '', fail = None, sideeffects=True, internal=False):
- self.id = Function.__id
- Function.__id += 1
-
self.type = type
self.name = name
def argNames(self):
return [arg.name for arg in self.args]
+ def getArgByName(self, name):
+ for arg in self.args:
+ if arg.name == name:
+ return arg
+ return None
+
def StdFunction(*args, **kwargs):
kwargs.setdefault('call', '__stdcall')
iface = iface.base
raise StopIteration
+ def hasBase(self, *bases):
+ for iface in self.iterBases():
+ if iface in bases:
+ return True
+ return False
+
def iterBaseMethods(self):
if self.base is not None:
for iface, method in self.base.iterBaseMethods():