blob: 7c54fc95ba20524f9686554e3aaf4ecdf0f93491 [file] [log] [blame]
Jack Jansen0c069922002-08-04 21:34:24 +00001# IBCarbonscan.py
2
3import sys
4import os
5import string
6import MacOS
7
8BGENDIR= '/Users/dp/python/dist/src/Tools/bgen/bgen'
9sys.path.append(BGENDIR)
10print sys.path, sys.prefix
11from bgenlocations import TOOLBOXDIR
12
13from scantools import Scanner_OSX
14
15def main():
16 print "---Scanning IBCarbonRuntime.h---"
17 input = ["IBCarbonRuntime.h"]
18 output = "IBCarbongen.py"
19 defsoutput = TOOLBOXDIR + "IBCarbonRuntime.py"
20 scanner = IBCarbon_Scanner(input, output, defsoutput)
21 scanner.scan()
22 scanner.close()
23 print "--done scanning, importing--"
24 import IBCarbonsupport
25 print "done"
26
27class IBCarbon_Scanner(Scanner_OSX):
28 def destination(self, type, name, arglist):
29 classname = "IBCarbonFunction"
30 listname = "functions"
31 if arglist:
32 t, n, m = arglist[0]
33 if t == "IBNibRef" and m == "InMode":
34 classname = "IBCarbonMethod"
35 listname = "methods"
36 return classname, listname
37
38 def makeblacklistnames(self):
39 return [
40 "DisposeNibReference", # taken care of by destructor
41 "CreateNibReferenceWithCFBundle", ## need to wrap CFBundle.h properly first
42 ]
43
44if __name__ == "__main__":
45 main()