Update for release.
[python/dscho.git] / Mac / Modules / ibcarbon / IBCarbonscan.py
blob1f05217253f9d67d44d48434dc5de054e4ee5af6
1 # IBCarbonscan.py
3 import sys
4 import os
5 import string
7 from bgenlocations import TOOLBOXDIR, BGENDIR
8 sys.path.append(BGENDIR)
10 from scantools import Scanner_OSX
12 def 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 "=== Testing definitions output code ==="
21 execfile(defsoutput, {}, {})
22 print "--done scanning, importing--"
23 import IBCarbonsupport
24 print "done"
26 class 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
38 def makeblacklistnames(self):
39 return [
40 "DisposeNibReference", # taken care of by destructor
41 "CreateNibReferenceWithCFBundle", ## need to wrap CFBundle.h properly first
44 def makerepairinstructions(self):
45 return []
48 if __name__ == "__main__":
49 main()