blob: c0dea7e901825b52194f424486875e4d5f2eaffd [file] [log] [blame]
Jack Jansen0c069922002-08-04 21:34:24 +00001# IBCarbonscan.py
2
3import sys
4import os
5import string
Jack Jansen0c069922002-08-04 21:34:24 +00006
Jack Jansenaaebdd62002-08-05 15:39:30 +00007from bgenlocations import TOOLBOXDIR, BGENDIR
Jack Jansen0c069922002-08-04 21:34:24 +00008sys.path.append(BGENDIR)
Jack Jansen0c069922002-08-04 21:34:24 +00009
10from scantools import Scanner_OSX
11
12def main():
13 print "---Scanning IBCarbonRuntime.h---"
14 input = ["IBCarbonRuntime.h"]
15 output = "IBCarbongen.py"
16 defsoutput = TOOLBOXDIR + "IBCarbonRuntime.py"
17 scanner = IBCarbon_Scanner(input, output, defsoutput)
18 scanner.scan()
19 scanner.close()
20 print "--done scanning, importing--"
21 import IBCarbonsupport
22 print "done"
23
24class IBCarbon_Scanner(Scanner_OSX):
Jack Jansenacbaefd2002-08-04 21:59:37 +000025
Jack Jansen0c069922002-08-04 21:34:24 +000026 def destination(self, type, name, arglist):
27 classname = "IBCarbonFunction"
28 listname = "functions"
29 if arglist:
30 t, n, m = arglist[0]
31 if t == "IBNibRef" and m == "InMode":
32 classname = "IBCarbonMethod"
33 listname = "methods"
34 return classname, listname
35
36 def makeblacklistnames(self):
37 return [
38 "DisposeNibReference", # taken care of by destructor
39 "CreateNibReferenceWithCFBundle", ## need to wrap CFBundle.h properly first
40 ]
Jack Jansenacbaefd2002-08-04 21:59:37 +000041
42 def makerepairinstructions(self):
43 return []
44
Jack Jansen0c069922002-08-04 21:34:24 +000045
46if __name__ == "__main__":
47 main()